iv
5. Applied Instructions ...............................................................................5-1
5.1 Pro
g
ram Flow-Functions00 to 09 ........................................................................5-4
5.1.1 CJ (FNC 00) ..............................................................................................................5-5
5.1.2 CALL (FNC 01).......................................................................................................... 5-7
5.1.3 SRET (FNC 02) ......................................................................................................... 5-8
5.1.4 IRET, EI, DI (FNC 03, 04, 05) ...................................................................................5-9
5.1.5 FEND (FNC 06)....................................................................................................... 5-11
5.1.6 WDT (FNC 07) ........................................................................................................5-12
5.1.7 FOR, NEXT (FNC 08, 09) .......................................................................................5-13
5.2 Move And Compare - Functions 10 to 19.......................................................... 5-16
5.2.1 CMP (FNC 10)......................................................................................................... 5-17
5.2.2 ZCP (FNC 11) .........................................................................................................5-17
5.2.3 MOV (FNC 12) ........................................................................................................5-18
5.2.4 SMOV (FNC 13) ......................................................................................................5-18
5.2.5 CML (FNC 14) ......................................................................................................... 5-19
5.2.6 BMOV (FNC 15) .....................................................................................................5-20
5.2.7 FMOV (FNC 16) ......................................................................................................5-21
5.2.8 XCH (FNC 17) ......................................................................................................... 5-21
5.2.9 BCD (FNC18) ..........................................................................................................5-22
5.2.10 BIN (FNC 19)........................................................................................................... 5-22
5.3 Arithmetic And Lo
g
ical Operations -Functions 20 to 29 ....................................5-24
5.3.1 ADD (FNC 20) ......................................................................................................... 5-25
5.3.2 SUB (FNC 21) ........................................................................................................5-26
5.3.3 MUL (FNC 22) ......................................................................................................... 5-27
5.3.4 DIV (FNC 23)...........................................................................................................5-28
5.3.5 INC (FNC 24) ......................................................................................................... 5-29
5.3.6 DEC (FNC 24) ........................................................................................................ 5-29
5.3.7 WAND (FNC 26)......................................................................................................5-30
5.3.8 WOR (FNC 27)........................................................................................................5-30
5.3.9 WXOR (FNC 28) .....................................................................................................5-31
5.3.10NEG (FNC 29) ......................................................................................................... 5-31
5.4 Rotation And Shift - Functions 30 to 39.............................................................5-34
5.4.1 ROR (FNC 30)......................................................................................................... 5-35
5.4.2 ROL (FNC 31) ......................................................................................................... 5-35
5.4.3 RCR (FNC 32)......................................................................................................... 5-36
5.4.4 RCL (FNC 33) ......................................................................................................... 5-36
5.4.5 SFTR (FNC 34) ....................................................................................................... 5-37
5.4.6 SFTL (FNC 35)........................................................................................................5-37
5.4.7 WSFR (FNC 36) ......................................................................................................5-38
5.4.8 WSFL (FNC 37)....................................................................................................... 5-38
5.4.9 SFWR (FNC 38) ......................................................................................................5-39
5.4.10 SFRD (FNC 39).......................................................................................................5-40
5.5 Data Operation - Functions 40 to 49 .................................................................5-42
5.5.1 ZRST (FNC 40) ....................................................................................................... 5-43
5.5.2 DECO (FNC 41) ......................................................................................................5-43
5.5.3 ENCO (FNC 42) ...................................................................................................... 5-44
5.5.4 SUM (FNC 43)......................................................................................................... 5-45
5.5.5 BON (FNC 44).........................................................................................................5-45
5.5.6 MEAN (FNC 45) ......................................................................................................5-46
5.5.7 ANS (FNC 46) ......................................................................................................... 5-47
5.5.8 ANR (FNC 47) ......................................................................................................... 5-47
5.5.9 SQR (FNC 48).........................................................................................................5-48
5.5.10 FLT (FNC 49) ..........................................................................................................5-49
FX Series Programmable Controllers