Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Panasonic FP PLC Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1336

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.

net

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents
Chapter 1
1.1

Relays, Memory Areas and Constants

Table of Relays, Memory Areas and Constants . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.1 FP0/FPe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.2 FP0R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 7 1.1.3 FP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 9 1.1.4 FPX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 13 1.1.5 FP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 15 1.1.6 FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 17 1.1.7 FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 19 1.1.8 Relay Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 21 Explanation of Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 External Input Relays (X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 External Output Relays (Y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Internal Relays (R) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.4 Special Internal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.5 Link Relays (L) for FP, FPX, FP0R . . . . . . . . . . . . . . . . . . . . . . . 1.2.6 Link Relays (L) for FP2/FP2SH/FP10SH . . . . . . . . . . . . . . . . . . . . . 1.2.7 Timer (T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.8 Counter (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.9 Items Shared by the Timer and Counter . . . . . . . . . . . . . . . . . . . . . 1.2.10 Pulse Relays (P) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.11 Error Alarm Relays (E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Explanation of Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 Data Register (DT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Special Data Registers (DT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.3 File Registers (FL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.4 WX, WY, WR and WL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.5 Link Data Registers (LD) for FP/FPX/FP0R . . . . . . . . . . . . . . . . 1.3.6 Link Data Registers (LD) for FP2/FP2SH/FP10SH . . . . . . . . . . . . 1.3.7 Set Value Area for Timer/Counter (SV) . . . . . . . . . . . . . . . . . . . . . . 1.3.8 Elapsed Value Area for Timer/Counter (EV) . . . . . . . . . . . . . . . . . . 1.3.9 Index Registers (IX, IY) (for FP0, FPe) . . . . . . . . . . . . . . . . . . . . . 1.3.10 Index Registers (I0 to ID) (for FP/FPX/FP0R) . . . . . . . . . . . . . . 1.3.11 Index Registers (I0 to ID) (for FP2, FP2SH and FP10SH) . . . . . . Explanation of Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 Integer Type Decimal Constants (K) . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 Hexadecimal Constants (H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Floating Point Type Real Numbers (f) . . . . . . . . . . . . . . . . . . . . . . . 1 - 24 1 - 24 1 - 25 1 - 26 1 - 28 1 - 29 1 - 31 1 - 35 1 - 36 1 - 37 1 - 39 1 - 41 1 - 44 1 - 44 1 - 46 1 - 48 1 - 49 1 - 50 1 - 52 1 - 56 1 - 57 1 - 58 1 - 61 1 - 62 1 - 72 1 - 72 1 - 73 1 - 74
i

1.2

1.3

1.4

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

1.4.4 1.4.5 1.5

BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH) . . . 1 - 79 Character Constants (M) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 80

Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . . . . . . . . . 1 - 81 1.5.1 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . 1 - 81 1.5.2 Overflow and Underflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 84

Chapter 2
2.1

Basic Instructions
2-3 2-3 2-4 2-4 2-5

Composition of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Sequence Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Basic Function Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.3 Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.4 Data Compare Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.2

Number of Steps in the FP2, FP2SH and FP10SH . . . . . . . . . . . . . . . . . . . . . 2 - 6

Chapter 3
3.1

Highlevel Instructions
3-3 3-3 3-4 3-5 3-6

Composition of High-level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 High-level Instruction Numbers and Program Input . . . . . . . . . . . . . 3.1.3 High-level Instruction and Execution Condition (Trigger) . . . . . . . . 3.1.4 F and P Type High-level Instructions . . . . . . . . . . . . . . . . . . . . . .

Chapter 4
4.1

Precautions Concerning Programs

Changing the Set Value of Timer/Counter During RUN . . . . . . . . . . . . . . . . . 4 - 3 4.1.1 Method of Rewriting Constant in the Program . . . . . . . . . . . . . . . . . 4 - 3 4.1.2 Method of Rewriting a Value in the Set Value Area . . . . . . . . . . . . . 4 - 5 Use of Duplicated Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 8 4.2.1 Duplicated Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 8 4.2.2 When Output is Repeated with an OT, KP, SET, or RST Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 9 Leading Edge Detection Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Instructions of Leading Edge Detection Method . . . . . . . . . . . . . . . 4.3.2 Operation and Precautions at Run Start Time . . . . . . . . . . . . . . . . 4.3.3 Precautions when Using a Control Instruction . . . . . . . . . . . . . . . . 4 - 10 4 - 10 4 - 11 4 - 13

4.2

4.3

4.4

Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15 4.4.1 Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15

ii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

4.4.2 4.4.3 4.4.4 4.5

Operation Mode when an Operation Error Occurs . . . . . . . . . . . . . 4 - 16 Dealing with Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 17 Points to Check in Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 18 4 - 19 4 - 19 4 - 20 4 - 21

Handling Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2 Memory Areas Which can be Modified with Index Registers . . . . 4.5.3 Example of Using an Index Register . . . . . . . . . . . . . . . . . . . . . . . .

4.6

Handling BCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 25 4.6.1 BCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 25 4.6.2 Handling BCD Data in the Programmable Controller . . . . . . . . . . . 4 - 25 Precautions for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 27 Rewrite Function During RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.1 Operation of Rewrite During RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2 Cases Where Rewriting During Run is not Possible . . . . . . . . . . . 4.8.3 Procedures and Operation of Rewrite During RUN . . . . . . . . . . . . 4 - 28 4 - 28 4 - 29 4 - 31

4.7 4.8

4.9

Processing During Forced Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 32 4.9.1 Processing when forced input/output is initiated during RUN . . . . 4 - 32

4.10 Second Program Area (FP2SH, FP10SH) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 34

Chapter 5

Appendix

5.1 System Registers / Special Internal Relays / Special Data Registers....... 53 5.1.1 Table of System Registers for FP0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.1.2 Table of Special Internal Relays for FP0 . . . . . . . . . . . . . . . . . . . . . . . . . 515 5.1.3 Table of Special Data Registers for FP0 . . . . . . . . . . . . . . . . . . . . . . . . . 518 5.1.4 Table of System Registers for FPe . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 5.1.5 Table of Special Internal Relays for FPe . . . . . . . . . . . . . . . . . . . . . . . 532 5.1.6 Table of Special Data Registers for FPe . . . . . . . . . . . . . . . . . . . . . . . . 536 5.1.7 Table of System Registers for FP0R . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 5.1.8 Table of Special Internal Relays for FP0R . . . . . . . . . . . . . . . . . . . . . . . 549 5.1.9 Table of Special Data Registers for FP0R . . . . . . . . . . . . . . . . . . . . . . . 559 5.1.10 Table of System Registers for FP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 5.1.11 Table of Special Internal Relays for FP . . . . . . . . . . . . . . . . . . . . . . . 584 5.1.12 Table of Special Data Registers for FP . . . . . . . . . . . . . . . . . . . . . . . 593 5.1.13 Table of System Registers for FPX . . . . . . . . . . . . . . . . . . . . . . . . . 5107 5.1.14 Table of Special Internal Relays for FPX . . . . . . . . . . . . . . . . . . . . . 5119 5.1.15 Table of Special Data Registers for FPX . . . . . . . . . . . . . . . . . . . . 5130 5.1.16 Table of System Registers for FP2/FP2SH/FP10SH . . . . . . . . . . . 5151 5.1.17 Table of Special Internal Relays for FP1/FPM/FP2/FP2SH/FP10SH/FP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5165
iii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

5.1.18 Special Data Registers for FP2/FP2SH/FP3/FP10SH . . . . . . . . . . 5176 5.2 Table of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5201 5.3 Table of Highlevel Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5209 5.4 Table of Error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5229 5.5 MEWTOCOLCOM Communication Commands . . . . . . . . . . . . . . . . . . . . . . 5242 5.6 Hexadecimal/Binary/BCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5243 5.7 ASCII Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5244

Record of changes

............................................... R-1

iv
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

Basic Instructions
Sequence basic instructions
ST ST/ OT / AN AN/ OR OR/ ST ST AN AN OR OR OT OT ALT ANS ORS PSHS RDS POPS DF DF/ DFI SET RST KP NOP Start . . . . . . . . . . . . . . . . . . . 2 8 Start Not . . . . . . . . . . . . . . . 2 8 Out . . . . . . . . . . . . . . . . . . . . 2 8 Not . . . . . . . . . . . . . . . . . . . 2 10 AND . . . . . . . . . . . . . . . . . . 2 11 AND Not . . . . . . . . . . . . . . 2 11 OR . . . . . . . . . . . . . . . . . . . 2 12 OR Not . . . . . . . . . . . . . . . . 2 12 Leading edge start . . . . . . 2 14 Trailing edge start . . . . . . 2 14 Leading edge AND . . . . . 2 14 Trailing edge AND . . . . . . 2 14 Leading edge OR . . . . . . . 2 14 Trailing edge OR . . . . . . . 2 14 Leading edge out . . . . . . . 2 16 Trailing edge out . . . . . . . 2 16 Alternative out . . . . . . . . . 2 18 AND stack . . . . . . . . . . . . . 2 19 OR stack . . . . . . . . . . . . . . 2 21 Push stack . . . . . . . . . . . . 2 23 Read stack . . . . . . . . . . . . 2 23 Pop stack . . . . . . . . . . . . . 2 23 Leading edge differential 2 26 Trailing edge differential . 2 26 Leading edge differential (initial execution type) . . . 2 30 Set . . . . . . . . . . . . . . . . . . . 2 32 Reset . . . . . . . . . . . . . . . . . 2 32 Keep . . . . . . . . . . . . . . . . . 2 34 No operation . . . . . . . . . . . 2 35 TMX TMY CT SR Ondelay timer TMX . . . . 2 42 Ondelay timer TMY . . . . 2 42 Counter . . . . . . . . . . . . . . . 2 48 Shift register . . . . . . . . . . . 2 54

Control instructions
MC MCE JP LBL LOOP BRK ED CNDE Master control relay . . . . . 2 57 Master control relay end . 2 57 Jump . . . . . . . . . . . . . . . . . 2 61 Label . . . . . . . . . . 2 61, 2 64 Loop . . . . . . . . . . . . . . . . . . 2 64 Break . . . . . . . . . . . . . . . . . 2 68 End . . . . . . . . . . . . . . . . . . . 2 70 Conditional end . . . . . . . . 2 71

EJECT Eject . . . . . . . . . . . . . . . . . . . 2 73

Step ladder instructions


SSTP NSTL NSTP CSTP STPE SCLR Start step . . . . . . . . . . . . . . 2 75 Next step . . . . . . . . . . . . . . 2 75 Next step . . . . . . . . . . . . . . 2 75 Clear step . . . . . . . . . . . . . 2 75 Step end . . . . . . . . . . . . . . 2 75 Clear multiple processes 2 85

Subroutine instructions
CALL FCAL SUB RET Subroutine call . . . . . . . . . 2 86 Output off type subroutine call . . . . . . . . . 2 89 Subroutine entry . . . . . . . . 2 86 Subroutine return . . . . . . . 2 86

Interrupt instructions
INT Interrupt . . . . . . . . 2 91. 2 97 Interrupt return . . 2 91, 2 97 Interrupt control 2 102, 2 110 IRET ICTL

Basic function instructions


TML TMR Ondelay timer TML . . . . 2 36 Ondelay timer TMR . . . . 2 42

v
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

Special setting instructions


SYS1 Communication conditions setting . . . . . . . . . . . . . . . 2 119 Password setting . . . . . . 2 123 Interrupt setting . . . . . . . 2 125 PLC link time setting . . . 2 127 Change highspeed counter operation mode . . . . . . . 2 129 MEWTOCOLCOM response control . . . . . . . . . . . . . . . 2 131 SYS2 Change system registers (No.40 to No.47, No.50 to No.57) . . . . . . . 2 133

STF>

Floating point real number data comparison: (Start) . . . . 2 140

STF>= Floating point real number data comparison: (Start) . . . . 2 140 STF< Floating point real number data comparison: (Start) . . . . 2 140

STF<= Floating point real number data comparison: (Start) . . . . 2 140 AN= AN<> AN> AN>= 16bit data compare (AND) . . . . . . . . . . . . . . . . 2 142 16bit data compare (AND) . . . . . . . . . . . . . . . . 2 142 16bit data compare (AND) . . . . . . . . . . . . . . . . 2 142 16bit data compare (AND) . . . . . . . . . . . . . . . . 2 142 16bit data compare (AND) . . . . . . . . . . . . . . . . 2 142 16bit data compare (AND) . . . . . . . . . . . . . . . . 2 142 32bit data compare (AND) . . . . . . . . . . . . . . . . 2 144

Data compare instructions


ST= ST<> ST> ST>= ST< ST<= STD= 16bit data compare (Start) . . . . . . . . . . . . . . . . 2 136 16bit data compare (Start) . . . . . . . . . . . . . . . . 2 136 16bit data compare (Start) . . . . . . . . . . . . . . . . 2 136 16bit data compare (Start) . . . . . . . . . . . . . . . . 2 136 16bit data compare (Start) . . . . . . . . . . . . . . . . 2 136 16bit data compare (Start) . . . . . . . . . . . . . . . . 2 136 32bit data compare (Start) . . . . . . . . . . . . . . . . 2 138

AN< AN<= AND=

AND<> 32bit data compare (AND) . . . . . . . . . . . . . . . . 2 144 AND> 32bit data compare (AND) . . . . . . . . . . . . . . . . 2 144

AND>= 32bit data compare (AND) . . . . . . . . . . . . . . . . 2 144 AND< 32bit data compare (AND) . . . . . . . . . . . . . . . . 2 144

STD<> 32bit data compare (Start) . . . . . . . . . . . . . . . . 2 138 STD> 32bit data compare (Start) . . . . . . . . . . . . . . . . 2 138

AND<= 32bit data compare (AND) . . . . . . . . . . . . . . . . 2 144 ANF= Floating point real number data comparison: (AND) . . . . 2 146

ANF<> Floating point real number data comparison: (AND) . . . . 2 146 ANF> Floating point real number data comparison: (AND) . . . . 2 146

STD>= 32bit data compare (Start) . . . . . . . . . . . . . . . . 2 138 STD< 32bit data compare (Start) . . . . . . . . . . . . . . . . 2 138

ANF>= Floating point real number data comparison: (AND) . . . . 2 146 ANF< Floating point real number data comparison: (AND) . . . . 2 146

STD<= 32bit data compare (Start) . . . . . . . . . . . . . . . . 2 138 STF= Floating point real number data comparison: (Start) . . . . 2 140

ANF<= Floating point real number data comparison: (AND) . . . . 2 146 OR= 16bit data compare (OR) . . . . . . . . . . . . . . . . . 2 148

STF<> Floating point real number data comparison: (Start) . . . . 2 140


vi

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

OR<> OR> OR>= OR< OR<= ORD=

16bit data compare (OR) . . . . . . . . . . . . . . . . . 2 148 16bit data compare (OR) . . . . . . . . . . . . . . . . . 2 148 16bit data compare (OR) . . . . . . . . . . . . . . . . . 2 148 16bit data compare (OR) . . . . . . . . . . . . . . . . . 2 148 16bit data compare (OR) . . . . . . . . . . . . . . . . . 2 148 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150

ORD<> 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150 ORD> 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150

ORD>= 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150 ORD< 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150

ORD<= 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150 ORF= Floating point real number data comparison: (OR) . . . . . 2 152

ORF<> Floating point real number data comparison: (OR) . . . . . 2 152 ORF> Floating point real number data comparison: (OR) . . . . . 2 152

ORF>= Floating point real number data comparison: (OR) . . . . . 2 152 ORF< Floating point real number data comparison: (OR) . . . . . 2 152

ORF<= Floating point real number data comparison: (OR) . . . . . 2 152

vii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

Highlevel Instructions
Data transfer instructions
F0 P0 F1 P1 F2 P2 F3 P3 F4 P4 F5 P5 F6 P6 F7 P7 F8 P8 F10 P10 F11 P11 F12 F12 P12 P13 F13 P13 F14 P14 F15 P15 F16 P16 F17 P17 F18 P18
viii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

MV PMV DMV PDMV MV/ PMV/ DMV/ PDMV/ GETS PGETS BTM PBTM DGT PDGT MV2 PMV2 DMV2 PDMV2 BKMV PBKMV COPY PCOPY ICRD ICRD PICRD PICWT ICWT PICWT PGRD PPGRD XCH PXCH DXCH PDXCH SWAP PSWAP BXCH PBXCH

16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 8 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 10 16-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 12 32-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 14 Reading of head word No. of the specified slot. . . . . . . . . . . . . . 3 16 Bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 17 Hexadecimal digit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 21 Two 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 25 Two 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 27 Block move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 29 Block copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 31 Data read from EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 33 Data read from FROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 35 Data read from IC card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 37 Data write to EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 39 Data write to FROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 41 Data write to IC card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 43 Program read from IC card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 45 16-bit data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 49 32-bit data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 Higher/ lower byte in 16-bit data exchange . . . . . . . . . . . . . . . . . 3 53 16bit blocked data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 55

Table of Contents

Control instruction
F19 LBL SJP Auxiliary jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 57

Binary arithmetic instructions


F20 P20 F21 P21 F22 P22 F23 P23 F25 P25 F26 P26 F27 P27 F28 P28 F30 P30 F31 P31 F32 P32 F33 P33 F34 P34 F35 P35 F36 P36 F37 P37 F38 P38 F39 P39 + P+ D+ PD+ + P+ D+ PD+ P D PD P D PD * P* D* PD* % P% D% PD% *W P*W +1 P+1 D+1 PD+1 1 P1 D1 PD1 D*D PD*D 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 63 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 16-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 67 32-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 69 16-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 71 32-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 73 16-bit data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 75 32-bit data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 77 16-bit data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 79 32-bit data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 81 16-bit data multiplication (result in 16 bits) . . . . . . . . . . . . . . . . . . 3 83 16-bit data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 85 32-bit data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 87 16-bit data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 89 32-bit data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 91 32-bit data multiplication (result in 32 bits) . . . . . . . . . . . . . . . . . . 3 93

BCD arithmetic instructions


F40 P40 B+ PB+ 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 95

ix
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

F41 P41 F42 P42 F43 P43 F45 P45 F46 P46 F47 P47 F48 P48 F50 P50 F51 P51 F52 P52 F53 P53 F55 P55 F56 P56 F57 P57 F58 P58

DB+ PDB+ B+ PB+ DB+ PDB+ B PB DB PDB B PB DB PDB B* PB* DB* PDB* B% PB% DB% PDB% B+1 PB+1 DB+1 PDB+1 B1 PB1 DB1 PDB1

8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 97 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 99 8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 101 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 103 8-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 105 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 107 8-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 109 4-digit BCD data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 111 8-digit BCD data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 113 4-digit BCD data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 115 8-digit BCD data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 117 4-digit BCD data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 119 8-digit BCD data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 121 4-digit BCD data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 123 8-digit BCD data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 125

Data compare instructions


F60 P60 F61 P61 F62 P62 F63 P63 F64 P64 CMP PCMP DCMP PDCMP WIN PWIN DWIN PDWIN BCMP PBCMP 16-bit data comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 127 32-bit data comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 131 16-bit data band comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 135 32-bit data band comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 137 Block data comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 139

Logic operation instructions


F65 P65
x
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WAN PWAN

16-bit data AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 143

Table of Contents

F66 P66 F67 P67 F68 P68 F69 P69

WOR PWOR XOR PXOR XNR PXNR WUNI PWUNI

16-bit data OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 145 16-bit data exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 147 16-bit data exclusive NOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 149 16-bit data unite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 151

Data conversion instructions


F70 P70 F71 P71 F72 P72 F73 P73 F74 P74 F75 P75 F76 P76 F77 P77 F78 P78 F80 P80 F81 P81 F82 P82 F83 P83 F84 P84 F85 P85 F86 P86 F87 P87 F88 P88 BCC PBCC HEXA PHEXA AHEX PAHEX BCDA PBCDA ABCD PABCD BINA PBINA ABIN PABIN DBIA PDBIA DABI PDABI BCD PBCD BIN PBIN DBCD PDBCD DBIN PDBIN INV PINV NEG PNEG DNEG PDNEG ABS PABS DABS PDABS Block check code calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 153 Hexadecimal data ASCII code . . . . . . . . . . . . . . . . . . . . . . . . 3 158 ASCII code Hexadecimal data . . . . . . . . . . . . . . . . . . . . . . . . 3 161 BCD data ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 165 ASCII code BCD data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 169 16-bit binary data ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . 3 173 ASCII code 16-bit binary data . . . . . . . . . . . . . . . . . . . . . . . . . 3 177 32-bit binary data ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . 3 180 ASCII code 32-bit binary data . . . . . . . . . . . . . . . . . . . . . . . . . 3 183 16-bit binary data 4-digit BCD data . . . . . . . . . . . . . . . . . . . . 3 186 4-digit BCD data 16-bit binary data . . . . . . . . . . . . . . . . . . . . 3 188 32-bit binary data 8-digit BCD data . . . . . . . . . . . . . . . . . . . . 3 190 8-digit BCD data 32-bit binary data . . . . . . . . . . . . . . . . . . . . 3 192 16-bit data invert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 193 16-bit data complement of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 194 32-bit data complement of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 196 16-bit data absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 198 32-bit data absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 199

xi
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

F89 P89 F90 P90 F91 P91 F92 P92 F93 P93 F94 P94 F95 P95 F96 P96 F97 P97

EXT PEXT DECO PDECO SEGT PSEGT ENCO PENCO UNIT PUNIT DIST PDIST ASC PASC SRC PSRC DSRC PDSRC

16-bit data sign extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 200 Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 202 7-segment decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 206 Encode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 208 16-bit data combine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 212 16-bit data distribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 214 Character ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 216 16-bit data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 220 32-bit data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 222

Data shift instructions


F98 P98 F99 P99 F100 P100 F101 P101 F102 P102 F103 P103 F105 P105 F106 P106 F108 P108 F109 P109 F110 P110 F111 P111 F112 P112
xii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

CMPR PCMPR CMPW PCMPW SHR PSHR SHL PSHL DSHR PDSHR DSHL PDSHL BSR PBSR BSL PBSL BITR PBITR BITL PBITL WSHR PWSHR WSHL PWSHL WBSR PWBSR

Data table shift-out and compress . . . . . . . . . . . . . . . . . . . . . . . . 3 224 Data table shift-in and compress . . . . . . . . . . . . . . . . . . . . . . . . . 3 227 Right shift of multiple bits (n bits) in a 16-bit data . . . . . . . . . . . 3 230 Left shift of multiple bits (n bits) in a 16-bit data . . . . . . . . . . . . 3 232 Right shift of n bits in a 32-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 234 Left shift of n bits in a 32-bit data . . . . . . . . . . . . . . . . . . . . . . . . . 3 236 Right shift of one hexadecimal digit (4 bits) . . . . . . . . . . . . . . . . 3 238 Left shift of one hexadecimal digit (4 bits) . . . . . . . . . . . . . . . . . 3 240 Right shift of multiple bits of 16bit data range . . . . . . . . . . . . . 3 242 Left shift of multiple bits of 16bit data range . . . . . . . . . . . . . . 3 244 Right shift of one word (16 bits) of 16bit data range . . . . . . . . 3 246 Left shift of one word (16 bits) of 16bit data range . . . . . . . . . 3 248 Right shift of one hexadecimal digit (4-bit) of 16bit data range 3 250

Table of Contents

F113 P113

WBSL PWBSL

Left shift of one hexadecimal digit (4-bit) of 16bit data range 3 252

FIFO instructions
F115 P115 F116 P116 F117 P117 FIFT PFIFT FIFR PFIFR FIFW PFIFW FIFO buffer definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 254 Data read from FIFO buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 256 Data write to FIFO buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 260

Basic function instructions


F118 F119 UDC LRSR UP/DOWN counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 267 Left/right shift register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 270

Data rotate instructions


F120 P120 F121 P121 F122 P122 F123 P123 F125 P125 F126 P126 F127 P127 F128 P128 ROR PROR ROL PROL RCR PRCR RCL PRCL DROR PDROR DROL PDROL DRCR PDRCR DRCL PDRCL 16-bit data right rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 274 16-bit data left rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 276 16-bit data right rotation with carry flag data . . . . . . . . . . . . . . . 3 278 16-bit data left rotation with carry flag data . . . . . . . . . . . . . . . . 3 280 32-bit data right rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 282 32-bit data left rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 284 32-bit data right rotation with carry flag data . . . . . . . . . . . . . . . 3 286 32-bit data left rotation with carry flag data . . . . . . . . . . . . . . . . 3 288

Bit manipulation instructions


F130 P130 F131 P131 F132 P132 F133 P133 F135 P135 BTS PBTS BTR PBTR BTI PBTI BTT PBTT BCU PBCU 16-bit data bit set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 290 16-bit data bit reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 292 16-bit data bit invert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 294 16-bit data bit test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 296 Number of on (1) bits in 16-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 298

xiii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

F136 P136

DBCU PDBCU

Number of on (1) bits in 32-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 300

Basic function instruction


F137 STMR Auxiliary timer (16bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 302

Special instructions
F138 P138 F139 P139 F140 P140 F141 P141 F142 P142 F143 F143 P143 F144 HMSS PHMSS SHMS PSHMS STC PSTC CLC PCLC WDT PWDT IORF IORF PIORF TRNS Hours, minutes, and seconds data to seconds data . . . . . . . . . 3 305 Seconds data to hours, minutes, and seconds data . . . . . . . . . 3 307 Carry flag (R9009) set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 310 Carry flag (R9009) reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 311 Watching dog timer update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 312 Partial I/O update for FP0/FP0R/FPe/FP/FPX . . . . . . . . . 3 314 Partial I/O update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 316 Serial data communication for FP0/FPe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 318 for FP2/FP2SH/FP10SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 325 Data send (For MEWTOCOL master mode) . . . . . . . . . . . . . . . 3 335 Data send (For MODBUS master/MODBUS master mode) 3 339 Data send (MEWNET link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 350 Data receive (For MEWTOCOL master mode) . . . . . . . . . . . . . 3 360 Data receive (For MODBUS master/MODBUS master mode) 3 364 Data receive (MEWNET link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 376 Printout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 386 Self-diagnostic error set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 390 Message display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 392 Data read from intelligent unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 395 Data write into intelligent unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 398 Data read from MEWNET-F slave station . . . . . . . . . . . . . . . . . 3 401 Data write into MEWNET-F slave station . . . . . . . . . . . . . . . . . . 3 405 Sampling start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 409 Sampling stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 411

F145 P145 F146 P146 F147 F148 P148 F149 P149 F150 P150 F151 P151 F152 P152 F153 P153 F155 P155 F156 P156
xiv

SEND PSEND RECV PRECV PR ERR PERR MSG PMSG READ PREAD WRT PWRT RMRD PRMRD RMWT PRMWT SMPL PSMPL STRG PSTRG

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

F157 P157 F158 P158 F159 P159 F161 P161

CADD PCADD CSUB PCSUB MTRN PMTRN MRCV PMRCV

Time addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 413 Time substruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 416 Serial data communication for FP/FPX/FP0R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 420 for FP2/FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 428 Serial data reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 432

BIN arithmetic instructions


F160 P160 DSQR PDSQR 32-bit data square root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 435

Special instructions (Highspeed counter instructions)


F0 F1 F165 F166 F166 F166 F167 F167 F167 F168 F169 F170 F171 MV DMV CAM0 HC1S HC1S HC1S HC1R HC1R HC1R SPD1 PLS PWM SPDH Highspeed counter control for FP0/FP0R/FP/FPX . . . . . . 3 437 Pulse output control for FP0/FP0R/FPe/FP/FPX . . . . . . . 3 443 Writing and reading the highspeed counter and pulse output elapsed value for FP0/FP0R/FPe/FP/FPX . . . . . . . . . . . . . 3 449 Cam control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 454 Target value match on (with channel specification) . . . . . . . . **** Target value match on (Highspeed counter control) . . . . . . . . 3 464 Target value match on (Pulse output control) . . . . . . . . . . . . . . 3 467 Target value match off (with channel specification) . . . . . . . . **** Target value match off (Highspeed counter control) . . . . . . . . 3 473 Target value match off (Pulse output control) . . . . . . . . . . . . . . 3 476 Positioning control (trapezoidal control) . . . . . . . . . . . . . . . . . . . 3 479 Positioning control (home position return) . . . . . . . . . . . . . . . . . 3 483 Pulse output (with channel specification)(JOG operation) . . . . 3 488 PWM output (with channel specification) . . . . . . . . . . . . . . . . . . 3 491 Pulse output (with channel specification) (trapezoidal control) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 493 (home position return) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 498 Pulse output (trapezoidal control) . . . . . . . . . . . . . . . . . . . . . . . . 3 504 Pulse output (JOG positioning type 0) . . . . . . . . . . . . . . . . . . . . . 3 511 Pulse output (JOG positioning type 1) . . . . . . . . . . . . . . . . . . . . 3 516 Pulse output (with channel specification)(JOG operation) . . . . 3 521 Double word compare: Start equal Pulse output (JOG operation type 0 and 1) . . . . . . . . . . . . . . . . . . . . . . . . . . 3 525 PWM output (with channel specification) . . . . . . . . . . . . . . . . . **** Pulse output (with channel specification) (Selectable data table control operation) . . . . . . . . . . . . . . . . . 3 533 Pulse output (Arbiterary data table control operation) . . . . . . . 3 538
xv
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

F171

SPDH

F172 F172 F173 F174 F174

PLSH PLSH PWMH SP0H SP0H

Table of Contents

F175 F175 F176

SPSH SPSH SPCH

Pulse output (Linear interpolation) . . . . . . . . . . . . . . . . . . . . . . . 3 542 Pulse output (Linear interpolation) . . . . . . . . . . . . . . . . . . . . . . . 3 548 Pulse output (Circular interpolation) . . . . . . . . . . . . . . . . . . . . . . 3 553

Screen display instructions


F177 F178 F180 F181 F182 HOME PLSM SCR DSP FILTR Pulse output (Home return) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 557 Input pulse measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 561 FPe screen display registration . . . . . . . . . . . . . . . . . . . . . . . . . 3 565 FPe screen display switching . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 568 Time constant processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 569

Basic function instruction


F183 DSTM Auxiliary timer (32-bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 571

Data transfer instructions


F190 P190 F191 P191 MV3 PMV3 DMV3 PDMV3 Three 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 575 Three 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 577

Logic operation instructions


F215 P215 F216 P216 F217 P217 F218 P218 F219 P219 F230 P230 F231 P231 DAND PDAND DOR PDOR DXOR PDXOR DXNR PDXNR DUNI PDUNI TMSEC PTMSEC SECTM PSECTM 32-bit data AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 579 32-bit data OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 581 32-bit data XOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 583 32-bit data XNR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 585 32-bit data unites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 587 Time data Second Second conversion . . . . . . . . . . . . . . . . . . . . . . . . 3 589 Time data conversion . . . . . . . . . . . . . . . . . . . . . . . . 3 591

Data conversion instructions


F235 P235 F236 P236 F237 P237
xvi
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

GRY PGRY DGRY PDGRY GBIN PGBIN

16bit data Gray code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 593 32bit data Gray code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 594 16bit Gray code 16bit binary data . . . . . . . . . . . . . . . . . . . 3 595

Table of Contents

F238 P238 F240 P240 F241 P241 F250 F251 F252

DGBIN PDGBIN COLM PCOLM LINE PLINE BTOA ATOB ACHK

32bit Gray code 32bit binary data . . . . . . . . . . . . . . . . . . . . 3 596 Bit line to bit column conversion . . . . . . . . . . . . . . . . . . . . . . . . . 3 599 Bit column to bit line conversion . . . . . . . . . . . . . . . . . . . . . . . . . 3 601 Binary ASCII conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 603 ASCII Binary conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 608 ASCII data check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 613

Character string instructions


F257 P257 F258 P258 F259 P259 F260 P260 F261 P261 F262 P262 F263 P263 F264 P264 F265 P265 SCMP PSCMP SADD PSADD LEN PLEN SSRC PSSRC RIGHT PRIGHT LEFT PLEFT MIDR PMIDR MIDW PMIDW SREP PSREP Comparing character strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 617 Character string coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 619 Number of characters in a character string . . . . . . . . . . . . . . . . 3 621 Search for character string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 623 Retrieving data from character strings (right side) . . . . . . . . . . 3 625 Retrieving data from character strings (left side) . . . . . . . . . . . 3 627 Retrieving a character string from a character string . . . . . . . . 3 629 Writing a character string to a character string . . . . . . . . . . . . . 3 631 Replacing character strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 633

Integer type data processing instructions


F270 P270 F271 P271 F272 P272 F273 P273 F275 P275 F276 P276 F277 P277 MAX PMAX DMAX PDMAX MIN PMIN DMIN PDMIN MEAN PMEAN DMEAN PDMEAN SORT PSORT Maximum value search in 16-bit data table . . . . . . . . . . . . . . . . 3 635 Maximum value search in 32-bit data table . . . . . . . . . . . . . . . . 3 637 Minimum value search in 16-bit data table . . . . . . . . . . . . . . . . . 3 639 Minimum value search in 32-bit data table . . . . . . . . . . . . . . . . . 3 641 Total and mean numbers calculation in 16-bit data table . . . . . 3 643 Total and mean numbers calculation in 32-bit data table . . . . . 3 645 Sort data in 16-bit data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 647

xvii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

F278 P278 F282 P282 F283 P283 F284

DSORT PDSORT SCAL PSCAL DSCAL PDSCAL RAMP

Sort data in 32-bit data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 649 Scaling of 16-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 651 Scaling of 32-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 653 Inclination output of 16bit data . . . . . . . . . . . . . . . . . . . . . . . . . . 3 655

Integer type non-linear function instructions


F285 P285 F286 P286 F287 P287 F288 P288 F289 P289 F290 P290 LIMT PLIMT DLIMT PDLIMT BAND PBAND DBAND PDBAND ZONE PZONE DZONE PDZONE 16-bit data upper and lower limit control . . . . . . . . . . . . . . . . . . . 3 657 32-bit data upper and lower limit control . . . . . . . . . . . . . . . . . . . 3 659 16-bit data deadband control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 661 32-bit data deadband control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 663 16-bit data zone control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 665 32-bit data zone control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 667

BCD type real number operation instructions


F300 P300 F301 P301 F302 P302 F303 P303 F304 P304 F305 P305 BSIN PBSIN BCOS PBCOS BTAN PBTAN BASIN PBASIN BACOS PBACOS BATAN PBATAN BCD type Sine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 669 BCD type Cosine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 671 BCD type Tangent operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 673 BCD type Arcsine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 675 BCD type Arccosine operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 677 BCD type Arctangent operation . . . . . . . . . . . . . . . . . . . . . . . . . . 3 679

Floating point type real number operation instructions (for FP2/FP2SH/FP10SH)


F309 P309 F310 P310 F311 P311 F312 P312
xviii
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FMV PFMV F+ PF+ F PF F* PF*

Floating point data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 681 Floating point data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 683 Floating point data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 685 Floating point data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . 3 687

Table of Contents

F313 P313 F314 P314 F315 P315 F316 P316 F317 P317 F318 P318 F319 P319 F320 P320 F321 P321 F322 P322 F323 P323 F324 P324 F325 P325 F326 P326 F327 P327 F328 P328 F329 P329 F330 P330 F331 P331 F332 P332 F333 P333 F334 P334 F335 P335

F% PF% SIN PSIN COS PCOS TAN PTAN ASIN PASIN ACOS PACOS ATAN PATAN LN PLN EXP PEXP LOG PLOG PWR PPWR FSQR PFSQR FLT PFLT DFLT PDFLT INT PINT DINT PDINT FIX PFIX DFIX PDFIX ROFF PROFF DROFF PDROFF FINT PFINT FRINT PFRINT F+/ PF+/

Floating point data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 689 Floating point data Sine operation . . . . . . . . . . . . . . . . . . . . . . . . 3 691 Floating point data Cosine operation . . . . . . . . . . . . . . . . . . . . . 3 693 Floating point data Tangent operation . . . . . . . . . . . . . . . . . . . . . 3 695 Floating point data Arcsine operation . . . . . . . . . . . . . . . . . . . . . 3 697 Floating point data Arccosine operation . . . . . . . . . . . . . . . . . . . 3 699 Floating point data Arctangent operation . . . . . . . . . . . . . . . . . . 3 701 Floating point data natural logarithm . . . . . . . . . . . . . . . . . . . . . . 3 703 Floating point data exponent . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 705 Floating point data logarithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 707 Floating point data power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 709 Floating point data square root . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 711 16-bit integer data Floating point real number data . . . . . . . 3 713 32-bit integer data Floating point real number data . . . . . . . 3 715 Floating point real number data 16-bit integer data (largest integer not exceeding the floating point real number data) . . . 3 717 Floating point real number data 32-bit integer data (largest integer not exceeding the floating point real number data) . . 3 719 Floating point real number data 16-bit integer data (rounding the first decimal point down to integer) . . . . . . . . . . . 3 721 Floating point real number data 32-bit integer data (rounding the first decimal point down to integer) . . . . . . . . . . . 3 723 Floating point real number data 16-bit integer data (rounding the first decimal point off to integer) . . . . . . . . . . . . . 3 725 Floating point real number data 32-bit integer data (rounding the first decimal point off to integer) . . . . . . . . . . . . . 3 727 Floating point real number data rounding the first decimal point down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 729 Floating point real number data rounding the first decimal point off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 731 Floating point real number data sign changes . . . . . . . . . . . . . . 3 733

xix
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Contents

F336 P336 F337 P337 F338 P338

FABS PFABS RAD PRAD DEG PDEG

Floating point real number data absolute . . . . . . . . . . . . . . . . . . 3 735 Floating point real number data conversion of angle units (Degrees Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 737 Floating point real number data conversion of angle units (Radians Degrees) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 739

Floating point type real number data processing instructions


F345 P345 F346 P346 F347 P347 F348 P348 F349 P349 F350 P350 F351 P351 F352 P352 F353 P353 F354 P354 FCMP PFCMP FWIN PFWIN FLIMT PFLIMT FBAND PFBAND FZONE PFZONE FMAX PFMAX FMIN PFMIN FMEAN PFMEAN FSORT PFSORT FSCAL PFSCAL Floating point real number data comparison . . . . . . . . . . . . . . . 3 741 Floating point real number data band comparison . . . . . . . . . . 3 743 Floating point data upper and lower limit control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 745 Floating point real number data deadband control . . . . . . . . . . 3 747 Floating point real number data zone control . . . . . . . . . . . . . . 3 749 Maximum value search in floating point real number data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 751 Minimum value search in floating point real number data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 753 Total and mean numbers calculation in floating point real number data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 755 Sort data in real number floating point data table . . . . . . . . . . . 3 757 Scaling of real number data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 759

Time series processing instruction


F355 F356 PID EZPID PID processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 761 Easy PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 768

Compare instructions
F373 P373 F374 P374 DTR PDTR DDTR PDDTR 16-bit data revision detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 776 32-bit data revision detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 778

Index register bank processing instructions


F410 P410 F411 P411
xx
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

SETB PSETB CHGB PCHGB

Setting the index register bank number . . . . . . . . . . . . . . . . . . . 3 780 Changing the index register bank number . . . . . . . . . . . . . . . . . 3 782

Table of Contents

F412 P412

POPB PPOPB

Restoring the index register bank number . . . . . . . . . . . . . . . . . 3 784

File register bank processing instructions


F414 P414 F415 P415 F416 P416 SBFL PSBFL CBFL PCBFL PBFL PPBFL Setting the file register bank number . . . . . . . . . . . . . . . . . . . . . 3 785 Changing the file register bank number . . . . . . . . . . . . . . . . . . . 3 786 Restoring the file register bank number . . . . . . . . . . . . . . . . . . . 3 787

xxi
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Chapter 1 Relays, Memory Areas and Constants

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.1
1.1.1
FP0
Item

Table of Relays, Memory Areas and Constants


FP0/FPe

Numbering C10/C14 C32/SL1 T32C /C16

Function

Relay

External input relay External output relay Internal relay (* Note 2) Timer (* Note 2) Counter (* Note 2) Special internal relay

(X) 208 points (X0 to X12F) (Y) 208 points (Y0 to Y12F) (R) 1,008 points (R0 to R62F) (T) 144 points (T0 to T99/C100 to C143) ( ) (* N t 1) Note (C) (R) 64 points (R9000 to R903F) (WX) 13 words (WX0 to WX12) (WY) 13 words (WY0 to WY12) (WR) 63 words (WR0 to WR62) (DT) 1,660 words (DT0 to DT1659) 6,144 words (DT0 to DT6143)

Turns on/off based on external input. Externally outputs on/off state. Relay which turns on/off only within program. If a TM instruction has timed out, the contact with the same number turns on. If a CT instruction has counted up, the contact with the same number turns on. Relay which turns on/off based on specific conditions and is used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data.

Memory area a ea

External input relay External output relay Internal relay (* Note 2) Data register (* Note 2)

16,384 Data memory used in program. Data is words handled in 16bit units (one word). (DT0 to DT16383) Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. 112 words Data memory for storing specific data. (DT90000 Various settings and error codes are to stored. DT90111) Register can be used as an address of memory area and constants modifier.

Timer/Counter set value area (* Note 2) Timer/Counter elapsed value area (* Note 2) Special data register

(SV) 144 words (SV0 to SV143) (EV) 144 words (EV0 to EV143) (DT) 112 words (DT9000 to DT9111)

Index register Control instruc instruction i point Master control relay points (MCR)

(I) 2 words (IX, IY) 32 points 64 labels 128 stages 255 labels 704 stages (* Note 1) 100 subroutines

Number of labels (JP and LOOP) Number of step ladders

Number of subroutines Number of interrupt programs

16 subroutines

7 programs (external 6 points, internal 1 point) SL1: 1 program (internal 1 point)

1-2
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

Item

Numbering C10/C14 C32/SL1 T32C /C16

Function

Constant Decimal constants t t Hexadecimal constants t t Floating p g point type t pe

( ) (K) K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation) ( ) (H) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) ( ) (F) F1.1754941038 to F3.4028231038 F1.1754941038 to F3.4028231038

Notes 1) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are the numbers when system register 5 is at its default setting. 2) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing form the RUN mode to PROG. mode, and the nonhold type that resets them. For the FP0 T32C, the selection of hold type and nonhold type can be changed by the setting of system register. These areas can be spcified as hold type or nonhold type by setting system register. For the FP0 C10/C14/C16/C32/SL1, that area is fixed and allotted the numbers as shown below. Hold type and Non-hold type areas
Item Timer Counter Non-hold type Hold type Internal relay Non-hold type C10/C14/C16 Nonhold type: All points From the set value to C139 4 points (elapsed values) (C140 to C143) 976 points (R0 to R60F) 61 words (WR0 to WR60) Hold type Data register eg s e Non-hold type Hold type 32 points (R610 to R62F) 2 words (WR61 to WR62) 1652 words (DT0 to DT1651) 8 words (DT1652 to DT1659) From the set value to C127 16 points (elapsed values) C128 to C143 880 points (R0 to R54F) 55 words (WR0 to WR54) 128 points (R550 to R62F) 8 words (WR55 to WR62) 6112 words (DT0 to DT6111) 32 words (DT6112 to DT6143) C32/SL1

1-3
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

FPe
Item
External input relay (see note 3) External output relay (see note 3) Internal relay (see note 2) Timer (see notes 1 and 2) Counter (see notes 1 and 2) Special internal relay

Number of points
208

Memory area available for use Matsushita


X0X12F

Function
Turns on or off based on external input. Outputs on or off state externally. Turns on or off only within a program. Turns on when the timer reaches the specified time. Corresponds to the timer number. Turns on when the counter increments. Corresponds to the counter number. Turns on or off based on specific conditions. Used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Data memory used in a program. Data is handled in 16-bit units (one word). Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. Data memory for storing specific data. Various settings and error codes are stored. Used as an address of memory area and constants modifier.

IEC
%IX0.0 %IX12.15 %QX0.0 %QX12.15 %MX0.0 %MX0.62.15 %MX1.0 %MX1. 99/ %MX2.100 %MX2.143 %MX2.100 %MX2.143/ %MX1.0 %MX1.99 %MX0.900.0 %MX0.903.15 %IW0 %IW12

208 1008

Y0Y12F R0R62F

100

Relay

T0T99/ C100C143 C100C143/ T0T99 R9000R903F

44

64

External input relay (see note 3)

13 words

WX0WX12

External output relay (see note 3) Internal relay (see note 2) Data register (see note 2) Timer/counter set value area

13 words

WY0WY12

%QW0 %QW12 %MW0.0 %MW0.62 %MW5.0 %MW5.1659 %MW3.0 %MW3.143

63 words 1660 words

WR0WR62 DT0DT1659

Memor area (wo ory words)

144 words

SV0SV143

Timer/counter elapsed value area (see note 2)

144 words

EV0EV143

%MW4.0 %MW4.143

Special data register Index register

112 words

DT9000 DT9111 IXIY

%MW5.9000 %MW5.9111 %MW6.0 %MW6.1

2 words

1-4
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

Item
External input relay (see note 3) External output relay (see note 3) Me Memory area (double word) (see note 4) a w ee Internal relay (see note 2) Data register (see note 2) Timer/counter set value area

Number of points
6 double words 6 double words 31 double words 830 double words 72 double words

Memory area available for use Matsushita


DWX0DWX11

Function
Code for specifying 32 external input points as a double word (32 bits) of data. Code for specifying 32 external output points as double word (32 bits) of data. Code for specifying 32 internal relay points as double word (32 bits) of data. Data memory used in a program. Data is handled in 32-bit units (double word). Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. Data memory for storing specific data. Various settings and error codes are stored. Used as an address of memory area and constants modifier.

IEC
%ID0 %ID11 %QD0 %QD11 %MD0.0 %MD0.61 %MD5.0 %MD5.1658 %MD3.0 %MD3.142

DWY0DWY11

DWR0DWR61

DDT0 DDT1658 DSV0DSV142

Timer/counter 72 double elapsed value area (see words note 2) Special data register Index register 56 double words 1 double words

DEV0DEV142

%MD4.0 %MD4.142

DDT9000 DDT9110 DI0

%MD5.9000 %MD5.9110 %MD6.0

Item
Contr ins trol nstructi po tion oint Master control relay points (MCR) 32 points Number of labels (JP and LOOP) Number of step ladders Number of subroutines Number of interrupt programs 64 labels 128 stages 16 subroutines

Number of points

7 programs (external: 6, internal: 1)

Item Matsushita
Decimal constants

Range available for use g IEC


32768 to 32767 (for 16-bit operation) 2147483648 to 2147483647 (for 32-bit operation) 16#0 to 16#FFFF (for 16-bit operation) 16#0 to 16#FFFFFFFF (for 32-bit operation) 1.17549410E38 to 3.402823E38 1.17549410E38 to 3.402823E38 K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation)

C Constan ant

Hexadecimal constants

H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) F1.1754941038 to F3.4028231038 F1.1754941038 to F3.4028231038

Floating point type

1-5
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Notes

1) The points for the timer and counter can be changed by the setting of System register No. 5. The number given in the table above are the numbers when System register No. 5 is at its default setting. 2) There are two unit types; the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the nonhold type that resets them. These areas can be specified as hold type or nonhold type by setting system register. For the FPe, that area is fixed and allotted the numbers as shown in the table below. For the FPe with clock/calendar function type, the selection of hold type and nonhold type can be changed by the setting of system register. 3) The number of points noted above is the number reserved in the system. For the actual number of points available for use, refer to I/O Allocation in Appendix A. 4) Double words cannot be specified with FPWIN GR. Hold type and nonhold type areas*1
Model AFPE224300 AFPE224305 (Standard type) (Calendar timer type)
Nonhold type: all points Non-hold type Hold type yp Internal relay e ay Non-hold type Hold type Data register i t Non-hold type Hold type From the set value to C139 C140 to C143, EV140 to EV143 (elapsed value) SV: nonhold *2 SV: hold 976 points (R0 to R60F) 61 words (WR0 to WR60) 32 points (R610 to R62F) 2 words (WR61 to WR62) 1652 words (DT0 to DT1651) 8 words (DT1652 to DT1659)

AFPE214325 (Thermocouple input type)

Timer Counter

*1 When a battery is installed in a calendar timer type FPe, the areas above can be changed using the system register. If a battery is not installed, the data cannot be stored even when the settings are changed using the system register. *2 Use the following methods for holding the SV data: Set the transfer instruction for the special data register (DT) to hold the data. Then, perform the setting so that the data can be transferred from DT to SV after the RUN mode starts. Use the FPe model with a battery.

1-6
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.2
Item

FP0R
Number of points and range of memory area available for use C10, C14, C16 C32, T32, F32
Turns on or off based on external input. Externally outputs on or off state Relay which turns on or off only within program. This relay is a shared relay used for PLC link. This goes on when the timer reaches the specified time. It corresponds to the timer number. This goes on when the counter increments. It corresponds to the counter number. Relay which turns on or off based on specific conditions and is used as a flag. Code for speciyfying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data. External input (X) Note1) External output (Y)
Note1)

Function

Relay

1760 points (X0 to X109F) 1760 points (Y0 to Y109F) 4096 points (R0 to R255F) 2048 points (L0 to L127F) 1024 points (T0 to T1007/C1008 to C1023) Note3) 224 points (from R9000) 110 words (WX0 to WX109)

Internal relay (R) Note2) Link relay (L)


Note2) Note2) Note2)

Timer (T) Counter (C) Special internal relay (R) Memory area External input (WX) Note1)

External out110 words (WY0 to WY109) put (WY) Note1) Internal relay (WR) Note2) Link relay (WL) Data register (DT) Note2) Link register (LD) Note2) Timer/Counter set value area (SV) Note2) Timer/Counter elapsed value area (EV)
Note2)

256 words (WR0 to WR255) 128 words (WL0 to WL127)

12315 words 32765 words Data memory used ind program. Data is han(DT0 to DT12314) (DT0 to DT32764) dled in 16bit units (one word). 256 words (LD0 to LD255) This is a shared data memory which is used within the PLC link. Data is handled in 16bit units (one word). Data memory for storing a target value of a timer and setting value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. Data memory for storing specific data. Various settings and error codes are stored. Register can be used as an address of memory area and constants modifier.

1024 words (SV0 to SV1023)

1024 words (EV0 to EV1023)

Special data register (DT) Index register (I)

440 words (DT90000 to DT90439) 14 words (I0 to ID)

1-7
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item

Number of points and range of memory area available for use C10, C14, C16 C32, T32, F32
Master control 256 points relay points (MCR) Number of labels (JP and LOOP) Number of step ladders Number of subroutines Number of interrupt programs 256 points

Function

Control instruction point

1000 stages 500 subroutines C10: 11 programs (6 external input points, 1 periodical interrupt point, 4pulse match points) Other than C10: 13 programs (8 external input points, 1 periodical interrupt point, 4pulse match points) K32, 768 to K32, 767 (for 16bit operation) K2, 147, 483, 648 to K2, 147, 483, 647 (for 32bit operation) H0 to HFFFF (for 16bit operation) H0 to HFFFFFFFF (for 32bit operation) F1.1754941038 to F3.4028231038 F1.1754941038 to F3.4028231038

Constant Decimal constants (K) Hexadecimal constants (H) Floating p g point type (F) t

Notes

1) The number of points noted above is the number reserved as the calculation memory. The actual number of points available for use is determined by the hardware configuration. 2) There are two types, one is the hold type that the last state is stored even if the power supply turns off or the mode is changed to PROG. mode from RUN mode, and the other is the nonhold type that the state is reset. For C10/C14/C16/C32: The hold type areas and nonhold type areas are fixed. For information on the sections of each area, refer to the performance specifications. For T32/F32: The settings of the hold type areas and nonhold type areas can be changed using the system registers. On T32, if the battery has run out, the data in the hold area may be indefinite (Not cleared to 0) 3) The points for the timer and counter can be changed by the setting of system register 5. The number given in the table are the numbers when system register 5 is at its default setting.

1-8
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.3
12k type

FP

Item
External input relay (see note 1) FPGC32T/C32TTM External input relay (see note 1) FPGC32T2/C32T2TM FPGC24R2/C24R2TM FPGC28P2 External output relay (see note 1) FPGC32T/C32TTM External output relay (see note 1) FPGC32T2/C32T2TM FPGC24R2/C24R2TM FPGC28P2 Internal relay (see note 2) Link relay (see note 2) Timer (see notes 2 and 3) Counter (see notes 2 and 3) Special internal relay External input relay (see note 1) FPGC32T/C32TTM External input relay (see note 1) FPGC32T2/C32T2TM FPGC24R2/C24R2TM FPGC28P2 External output relay (see note 1) FPGC32T/C32TTM External output relay (see note 1) FPGC32T2/C32T2TM FPGC24R2/C24R2TM FPGC28P2 Internal relay (see note 2) Link relay

Number of points
512

Memory area available for use


X0X31F

Function
Turns on or off based on external input.

1184

X0X73F

512

Y0Y31F

Externally outputs on or off state.

1184

Y0Y73F

Rel elay

1568 1024 1024

R0R97F L0L63F T0T1007/C1008C1023

Turns on or off only within a program. Shared relay used for PLC link. Goes on when the timer reaches the specified time. Corresponds to the timer number. Goes on when the counter increments. Corresponds to the counter number. Turns on or off based on specific conditions. Used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. )

1024

C1008C1023/T0T1007

176 32 words

R9000R910F WX0WX31

74 words

WX0WX73

Mem mory area (wo words)

32 words

WY0WY31

Code for specifying 16 external output points as one word (16 bits) of data. )

74 words

WY0WY73

98 words 64 words

WR0WR97 WL0WL63

Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data.

1-9
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item
Data register (see note 2) Link data register (see note 2)

Number of points
32765 words

Memory area available for use


DT0DT32764

Function
Data memory used in a program. Data is handled in 16-bit units (one word). A shared data memory which is used within the PLC link. Data is handled in 16-bit units (one word). Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. Data memory for storing specific data. Various settings and error codes are stored. Can be used as an address of memory area and constants modifier.

128 words

LD0LD127

M Memory area (words) ea

Timer/counter set value area (see note 2) Timer/counter elapsed value area (see note 2)

1024 words

SV0SV1023

1024 words

EV0EV1023

Special data register Index register

260 words

DT90000DT90259

14 words

I0ID

Item
C ntrol Cont l instru ion point ructio p nt Master control relay points (MCR) Number of labels (JP and LOOP) Number of step ladders Number of subroutines Number of interrupt programs 256 256 1,000 stages 100 subroutines

Number of points

9 programs (8 external input points X0 to X7, 1 periodical interrupt point 0.5 ms to 30s)

Item
Decimal constants (integer t (i t type) ) Co stant Const t Hexadecimal constants t t Floating point type

Range available for use


K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) F1.1754941038 to F3.4028231038 F1.1754941038 to F3.4028231038

Notes

1) The number of points noted above is the number reserved as the calculation memory. The actual number of points available for use is determined by the hardware configuration. 2) If no battery is used, only the fixed area is backed up (counters 16 points: C1008 to C1023, internal relays 128 points: R900 to R97F, data registers: DT32710 to DT32764). When the optional battery is used, data can be backed up. Areas to be held and not held can be specified using the system registers. 3) The points for the timer and counter can be changed by the setting of system register 5. The number given in the table are the numbers when system register 5 is at its default setting.

1 - 10
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

32k type
Item Number of points and range of memory area available for use 32TH/C32THTM C32T2H/C32T2HTM C24R2H/C24R2HTM C28P2H/C28P2HTM
External input (see note 1) (X) External output (see note 1) (Y) Internal relay (see note 2) (R) Relay ay Link relay (see note 2) (L) Timer (see note 2) (T) 1184 points (X0 to X73F) 1184 points (Y0 to Y73F) 4096 points (R0 to R255F) 2048 points (L0 to R127F) 1024 points (T0 to T1007/C1008 to C1023) (see note 3) ( ) Turns on or off based on external input. Externally outputs on or off state. Relay which turns on or off only within program. This relay is a shared relay used for PLC link. This goes on when the timer reaches the specified time. It corresponds to the timer number. This goes on when the counter increments. It corresponds to the counter number. 176 points (R9000 to R910F) 74 words (WX0 to WX73) 74 words (WY0 to WY73) 256 words (WR0 to WR255) 128 words (WL0 to WL127) 32765 words (DT0 to DT32764) 256 words (LD0 to LD255) Relay which turns on or off based on specific conditions and is used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data. Data memory used in program. Data is handled in 16bit units (one word). This is a shared data memory which is used within the PLC link. Data is handled in 16bit units (one word). Data memory for storing a target value of a timer and setting value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. Data memory for storing specific data. Various settings and error codes are stored. Register can be used as an address of memory area and constants modifier.

Function

Counter (see note 2) (C) Special internal relay (R) External input (see note 1) (WX) External output (see note 1) (WY) Internal relay (see note 2) (WR) Link relay (WL) Data register (see note 2) (DT) Link register (see note 2) (LD) Mem mory area a Timer/Counter set value area (see note 2) (SV) Timer/Counter elapsed value area (see note 2) (EV) Special data register (DT) Index register (I)

1024 words (SV0 to SV1023)

1024 words (EV0 to EV1023)

260 words (DT90000 to DT90259)

14 words (I0 to ID)

1 - 11
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item

Number of points and range of memory area available for use 32TH/C32THTM C32T2H/C32T2HTM C24R2H/C24R2HTM C28P2H/C28P2HTM

Function

Master control relay points (MCR) Co Control l in instruc p ction point Number of labels (JP and LOOP) Number of step ladders Number of subroutines Number of interrupt programs Decimal constants (integer t (i t type) (K) ) Co stant Const t Hexadecimal constants (H) t t Floating point type (F)

256 256 1,000 stages 100 subroutines 9 programs (8 external input points X0 to X7, 1 periodical interrupt point 0.5 ms to 30s) K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) F1.1754941038 to F3.4028231038 F1.1754941038 to F3.4028231038

Notes

1) The number of points noted above is the number reserved as the calculation memory. The actual number of points available for use is determined by the hardware configuration. 2) If no battery is ued, only the fixed area is backed up. (counters 16 points: C1008 to C1023, internal relays 128 points: R2480 to R255F, data registers 55 words: DT32710 to DT32764). Writing is available up to 10000 times. Then the optional battery is used, all area can be backed up. Areas to be held and not held can be specified using the system registers. If an area is held when the battery is not installed, the value of data may be indefinite as it is not cleared to 0 when the power is turned on. When the battery ran out of the power, the data at the hold area will be indefinite. 3) Note3)The points for the timer and counter can be changed by the setting of system register 5. The number given in the table are the numbers when system register 5 is at its default setting.

1 - 12
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.4
Item

FPX
Number of points and range of memory area available for use C14 C30, C60
Turns on or off based on external input. Externally outputs on or off state Relay which turns on or off only within program. This relay is a shared relay used for PLC link. This goes on when the timer reaches the specified time. It corresponds to the timer number. This goes on when the counter increments. It corresponds to the counter number. Relay which turns on or off based on specific conditions and is used as a flag. Code for speciyfying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data. External input (X) Note1) External output (Y)
Note1)

Function

Relay

1760 points (X0 to X109F) 1760 points (Y0 to Y109F) 4096 points (R0 to R255F) 2048 points (L0 to L127F) 1024 points (T0 to T1007/C1008 to C1023) Note3) 192 points (R9000 to R911F) 110 words (WX0 to WX109)

Internal relay (R) Note2) Link relay (L)


Note2) Note2) Note2)

Timer (T) Counter (C) Special internal relay (R) Memory area External input (WX) Note1)

External out110 words (WY0 to WY109) put (WY) Note1) Internal relay (WR) Note2) Link relay (WL) Data register (DT) Note2) Link register (LD) Note2) Timer/Counter set value area (SV) Note2) Timer/Counter elapsed value area (EV)
Note2)

256 words (WR0 to WR255) 128 words (WL0 to WL127)

12285 words 32765 words Data memory used ind program. Data is han(DT0 to DT12284) (DT0 to DT32764) dled in 16bit units (one word). 256 words (LD0 to LD255) This is a shared data memory which is used within the PLC link. Data is handled in 16bit units (one word). Data memory for storing a target value of a timer and setting value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/counter number. Data memory for storing specific data. Various settings and error codes are stored. Register can be used as an address of memory area and constants modifier.

1024 words (SV0 to SV1023)

1024 words (EV0 to EV1023)

Special data register (DT) Index register (I)

374 words (DT90000 to DT90373) 14 words (I0 to ID)

1 - 13
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item

Number of points and range of memory area available for use C14 C30, C60
Differential points Master control relay points (MCR) Number of labels (JP and LOOP) Number of step ladders Number of subroutines Number of interrupt programs Unlimited points 256 points

Function

Control instruc instruction i point

256 points

1000 stages 500 subroutines Input 14 programs, periodical interrupt 1 program

Constant Decimal constants (K) Hexadecimal constants (H) Floating p g point type (F) t

K32, 768 to K32, 767 (for 16bit operation) K2, 147, 483, 648 to K2, 147, 483, 647 (for 32bit operation) H0 to HFFFF (for 16bit operation) H0 to HFFFFFFFF (for 32bit operation) F1.1754941038 to F3.4028231038 F1.1754941038 to F3.4028231038

Notes

1) The number of points noted above is the number reserved as the calculation memory. The actual number of points available for use is determined by the hardware configuration. 2) If no battery is used, only the fixed area is backed up. (counters 16 points: C1008 to C1023, internal relays 128 points: R2470 to R255F, data registers 55 words, C14: DT12230 to DT12284, C30/C60: DT32710 to DT32764). Writing is available up to 10000 times. Then the optional battery is used, all area can be backed up. Areas to be held and not held can be specified using the system registers. If an area is held when the battery is not installed, the value of data may be indefinite as it is not cleared to 0 when the power is turned on. When the battery ran out of the power, the data at the hold area will be indefinite. 3) The points for the timer and counter can be changed by the setting of system register 5. The number given in the table are the numbers when system register 5 is at its default setting.

1 - 14
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.5
Item
Relay

FP2
Numbering
External input relay External output relay Internal relay (* Note 1) Link relay (* Note 1) Timer (* Notes 1 and 2) Counter (* Notes 1 and 2) Pulse relay (X) 2,048 points (X0 to X127F) (Y) 2,048 points (Y0 to Y127F) (R) 4,048 points (R0 to R252F) (L) 2,048 points (L0 to L127F) (T) 1,024 points , p (T0 to T999/ C1000 to C1023) t t (C) (P) 1,024 points (P0 to P63F) (R) 176 points (R9000 to R910F) (WX) 128 words (WX0 to WX127) (WY) 128 words (WY0 to WY127) (WR) 253 words (WR0 to WR252) (WL) 128 words (WL0 to WL127) (DT) 6,000 words (DT0 to DT5999) (LD) 256 words (LD0 to LD255) (SV) 1,024 words (SV0 to SV1023) (EV) 1,024 words (EV0 to EV1023) (FL) FP2 (16 K): 0 to 14,333 words (FL0 to FL14332) FP2 (32 K) (when expanded): 0 to 30,717 words (FL0 to FL30716) Special data register Index register (DT) 256 words (DT90000 to DT90255) (I) 14 words (I0 to ID) Data memory for storing specific data. Various settings and error codes are stored. Register can be used as an address of memory area and constants modifier.

Function
Turn on or off based on external input. Externally outputs on or off state. Relay which turns on or off only within program. This relay is a shared relay used for MEWNET link system. If a TM instruction has timed out, the con, tact ith the t t with th same number turns on. b t If a CT instruction has counted up, the conp, tact ith the t t with th same number turns on. b t This relay is used to turn on only for one scan duration programmed with the OT" and OT# instructions. Relay which turns on or off based on specific conditions and is used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data. Data memory used in program. Data is handled in 16-bit units (one word). This is a shared data memory which is used within the MEWNET link system. Data is handled in 16-bit units (one word). Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/ counter number. Data memory used in program. Data is handled in 16-bit units (one word).

Special internal relay Memory area External input relay External output relay Internal relay Link relay Data register (* Note 1) Link data register (* Note 1) Timer/Counter set value area (* Note 1) Timer/Counter elapsed value area (* Note 1) File register (* Notes 1 and 3)

1 - 15
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item
Control instruction ti point Master control relay points (MCR)

Numbering
256 points

Number of labels (JP and Total: 256 points LOOP) Number of step ladder (* Note 4) Number of subroutine Number of interrupt program 1,000 steps 100 subroutines 1 program (periodical interrupt: allows setting of the time interval within the range from 0.5ms to 1.5s) ( ) (K) ( ) (H) (f) K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation) Hexadecimal constants Floating point type H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) f1.1754941038 to f3.4028231038 f1.1754941038 to f3.4028231038

Constant Decimal constants

Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting. 3) The size of the file register varies depending on the settings of system registers 0, 1 and 2. 4) Hold or non-hold type can be set using the system registers.

1 - 16
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.6

FP2SH

Item
Relay External input relay External output relay Internal relay (* Note 1) Link relay (* Note 1) Timer (* Notes 1 and 2) Counter (* Notes 1 and 2) Pulse relay ( ) (C)

Numbering
(X) 8,192 points (X0 to X511F) (Y) 8,192 points (Y0 to Y511F) (R) 14.192 points (R0 to R886F) (L) 10,240 points (L0 to L639F) ( ) (T) 3,072 points , p

Function
Turn on or off based on external input. Externally outputs on or off state. Relay which turns on or off only within program. This relay is a shared relay used for MEWNET link system.

If a TM instruction has timed out, the concon ( (T0 to T2999/ C3000 to C3071) tact with the same number turns on. ) If a CT instruction has counted up, the concon tact with the same number turns on This relay is used to turn on only for one scan duration programmed with the OT" and OT# instructions. If turned on while the unit is running, this relay stores the history in a dedicated buffer. Program this relay so that it is turned on at the time of abnormality.

(P) 2,048 points (P0 to P127F)

Error alarm relay

(E) 2,048 points (E0 to E2047)

Special internal relay Memory area External input relay External output relay Internal relay Link relay Data register (* Note 1) Link data register (* Note 1) Timer/Counter set value area (* Note 1) Timer/Counter elapsed value area (* Note 1) File register (* Note 1)

(R) 176 points (R9000 to R910F) (WX) 512 words (WX0 to WX511) (WY) 512 words (WY0 to WY511) (WR) 887 words (WR0 to WR886) (WL) 640 words (WL0 to WL639) (DT) 10,240 words (DT0 to DT10239) (LD) 8,448 words (LD0 to LD8447)

Relay which turns on or off based on specific conditions and is used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data. Data memory used in program. Data is handled in 16-bit units (one word). This is a shared data memory which is used within the MEWNET link system. Data is handled in 16-bit units (one word). Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/ counter number. Data memory used in program. Data is y p g handled i 16 bit it ( h dl d in 16-bit units (one word). d)

(SV) 3,072 words (SV0 to SV3071) (EV) 3,072 words (EV0 to EV3071) (FL) 98,295 words , (32,765 words 3 banks )

1 - 17
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item
Memory area Special data register Index register Control instrucinstruc tion point Master control relay points (MCR) Number of labels (JP and LOOP) Number of step ladder (* Note 3) Number of subroutine Number of interrupt program Constant Decimal constants Hexadecimal constants Floating point type ( ) (K) ( ) (H) (f) (DT)

Numbering
512 words (DT90000 to DT90511) 14 words 16 banks (I0 to ID)

Function
Data memory for storing specific data. Various settings and error codes are stored. Register can be used as an address of memory area and constants modifier.

(I)

256 points (For FP2C3P: 1st program: 256 points/2nd program: 256 points) 256 points (For FP2C3P: 1st program: 256 points/2nd program: 256 points) 1,000 steps (For FP2C3P: 1st program only) 100 subroutines 1 program (periodical interrupt: allows setting of the time interval within the range from 0.5ms to 1.5s) (For FP2C3P: 1st program only) K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) f1.1754941038 to f3.4028231038 f1.1754941038 to f3.4028231038

Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting. 3) Hold or non-hold type can be set using the system registers.

1 - 18
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.7
Item
Relay

FP10SH
Numbering
External input relay External output relay Internal relay (* Note 1) Link relay (* Note 1) Timer (* N Notes 1 and 2) d Counter (* Notes 1 and 2) Pulse relay (X) 8,192 points (X0 to X511F) (Y) 8,192 points (Y0 to Y511F) (R) 14,192 points (R0 to R886F) (L) 10,240 points (L0 to L639F) (T) 3,072 points ( (T0 to T2999/ C3000 to C3071) ) (C) (P) 2,048 points (P0 to P127F)

Function
Turn on or off based on external input. Externally outputs on or off state. Relay which turns on or off only within program. This relay is a shared relay used for MEWNET link system. If a TM instruction has timed out, the , contact with the same number turns on. t t ith th b t If a CT instruction has counted up, the p, contact with the same number turns on. t t ith th b t This relay is used to turn on only for one scan duration programmed with the OT" and OT# instructions. If turned on while the unit is running, this relay stores the history in a dedicated buffer. Program this relay so that it is turned on at the time of abnormality.

Error alarm relay

(E) 2,048 points (E0 to E2047)

Special internal relay Memory area External input relay External output relay Internal relay Link relay Data register (* Note 1) Link data register (* Note 1)

(R) 176 points (R9000 to R910F) (WX) 512 words (WX0 to WX511) (WY) 512 words (WY0 to WY511) (WR) 887 words (WR0 to WR886) (WL) 640 words (WL0 to WL639) (DT) 10,240 words (DT0 to DT10239) (LD) 8,448 words (LD0 to LD8447)

Relay which turns on or off based on specific conditions and is used as a flag. Code for specifying 16 external input points as one word (16 bits) of data. Code for specifying 16 external output points as one word (16 bits) of data. Code for specifying 16 internal relay points as one word (16 bits) of data. Code for specifying 16 link relay points as one word (16 bits) of data. Data memory used in program. Data is handled in 16-bit units (one word). This is a shared data memory which is used within the MEWNET link system. Data is handled in 16-bit units (one word). Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number. Data memory for storing the elapsed value during operation of a timer/counter. Stores by timer/ counter number. Data memory used in program. Data is y p g handled i 16 bit it ( h dl d in 16-bit units (one word). d)

Timer/Counter set value area (* Note 1) Timer/Counter elapsed value area (* Note 1) File register (* Note 1)

(SV) 3,072 words (SV0 to SV3071) (EV) 3,072 words (EV0 to EV3071) (FL) 32,765 words , (FL0 to FL32764)

1 - 19
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Item
Memory area Special data register Index register Control instrucinstruc tion point Master control relay points (MCR) Number of labels (JP and LOOP) Number of step ladder (* Note 3) Number of subroutine Number of interrupt program Constant Decimal constants t t Hexadecimal constants Floating point type ( ) (K) ( ) (H) (f) (DT)

Numbering
512 words (DT90000 to DT90511) 14 words 16 banks (I0 to ID)

Function
Data memory for storing specific data. Various settings and error codes are stored. Register can be used as an address of memory area and constants modifier.

(I)

256 points (when using the 90k step expansion memory, up to a total of 512 points can be used for the 1st and 2nd programs) 256 points (when using the 90k step expansion memory, up to a total of 512 points can be used for the 1st and 2nd programs) 1,000 steps (can only be used for the 1st program) 100 subroutines (can only be used for the 1st program) 25 program (can only be used for the 1st program) K32768 to K32767 (for 16-bit operation) K2147483648 to K2147483647 (for 32-bit operation) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) f1.1754941038 to f3.4028231038 f1.1754941038 to f3.4028231038

Notes 1) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non-hold type that resets them. The selection of hold type and non-hold type can be changed by the setting of system register. 2) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are numbers when system register 5 is at its default setting. 3) Hold or non-hold type can be set.

1 - 20
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

1.1.8

Relay Numbers

External input relays (X), External output relays (Y), Internal relays (R), Link relays (L) and Pulse relays (P) Since these relays are handled in units of 16 points, they are expressed as a combination of decimal and hexadecimal numbers as shown below.

Decimal number

1,2,3... 0,1,2...9,A,B...F

Hexadecimal number

The maximum value that can be selected varies with each relay. Example: External input relay (X)
X0, X1 . . . . . . . . . . . . . . . . . . . . . . . . . . XF X10, X11 . . . . . . . . . . . . . . . . . . . . . . . . X1F X20, X21 . . . . . . . . . . . . . . . . . . . . . . . . X2F .................................

Timers (T) and Counters (C) The addresses for timer contacts (T) and counter contacts (C) are correspond to the timer and counter instruction numbers and expressed in decimals as shown below. Example: FP2

Decimal number

0, 1, 2 ...

T0, T1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T999 C1000, C1001 . . . . . . . . . . . . . . . . . . . . . . . . . C1023

Note Counters and timers share the same area. The division of the area can be changed with system register 5. (The table and example are when settings are the default values.) Error alarm relays (E) (FP2SH/FP10SH only) The addresses for error alarm relays (E) are represented in only decimals.
E0, E1 . . . . . . . . E2047

1 - 21
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

External input relay (X) and External output relay (Y) Only relays with numbers actually allocated to input contacts can be used as external input relay (X). Only relays with numbers actually allocated to output contacts can output as external output relay (Y). The external output relays (Y) which are not allocated can be used as internal relays. Allocation of numbers is determined by the combination of units and boards used. For details about the I/O allocation, refer to Hardware Manual of each PLC. Example: FP2
0 16point type input unit Power supply unit 1 16point type output unit 2 3 4 (Slot No.)

CPU

Y10 to Y1F X0 to XF

The 16 points external input relays X0 through XF are allotted for the 16-point type input unit for slot 0, and the 16 points external output relays Y10 through Y1F are allotted for the 16-point type output unit for slot 1. The 16 points X10 through X1F cannot be used in this such combination.

1 - 22
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.1

Table of Relays, Memory Areas and Constants

Relation of WX, WY, WR and WL to X, Y, R and L WX, WY WR and WL correspond respectively to groups of 16 external input relay (X) points, 16 external output relay (Y) points, 16 internal relay (R) points and 16 link relay (L) points. Example: Word external input relay (WX) Each relay is composed of 16 external input relay (X) points as shown below.
XFXE XDXCXBXA X9 X8 X7 X6 X5 X4 X3 X2 X1 X0

WX0
X1F X1E X1D X12 X11 X10

WX1 ... ...

When the state of an external input relay (X) changes, the content of WX also changes.

1 - 23
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.2

Explanation of Relays

1.2.1

External Input Relays (X)

Function of external input relays (X) This relay feeds signals to the programmable controller from an external device such as a limit switch or a photoelectric sensor.
Program
X contact: on
X Input Y

CPU

Input unit

Input: on

Usage restrictions The addresses for inputs which do not actually exist cannot be used. The on or off status of the external input relays cannot be changed by the program in the programmable controller. There are no restrictions on the number of times one external input relay is programmed.

1 - 24
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.2

External Output Relays (Y)

Function of external output relays (Y) This relay outputs the program execution result of the programmable controller and activates an external device (load) such as a solenoid, operating panel or intelligent unit. The on or off status of the external output relay is output as a control signal.
Program
Output relay X R R Y

CPU

Output unit

Execution

output

External devices (load): on

Usage restrictions External output relays which are not actually allocated can be used in the same way as internal relays. However, they cannot be specified as hold types. When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT and KP instructions, use is limited to once in a program (to inhibit double output). Note You can permit duplicated use of an output by changing the system register 20 setting. Even if the same relay is used as an operand for instructions such as SET and RST, it is not regarded as duplicated use of outputs.
Yn Yn Duplicated output

1 - 25
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.2.3

Internal Relays (R)

Function of internal relays (R) This relay can be used only within program and on or off status does not provide an external output. When the coil of the relay is energized, its contacts turn on.
Internal relay R R F0 MV

Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT and KP instructions, use is limited to once in a program (to inhibit double output). Note You can permit duplicated use of an output by changing the system register 20 setting. Even if the same relay is used as an operand for instructions such as SET and RST, it is not regarded as duplicated use of outputs. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all of the internal relays (R) go off. If a hold type has been specified (see next page), the internal relays (R) go off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the relays are not cleared even if the Initialize/Test switch is set to the upper side.

1 - 26
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

Nonhold type relay and hold type relay There are two types of internal relays: hold type relays and nonhold type relays. When the power is turned off or the mode changed from RUN to PROG., Hold type relays hold their on or off status and resume operation in that status when the system is restarted. Nonhold type relays reset. For the FP0 C10/C14/C16/C32, and FPe without clock/calendar function, nonhold type and hold type relay numbers are as follows:
Item
FP0 C10, C14, C16 FPe FP0 C32 Non-hold type R0 to R60F (976 points) R0 to R54F (880 points) Hold type R610 to R62F (32 points) R550 to R62F (128 points)

For the FP0 T32C/FP0R/FP/FPX/FP2/FP2SH/FP10SH, and FPe with clock/ calendar function, system register 7 can be used to specify whether a hold type or a nonhold type is used. If the beginning of a hold type relay is specified using a word number, relays before that point will be nonhold types, and subsequent relays will be hold types.
Non-hold type Value of system register 7 (initial number of hold type) Hold type

Default settings for hold types and nonhold types


Type
FP10SH/FP2SH FP2 FP0 T32C FP FPe FPX/FP0R

Nonhold type
R0 to R499F (8000 points) R0 to R199F (3200 points) R0 to R9F (160 points) R0 to R89F (1440 points) R0 to R60F (976 points) R0 to R247F (3968 points)

Hold type
R5000 to R886F (6192 points) R2000 to R252F (848 points) R100 to R62F (848 points) R900 to R97F (128 points) R610 to R62F (32 points) R2480 to R255F (128 points)

Note For FP0R, FP, FPX and FPe, in case of not using backup battery, please keep the default value. Otherwise we cannot guarantee the function of hold/nonhold value.

1 - 27
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.2.4

Special Internal Relays

Function of special internal relays The special internal relays turn on or off under specific conditions. The on or off state is not externally output and only functions within the program. The principal special internal relays are as follows: Operation status flags:
Operation status is indicated by on or off.

Operation (RUN mode) in progress (R9020) Forced input/output in progress (R9029) Link station operation (R9060 to R909F) Turns on and off at each scan (R9012) Result of comparison instruction (R900A to R900C) Highspeed counter control flag (R903A to R903D) and others Error flags:
Turns on when an error occurs.

Operation error (R9007, R9008) Shared memory access error (R9031) and others Relays which turn on and off under special conditions:
The required conditions can be selected in the program and the relays used accordingly.

Always on relay (R9010) Clock pulse relay (R9018 to R901E) and others For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, special internal relays R9000 to R910F go off. If selfdiagnostic error 44 or an error with a lower number has occurred, however, R9000 to R9008 are not cleared.

1 - 28
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.5

Link Relays (L) for FP, FPX, FP0R

Function of link relays (L) Link relays are relays used for the PC Link, that can be shared between multiple programmable controllers when they are connected using a PLC link. If calculation results are output to the link relay (coil) of a certain PLC, the results are also sent to other PLC connected with MEWNET, and will be reflected in link relay (contact) that have the same number.
Ln

on

Communication Cassette

Send-area
MEWNET-W0

Send

Receive-area
Ln on

Receive

When link relays are used, bit information can be exchanged in this way between PLCs.

Available range of link relays The available range of link relays varies depending on the type of network and the combination of units. The available range and number of points must be specified separately for each network. For MEWNETW0: A maximum of 1,024 points are available with one control unit. The available range is from L0 to L63F

1 - 29
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Specifying hold type and nonhold type relays There are two types of link relays, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped. Hold type relays, which hold the on or off status in effect immediately prior to stopping, during the period between stopping and resuming operation Nonhold type relays, which are reset when operation stops In case of using backup battery, System register 10 can be used to specify whether the link relays are the hold or nonhold type.
Range
L0 to L63F

System register no.


10

If the beginning of a hold type relay is specified using a word number, relays before that point will be nonhold types, and subsequent relays will be hold types. For example, if 10 is set for system register 10, L0 to L9F will be nonhold types, and L100 to L63F will be hold types. For the default value, all link relays are hold types. If used as link relays for reception, be aware that no holding operation is carried out, even if the link relays are specified as hold types using the system registers.

Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT instruction and KP instruction, use is limited to once in a program (to inhibit double output). Notes System register 20 can be used to permit double output. Also, double output does not result if the SET and RST instructions are used. Link relays must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.

1 - 30
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.6

Link Relays (L) for FP2/FP2SH/FP10SH

Function of link relays (L) Link relays are relays used for the PC Link, that can be shared between multiple programmable controllers when they are connected using a MEWNET link. The following types of MEWNET links are available. MEWNET-H link system for FP10SH (for coaxial cables) MEWNET-W link system for FP2, FP2SH and FP10SH (for wire cables) MEWNET-P link system for FP10SH (for fiberoptic cables) If calculation results are output to the link relay (coil) of a certain PLC, the results are also sent to other PLC connected with MEWNET, and will be reflected in link relay (contact) that have the same number.
Link station

CPU

on

Ln

Send-area
Link unit
Link station MEWNET

Send

Receive-area
Ln on

Receive

When link relays are used, bit information can be exchanged in this way between PLCs.

CPU

1 - 31
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Available range of link relays The available range of link relays varies depending on the type of network and the combination of units. The available range and number of points must be specified separately for each network. For MEWNETW and MEWNETP: A maximum of 1,024 points are available with one link unit. The available range is from L0 to L63F for the first unit (PC Link 0), and from L640 to L127F to the second unit (PC Link 1). For MEWNETW2 A maximum of 4,096 points can be used per link unit. Please set the range of use at the MEWNETW2 settings menu. With the FP2SH, the range between L0 and L639F can be specified. When used with MEWNETW the range between L0 and L127F cannot be used. With the FP2, the range between L0 and L127F can be specified. Also, the internal relay can be used in place of the link relay by setting the MEWNETW2 setting menu. However, when used with MEWNETW the range between L0 and L127F cannot be used with MEWNETW2. For MEWNETH: A maximum of 10,240 points can be used. Please set the range to be used with the MEWNETH link setting software. With the FP10SH, the range from L0 to L639F can be used. If used in conjunction with a MEWNETW or MEWNETP link unit, be aware that the range from L0 to L127F cannot be used.

1 - 32
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

Specifying hold type and nonhold type relays There are two types of link relays, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped. Hold type relays, which hold the on or off status in effect immediately prior to stopping, during the period between stopping and resuming operation Nonhold type relays, which are reset when operation stops System register 10, 11, and 16 can be used to specify whether the link relays are the hold or nonhold type.
Range
L0 to L63F L640 to L127F L1280 to L639F

System register no.


10 11 16

If the beginning of a hold type relay is specified using a word number, relays before that point will be nonhold types, and subsequent relays will be hold types. For example, if 10 is set for system register 10, L0 to L9F will be nonhold types, and L100 to L63F will be hold types. For the default value, all link relays are hold types. If used as link relays for reception, be aware that no holding operation is carried out, even if the link relays are specified as hold types using the system registers. Example:
Nonhold type Hold type Nonhold type Hold type System register 11 System register 10 L0 to L63F L640 to L127F

Nonhold type System register 16

L1280 to L639F

Hold type

1 - 33
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT instruction and KP instruction, use is limited to once in a program (to inhibit double output). Notes System register 20 can be used to permit double output. Also, double output does not result if the SET and RST instructions are used. Link relays must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.

For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all of the link relays (L) go off. If a hold type has been specified (see next page), these relays go off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the relays are not cleared even if the Initialize/Test switch is set to the upper side.

1 - 34
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.7

Timer (T)

Function of timers (T) When a timer is activated and the set time elapses, the timer contact with the same number as the timer turns on. When the timer is in the timeup state and the timer execution condition turns off, the timer contact turns off.
TM n

Timer number
Tn

Timeup Tn: on

Timer contact: on

n: Timer number

Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, the timer contact goes off. If a hold type has been specified, it goes off as well. Note
With the FP2SH/FP10SH, system register 4 can be set in such a way that the timer contact is not cleared even if the Initialize/Test switch is set to the upper side.

1 - 35
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.2.8

Counter (C)

Function of counters (C) When the decrementtype preset counter is activated and the elapsed value reaches zero, the counter contact with the same number as the counter turns on. When the counters reset input is turned on, the counter contact turns off.
Count input Counter number CT n Reset input

Countup Cn:on

Cn

Counter contact: on

n: Counter number

Usage restrictions When used as contacts, there are no resrictions on the number of times that can be used. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, the counter contact goes off. If a hold type has been specified, it goes off as well. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the counter contact is not cleared even if the Initialize/ Test switch is set to the upper side.

1 - 36
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.9

Items Shared by the Timer and Counter

Timer and counter partitioning Timers and counters share the same area. The partitioning of the area can be changed to obtain the number of timers or counters needed. Partition the area by setting system register 5. If the initial number of the counter is specified, those prior to that point will be timers, and those subsequent to that point will be counters. If the same value is set for system register 5 and 6, timers are nonhold types, and counters are hold types. Normally, the same value should be set for both system registers.
Non-hold type

Value of system register 5 (initial number for counter)

Hold type

Default settings for timer and counter


Type
FP2SH/FP10SH FP2 FP, FPX, FP0R FP0, FPe

Timer
T0 to T2999 (3000 points) T0 to T999 (1000 points) T0 to T1007 (1008 points) T0 to T99 (100 points)

Counter
C3000 to C3071 (72 points) C1000 to C1023 (24 points) C1008 to C1023 (16 points) C100 to C143 (44 points)

Hold type and nonhold type partitioning The contents of timer contacts, counter contacts, set value areas and elapsed value areas can be held when the power is turned off or the mode switched from RUN to PROG., and operation later resumed based on those contents. In the case of the FP0 C10/C14/C16/C32, and FPe without clock/calendar function, the areas which hold their contents when the power is turned off are fixed as shown below. System register settings 6 to 8 as well as 14 become invalid.
Timer Counter Nonhold type: all points Nonhold type FP0 C10, C14, C16 FPe: From set value to C139 FP0 C32: From set value to C127 Hold type FP0 C10, C14, C16 FPe: C140 to C143 FP0 C32: C128 to C143

For the FP0 T32C/FP0R/FP/FPX/FP2/FP2SH/FP10SH, and FPe with clock/calendar function, system register 6 can be used to specify whether a hold type or a nonhold type is used. If the beginning of a hold type is specified using a word number, the contents of timer/counter contacts and set value/elapsed value areas before that point will be nonhold types, and subsequent the contents of timer/counter contacts and set value/elapsed value areas will be hold types.
1 - 37
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Even if specifying for the unit without batteries, the data will be indefinite.
Non-hold type

Value of system register 6 (initial number of hold type)


Hold type

Default settings for hold types and nonhold types


Type
FP2SH/FP10SH FP2 FP, FPX, FP0R FPe FP0 T32C

Nonhold type
0 to 2999 (3000 points) 0 to 999 (1000 points) 0 to 1007 (1008 points) 0 to 139 (140 points) SV: nonhold *1 0 to 99 (100 points)

Hold type
3000 to 3071 (72 points) 1000 to 1023 (24 points) 1008 to 1023 (16 points) 140 to 143 (4 points) SV: hold 100 to 143 (44 points)

Note For FP0R, FP, FPX and FPe, in case of not using backup battery, please keep the default value. Otherwise we cannot guarantee the function of hold/nonhold value. *1 Use the following methods for holding the SV data: Set the transfer instruction for the data register (DT) to hold the data. Then, perform the setting so that the data can be transferred from DT to SV after the RUN mode starts. Use the FPe model with a battery. For the FP2/FP2SH/FP10SH, contacts of timers and counters specified as hold types, as well as setting value areas and elapsed value areas, are cleared to 0 when the Initialize/Test switch is set to the upper side (the Initialize side). Note

With the FP2SH/FP10SH, system register 4 can be set in such a way that the counter contact is not cleared even if the Initialize/Test switch is set to the upper side.

1 - 38
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.10 Pulse Relays (P)


Note Pulse relays (P) can only be used with the FP2/FP2SH/FP10SH. Function of pulse relays (P) A pulse relay (P) goes on for one scan only. The on or off state is not externally output and only operates in the program. A pulse relay only goes on when a leading edge start instruction (OT) or a trailing edge start instruction (OT) is executed. When used as the trigger, a pulse relay only operates during one scan when leading edge or trailing edge is detected.

Example 1: Differential execution when input X0 rises


X0 P0

P0 Y10

X0 P0 Y10

One scan

Example 2: Differential execution when input X1 falls


X1 P1

P1

Y11

X1 P1 Y11

One scan

1 - 39
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Usage restrictions Pulse relays are cleared when the power is turned off. A pulse relay can only be used once in a program as an output destination for an OT or OT instruction (double output is prohibited). There is no limitation to the number of times a pulse relay can used as a contact. A pulse relay cannot be specified as an output destination for an OT, KP, SET, RST or ALT instruction. A word unit pulse relay (WP) cannot be specified as a storage location for a high-level instruction.

1 - 40
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

1.2.11

Error Alarm Relays (E)

Note Error alarm relays can only be used with the FP2SH/FP10SH. Function of error alarm relays (E) Error alarm relays are used to feed back error conditions freely assigned by the user to internal relays, and to store them in memory. Error alarm relays are turned on and off using the SET and RST instructions in the user program. When an error alarm relay goes on, the number of error alarm relays which are on, the relay numbers, and the data of the calendar timer which went on first are stored in a memory area in the CPU unit.
DT90400 DT90401 to DT90419 DT90420 DT90421 DT90422 No. of relays which are on Relay numbers which are on Min./sec. data Day/time data Year/month data Data f l d ti D t of calendar timer for first relay to go f fi t l t on

Information for up to 500 error alarm relays can be stored in the memory area. Those which can be monitored or operated by the user, however, are those in the range from DT90401 to DT90419 only. Usage restrictions and precautions Error alarm relay (E) cannot be specified as the output destination for the OT, KP, or ALT instructions. Error alarm relay (E) can be turned on and off in multiple locations in the program, using the SET and RST instructions. However, no check is carried out for overlapping use. Program for setting (turning on) an error alarm relays The SET instruction should be used to turn on error alarm relays in the error alarm conditions. Error alarm relays are held even if the error condition goes off.

1 - 41
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Example:

If X0 goes on when an error occurs


X0 X0 : on DT90400 DT90401 DT90402 DT90403 DT90404 DT90405 DT90420 DT90421 DT90422 K 3 K21 K12 K 5 K 0 K 0 +1 K 4 K21 K12 K 5 K15 K 0 Data of calendar timer which the error alarm relay of relay number in DT90400. E15 S

Set E15
No. of error alarm relays which are on Relay numbers of error alarm relay which are on

Program for resetting (turning off) an error alarm relay When an error has been corrected, the RST instruction should be used to turn off the error alarm relay. Example: If X1 goes on when an error is corrected
X1 E12 R X1 : on DT90400 DT90401 DT90402 DT90403 DT90404 DT90405 K 4 K21 K12 K 5 K 0 K 0 1 K 3 K21 K 5 K 0 K 0 No. of error alarm relays which are on Relay numbers of error alarm relay which are on

Reset E12

Clearing all buffer areas Either of the following methods may be used. To reset all of the error alarm relays, use the RST instruction in the same way as that described on the next page, and specify special data register DT90400. If the Initialize/Test switch is set to the Initialize side in the PROG mode, all error alarm relays (E) go off, and the storage buffer is cleared. (To avoid clearing the buffer with the Initialize switch, change the setting of system register 4.)
1 - 42
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.2

Explanation of Relays

Clearing buffer areas and initial data Of the areas in which relay numbers are stored, only DT90400 and DT90401 can be cleared by directly specifying the special data register with the RST instruction. If DT90400 is specified, all error information in the buffer is cleared, and if DT90401 is specified, the initial relay number in the buffer area is cleared. Buffers fill up as shown in the example below. Example: When the contents of DT90401 are deleted using the RST instruction
X1 DF R DT90401

Storage buffer 1 Storage buffer 2 Storage buffer 3 Storage buffer 4 Storage buffer 17 Storage buffer 18 Storage buffer 19 Storage buffer 20 Storage buffer 21 Storage buffer 499 Storage buffer 500

K 1 K 2 K 3 K 4 K17 K18 K19 K20 K21 K499 K500

DT90401 DT90402 DT90403 DT90404 DT90417 DT90418 DT90419

Range visible to user

Range not visible to user

Storage buffer 1 Storage buffer 2 Storage buffer 3 Storage buffer 4 Storage buffer 17 Storage buffer 18 Storage buffer 19 Storage buffer 20 Storage buffer 21 Storage buffer 499 Storage buffer 500

K 2 K 3 K 4 K 5 K18 K19 K20 K21 K22 K500

DT90401 DT90402 DT90403 DT90404 DT90417 DT90418 DT90419

Range visible to user

Range not visible to user

1 - 43
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3

Explanation of Memory Areas

1.3.1

Data Register (DT)

Function of data registers (DT) Data registers are memory areas which are handled in word (16bit) units, and are used to store data such as numerical data configured of 16 bits.
Bit position 15 1211 8 7 4 3 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 DTn

Example of a program which writes a numeric value to DTn.


F0, MV, K0, DT n Decimal constant (K) or hexadecimal constant (H)

When 32-bit (double word) data is handled in data registers, use two data registers as a set. The number of the data register for the lower 16 bits is specified.
DTn+1
0 0 0 1 1 0 1 0 0 1 0 1

DTn
0 0 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0

higher 16-bit area

lower 16-bit area

1 - 44
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Nonhold type data and holdtype data There are two types of data registers which handle data differently when the power is turned off or the mode is changed from RUN to PROG.: Hold type data registers hold their contents while operation stops and allow operation to be restarted with the contents still effective. Nonhold type data registers reset when operation stops. For the FP0 C10/C14/C16/C32, and FPe without clock/calendar function, nonhold type and hold type data register numbers are as shown in the following table.
Item
Data register Nonhold type Hold type

FP0 C10/C14/C16 and FPe


1652 words (DT0 to DT1651) 8 words (DT1652 to DT1659)

FP0 C32
6112 words (DT0 to DT6111) 32 words (DT6112 to DT6143)

For theFP0 T32C/FP/FP0R/FPX/FP2/FP2SH/FP10SH, and FPe with clock/calendar function, system register 8 can be used to specify whether hold types or nonhold types are to be used. If the beginning of a hold type data register is specified using a word number, data registers before that point will be nonhold types, and subsequent data registers will be hold types.
Non-hold type

Value of system register 8 (initial number of hold type)

Hold type

Default settings for hold types and nonhold types


Type
FP, FPX (C30, C60) FPX (C14) FPe FP0R C10, C14, C16 FP0R C32, T32, F32

Nonhold type
DT0 to DT32709 (32710 words) DT0 to DT12229 (12230 words) DT0 to DT1651 (1652 words) DT0 to DT11999 (12315 words) DT0 to DT32449 (32451 words)

Hold type
DT32710 to DT32765 (55 words) DT12230 to DT12284 (55 words) DT1652 to DT1659 (8 words) DT12000 to DT12314 (315 words) DT32450 to DT32764 (315 words)

Note For FP, FPX and FPe, in case of not using backup battery, please keep the default value. Otherwise we cannot guarantee the function of hold/nonhold value. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all data registers (DT) are cleared to 0. Even if a hold type has been specified, these are cleared to 0.
1 - 45
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the data registers are not cleared even if the Initialize/ Test switch is set to the upper side.

1.3.2

Special Data Registers (DT)

Function of the special data registers These data registers have specific applications. Data cannot be written to most of them using instructions such as F0 (MV). With the FP0 T32C, FP0R, FP, FPX, FP2, FP2SH, FP10SH and the FP0 C10/C14/C16/ C32, FPe, the special data registers have different numbers, but the last three digits of the numbers are the same. Example:
With the FP0 C10/C14/ C16/C32, FPe:

DT9055

The last three digits With the FP0 T32C, FP0R D T 9 0 0 5 5 are the same. FP, FPX, FP2, FP2SH and If a 0 is added, this becomes FP10SH: the fivedigit number used with the FP0 T32C, FP, FPX, FP0R, FP2, FP2SH and FP10SH.

The main functions of special data registers are: Environmental settings and operation statuses The operation statuses of the programmable controller specified with the system registers and the various types of instructions are stored. Link communication status (DT9140 to DT9254/DT90140 to DT90254) Highspeed counter control flag (DT9052/DT90052) and others Error contents The unit in which the error occurred, and other information, is stored. Selfdiagnostic error code (DT9000/DT90000) The slot number of the unit where the error occurred (DT9002, DT9003, etc.) Remote input/output error slave station numbers (DT9131 to DT9135) The address where the operation error occurred (DT9017, DT9018/DT90017, DT90018)

1 - 46
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Clock/calendar (can be used with all types of the FP0 T32C, FP0R, FPe, FP, FPX, FP2, FP2SH and FP10SH) The year, month, day, hour, minute, second, and day of the week tracked by the calendar timer are stored here (DT9053 to DT9057/DT90053 to DT90057). Note The values stored for the clock/calendar can be overwritten (to calibrate the date and time). Values should be written to DT9054 to DT9057/DT90054 to DT90057 either using the F0 (MV) instruction or directly, using programming tools. Highperformance counter These registers are used for reading and writing the target value and elapsed value of the highperformance counters. Highperformance counter elapsed/target value area (DT9044 to DT9051/DT90044 to DT90051 and DT9104 to DT9111/DT90104 to DT90111) For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all special data registers are cleared to 0. If selfdiagnosis error 44 or an error with a lower number occurs, however, DT9000 (DT90000 with the FP2, FP2SH and FP10SH) is not cleared.

1 - 47
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3.3

File Registers (FL)

Function of file registers (FL) File registers are memory areas which are handled in word (16bit) units, and are used to store data such as numerical data configured of 16 bits. They can be used in exactly the same way as data registers.
Bit position 15 FLn

12 11

8 7

4 3

0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0

Doubleword specifications can also be used in the same way as with data registers. 32bit data can be handled. The number of file registers varies depending on the type and the system register settings.
Type
FP10SH FP2 (32 K) FP2 (16 K) FP2SH

No. of file register words


32,765 words Max. 30,717 words (see note) Max. 14,333 words (see note) 32,765 words 3 banks

Note The number of words varies depending on the type and the system register settings.

Nonhold type data and hold type data System register 9 can be used to specify whether hold types or nonhold types of file registers are to be used. For the default setting, all file registers are hold types. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all file registers are cleared to 0. Even if a hold type has been specified, these are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the file registers are not cleared to 0 even if the Initialize/Test switch is set to the upper side.

1 - 48
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

1.3.4

WX, WY, WR and WL

Function of WX, WY, WR and WL Relays (X, Y, R, L) can be handled as blocks of 16 points. These are oneword (16bit) memory areas, thus they can be treated as data memory. The composition of the oneword memory areas is as follows. The numbers correspond to the words as shown.
WR0
RF RE RD RC RB RA R9 R8 R7 R6 R5 R4 R3 R2 R1 R0

WR1
R1F R1E

R12 R11 R10

WR2
R2F R2E

R22 R21 R20

For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, WX, WY, WR, and WL are cleared to 0. Even if a hold type has been specified, these are cleared to 0. Pulse relays (P) and error alarm relays (E) cannot be handled in word units. Examples of using WX, WY, WR and WL WX can be used to read in digital switch and keyboard inputs, and WY can be used for output to 7segment displays. WR can also be used as a shift register. All of the relays can be used to monitor 16bit words. Precautions concerning usage If an on or off status of one of the relays composing the memory area changes, the memory area value will also change.
WR0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 (H9)

When R1 is turned on WR0


0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 (HB)

1 - 49
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3.5

Link Data Registers (LD) for FP/FPX/FP0R

Function of link data registers (LD) Link data registers are data memories for PC links, which are shared between multiple programmable controllers which are connected through the same network link. When data is written to a link data register of one PLC, the contents are stored in the link data registers that have the same numbers, in other PLCs connected through the network.

LDn
Send MEWNET-W0 Receive

Communication Cassette

LDn

When link data registers are used, data can be exchanged between PLCs simply by writing the data, as shown here. Available range of link data registers The available range of link data registers varies depending on the type of network and the combination of units. The available range and number of points must be specified separately for each network For MEWNETW0 A maximum of 128 words can be used with one control unit. The available range is from LD0 to LD127

1 - 50
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Specifying hold type and nonhold type registers There are two types of link data registers, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped. Hold type registers, which hold the on or off status in effect immediately prior to stopping, during the period between stopping and resuming operation Nonhold type registers, which are reset when operation stops In case of using backup battery, System registers 12 can be used to specify whether the link data registers are the hold type or non-hold type.
Range
LD0 to LD127

System register no.


12

If the beginning of a hold type register is specified using a word number, registers before that point will be nonhold types, and subsequent registers will be hold types. For example, if 64 is set for system register 12, LD0 to LD63 will be nonhold types, and LD64 to LD127 will be hold types. For the default value, all link data registers are hold types. If used as link data registers for reception, be aware that no holding operation is carried out, even if the link data registers are specified as hold types using the system registers.

1 - 51
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3.6

Link Data Registers (LD) for FP2/FP2SH/FP10SH

Function of link data registers (LD) Link data registers are data memories for PC links, which are shared between multiple programmable controllers which are connected through the same MEWNET link. The following types of MEWNET links are available. MEWNET-H link system for FP10SH (for coaxial cables) MEWNET-W link system for FP2, FP2SH and FP10SH (for wire cables) MEWNET-P link system for FP10SH (for fiberoptic cables) When data is written to a link data register of one PLC, the contents are stored in the link data registers that have the same numbers, in other PLCs connected through the MEWNET.
Link station

CPU

LDn
Send MEWNET

Link station

Receive

CPU

LDn

When link data registers are used, data can be exchanged between PLCs simply by writing the data, as shown here.

1 - 52
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Available range of link data registers The available range of link data registers varies depending on the type of network and the combination of units. The available range and number of points must be specified separately for each network. For MEWNETW and MEWNETP: A maximum of 128 words can be used with one link unit. The available range is from LD0 to LD127 for the first unit (PC Link 0), and from LD128 to LD255 for the second unit (PC Link 1). For MEWNETW2: A maximum of 4,096 words can be used per link unit. Please set the range of use at the MEWNETW2 settings menu. With the FP2SH, the range between LD0 and LD8447 can be specified. When used with MEWNETW the range between LD0 and LD255 cannot be used. With the FP2, the range between LD0 and LD255 can be specified. Also, the data register can be used in place of the link relay by setting the MEWNETW2 setting menu. However, when used with MEWNETW the range between LD0 and LD255 cannot be used with MEWNETW2. For MEWNETH: A maximum of 8,192 words can be used. Please set the range to be used with the MEWNETH link setting software. With the FP10SH, the range from LD0 to LD8447 can be used. If used in conjunction with a MEWNETW or MEWNETP link unit, be aware that the range from LD0 to LD255 cannot be used.

1 - 53
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Specifying hold type and nonhold type registers There are two types of link data registers, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped. Hold type registers, which hold the on or off status in effect immediately prior to stopping, during the period between stopping and resuming operation Nonhold type registers, which are reset when operation stops System registers 12, 13 and 17 can be used to specify whether the link data registers are the hold type or non-hold type.
Range
LD0 to LD127 LD128 to LD255 LD256 to LD8447

System register no.


12 13 17

If the beginning of a hold type register is specified using a word number, registers before that point will be nonhold types, and subsequent registers will be hold types. For example, if 64 is set for system register 12, LD0 to LD63 will be nonhold types, and LD64 to LD127 will be hold types. For the default value, all link data registers are hold types. If used as link data registers for reception, be aware that no holding operation is carried out, even if the link data registers are specified as hold types using the system registers. Note This is determined based on the settings of system register 0 and 1.

1 - 54
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Example:
Nonhold type Hold type Nonhold type Hold type System register 13 System register 12 LD0 to LD127 LD128 to LD255

Nonhold type System register 17

LD256 to LD8447

Hold type

Note Link data registers must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.

For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all of the link data registers (LD) are cleared to 0. Even if a hold type has been specified, these link data registers are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the link data registers are not cleared to 0 even if the Initialize/Test switch is set to the upper side.

1 - 55
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3.7

Set Value Area for Timer/Counter (SV)

Function of set value areas (SV) A set value for a timer or counter is stored in the set value area (SV) with the same number as the timer or counter.
Set value TM n, K30 SVn K30 (Decimal number)

A decimal number or SV area number is specified for the set value when the TM or CT instruction is entered in the program. An SV is a oneword, 16bit memory area which stores a decimal number from K0 to K32767. Using set value area (SV) During RUN mode, a set value for a timer or counter can be changed by rewriting the corresponding set value area. The value in a set value area can be read and changed from the program by specifying the destination and other information in F0 (MV) data transfer instruction. The set value area can be read and rewritten using a programming tool. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, all timer/counter setting value areas (SV) are cleared to 0. Even if a hold type has been specified, these are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that these areas not cleared even if the Initialize/Test switch is set to the upper side. Example: SV and EV areas are in a onetoone correspondence with timers and counters.
Timer/Counter number
T0 T1 : T99 C100 :

Set value area (SV)


SV0 SV1 : SV99 SV100 :

Elapsed value area (EV)


EV0 EV1 : EV99 EV100 :

1 - 56
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

1.3.8

Elapsed Value Area for Timer/Counter (EV)

Function of elapsed value areas (EV) While a timer or counter is operating, the elapsed value is stored in the elapsed value area (EV) with the same number as the timer or counter. When the EV reaches zero, the timer or counter contact with the same number turns on. An EV is a oneword, 16bit memory area which stores a decimal number from K0 to K32767.
TM n, K 30 0 Tn Decrements Value of SVn SVn K30 Value of EVn EVn K30 29 28

1 EVn 0 Tn turns on when decrement operation ends

Using elapsed value area (EV) The elapsed value of a timer or counter in operation can be changed to prolong or shorten the operation. The value in elapsed value area can be read and changed from the program by specifying the F0 (MV) data transfer instruction. The elapsed value area can be read and rewritten using a programming tool. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, the timer/counter elapsed value areas (EV) are cleared to 0. Even if a hold type has been specified, these values are cleared to 0. Note

With the FP2SH/FP10SH, system register 4 can be set in such a way that the timer/counter elapsed value areas are not cleared to 0 even if the Initialize/Test switch is set to the upper side.

1 - 57
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3.9

Index Registers (IX, IY) (for FP0, FPe)

Function of index registers (IX, IY) Index registers are used to indirectly specify constants and memory area addresses. Two 16bit registers are available, IX and IY. Changing addresses and constants using a value in an index register is called index modification. With the FP0, FPe, index modification is possible only with regard to operands of highlevel instructions. Modifying an address Address = Base address + Value in IX or IY (K constant) Example: Modifying DT11

IXDT11
Base address 11 + 11 + 11 + IX value Target address K0 = DT11 K10 = DT21 K10 = DT1

Modifying a constant Constant = Base value + Value in IX or IY Example 1: Modifying K100

IXK100
Base value K100 K100 K100 + + + IX value K0 = K10 = K10 = Constant K100 K110 K90

Example 2: Modifying H10

IXH10
Base value IX value H10 + HA = H10 + H10 = Constant H1A H20

1 - 58
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Index modification method Example 1: Modifying a destination address


X0 F0 MV, DT 0, F0 MV, K100, IX IXWR0 IX setting

The value of DT0 determines the WR address where K100 is written. When the DT0 value is K10, K100 is written to WR10.
IX WR0 WR10 K10 10 + 0 = 10

Example 2: Modifying a source address


X0 F0 MV, DT 1, IX DT 0 IX setting

F0 MV, IXWR0,

The value of DT1 determines the WR address for transferring a value to DT0. When the DT1 value is K9, the value in WR9 is transferred to DT0.
IX K9 9 WR0 WR9

0 =

1 - 59
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Cautions when using index registers An index register can not be modified with an index register. IXIX, IXIY If the result of address modification overflows the memory area, an operation error will result. When the address resulting from modification is negative or a large number. When modifying 32bit constants, IX is specified. At this point, IX and IY in combination are handled as 32bit data.
Higher 16bit area Lower 16bit area

Contents of IY

Contents of IX

The results of modification will be 32bit data.

Note For detailed information about the procedures for using index section 4.5 registers

1 - 60
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

1.3.10 Index Registers (I0 to ID) (for FP/FPX/FP0R)


Function of index registers (I0 to ID) Index registers are used for indirect specification of values to addresses and operands in relays and memory areas. There are a total of 14 index registers which can be used with the FP, consisting of I0 to I9 and IA to ID. Cautions when using index registers An index register can not be modified with an index register. I0I0, I1I1 An index register can be modified using a different index register. Available: I0IA, Not available: I0I0 If the result of address modification overflows the memory area, an operation error will result. When the address resulting from modification is negative or a large number. When a 32bit constant is modified, the specified index register number and the following index register number are used in combination to handle the data as a 32bit data.
Higher 16bit area Lower 16bit area

Contents of In+1

Contents of In

The results of modification will be 32bit data.

Note When 32bit constants are being modified, ID should not be specified. The following index modifications are possible Memory area numbers used with high-level instructions K constants (16-bit and 32-bit) and H constants (16-bit and 32-bit) specified with high-level instructions Note There are some cases in which index modification cannot be specified, depending on the instruction. Confirm the table of Operands on the page describing the various instructions.

1 - 61
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.3.11

Index Registers (I0 to ID) (for FP2, FP2SH and FP10SH)

Function of index registers (I0 to ID) Index registers are used for indirect specification of values to addresses and operands in relays and memory areas. Changing an address or a constant using an index register value is called index modification. There are a total of 14 index registers which can be used with the FP2, FP2SH and FP10SH, consisting of I0 to I9 and IA to ID. With the FP2SH/FP10SH, because there are bank areas for index registers, changing the bank enables 14 points x 16 banks = 224 points of index registers available for use. Cautions when using index registers An index register can not be modified with an index register. I0I0, I1I1 An index register can be modified using a different index register. Available: I0IA, Not available: I0I0 If the result of address modification overflows the memory area, an operation error will result. When the address resulting from modification is negative or a large number. When a 32bit constant is modified, the specified index register number and the following index register number are used in combination to handle the data as a 32bit data.
Higher 16bit area Lower 16bit area

Contents of In+1

Contents of In

The results of modification will be 32bit data.

Note When 32bit constants are being modified, ID should not be specified. For the FP2/FP2SH/FP10SH, if the Initialize/Test switch is set to the upper side (the Initialize side) in the PROG mode, index registers I0 to ID are cleared to 0. Note With the FP2SH/FP10SH, system register 4 can be set in such a way that these are not cleared to 0 even if the Initialize/Test switch is set to the upper side. The bank switching function for index registers can be used on the FP2SH/FP10SH. This function is not provided in the FP2.
1 - 62
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

The following index modifications are possible Memory area numbers used with high-level instructions K constants (16-bit and 32-bit) and H constants (16-bit and 32-bit) specified with high-level instructions Relay numbers used with the following basic instructions: ST, ST/, AN, AN/, OR, OR/, OT, KP, SET, RST, OT, OT Instruction numbers specified with the following basic instructions: TM, CT, MC, MCE, JP, LOOP, CALL, FCAL (FCAL instruction can be used with the FP2SH/FP10SH.) Memory areas used with the following basic instructions: TM, CT, SR Note There are some cases in which index modification cannot be specified, depending on the instruction. Confirm the table of Operands on the page describing the various instructions.

1 - 63
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Modification of memory area numbers specified by highlevel instructions Address = Base address + value in I0 through ID (K constant) Example: Modifying DT11

I0DT11
Base address 11 + 11 + 11 + I0 value K0 K10 K10 = = = Target address DT11 DT21 DT1

Example 1: Modifying a destination address


X0 F0 MV, DT 0, F0 MV, K100, I0 I0DT100 I0 setting

The value of DT0 determines the DT address where K100 is written. When the DT0 value is K10, K100 is written to DT110.
I0 DT100 K10 10 + 100 = 110 DT110

Example 2: Modifying a source address


X0 F0 MV, DT 1, I0 I0 setting

F0 MV, I0DT100, DT 0

The value of DT1 determines the DT address for transferring a value to DT0. When the DT1 value is K9, the value in DT109 is transferred to DT0.
I0 DT100 K9 9 + 100 = 109 DT109

1 - 64
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Modification of values of constants specified by highlevel instructions Constant = Base value + value in I0 through ID Example 1: Modifying 16-bit constant K100

I0K100
Base value K100 K100 K100 + + + I0 value K0 K10 K10 = = = 16-bit constant K100 K110 K90

Example 2: Modifying 16-bit constant H10

I0H10
Base value H10 H10 + + I0 value HA H10 = = 16-bit constant H1A H20

Example 3: Modifying 32-bit constant K0

I0K 0
Base value K0 K0 K0 + + + I1 and I0 value K10000 = K60000 = K999999 = 32-bit constant K10000 K60000 K999999

1 - 65
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Modification of relay numbers specified by basic instructions


Number = Base number + value in I0 through ID (K constant / H constant)

Example:

Modifying X10

IAX10
Base number 10 10 10 19 19 + + + + + IA value H0 HF H10 K7 K11 = = = = = Target number X10 X1F X0 X20 XE

Example 1: Modifying a trigger


R0 I0X0 F0 MV, DT 0, F35 +1, DT100 I0

I0 setting

The trigger of the F35 (+1) instruction is determined by the DT0 value. When the value of DT0 is K10, the F35 (+1) instruction is executed when XA goes on.
I0 K10 10 X0 XA

10 (decimal) A (hexadecimal)

Example 2: Modifying an output destination


R0 X0 F0 MV, DT 2, I0 I0Y10

I0 setting

The value of DT2 determines the output destination when X0 goes on. When the value of DT0 is HF and X0 goes on, Y1F goes on.
I0 HF F 1 - 66
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Y10

Y1F

10 = 1F

1.3

Explanation of Memory Areas

Example 3: Modifying a destination address


X0 F0 MV, DT 0, F0 MV, K100, I0 I0WR0

I0 setting

The value of DT0 determines the address of WR where K100 is written. When the value of DT0 is K10, K100 is written to WR10.
I0 K10 10 WR0 WR10

10

Example 4: Modifying a source address


X0 F0 MV, DT 1, IB

IB setting

F0 MV, IBWR0, DT 0

The value of DT1 determines the address of WR for transferring a value to DT0. When the value of DT1 is K9, the value in WR9 is transferred to DT0.
IB WR0 K9 9 + 0 WR9

1 - 67
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Items requiring particular attention For the external input relay (X), external output relay (Y), and internal relay (R), when using index modification on relay numbers, be aware that the last digit of the relay number is hexadecimal and the first digits are decimal. Example: For external input relay (X)
Decimal 1, 2, 3 ............12 Hexadecimal 0, 1, 2, 3 ........ 9 A,B ........ F X 0, X 1 . . . . . . . . . . . . . . . . . . . . . X F X 10, X 11 . . . . . . . . . . . . . . . . . . . . . X 1F X 20, X 21 . . . . . . . . . . . . . . . . . . . . . X 2F

Example using I0X0


Value of I0 K
0 1 : 9 10 : 15 16 : 31 : 159 160 161 : 255 256 257 : 265 267 :

Target address H
0 1 : 9 A : F 10 : 1F : 9F A0 A1 : FF 100 101 : 10A 10B : X0 X1 : X9 XA : XF X10 : X1F : X9F X100 X101 : X15F X160 X161 : X169 X16A :

1 - 68
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Modifying instruction numbers of basic instructions Timer numbers Modifying TML20 TML I020 Counter numbers Modifying CT3000 CT I03000 Shift register numbers Modifying SRWR0 SR I0WR0 Master control numbers Modifying MCE1 MCE I01 Label number specification with the Jump instruction Modifying JP1 JP I01 Label number specification with the Loop instruction Modifying LOOP5 LOOP I05 Subroutine program numbers Modifying CALL10 CALL I010 Note Timer numbers and counter numbers can be modified only when a memory area is specified for the set value.

Correct

TMXI0 0, SV0

Specification of set value area number

Modification cannot be done if the set value is specified with a constant.

Incorrect

TMXI0 0, K30

Specification of constant

1 - 69
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Changing index register banks (for FP2SH/FP10SH only) The banks of the index registers of the FP2SH/FP10SH can be changed to allow use of up to 224 points (14 points 16 banks) in a program.
Bank 0 Bank 1 Bank 2 Bank 15

I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 IA IB IC ID

When the register bank setting instruction F410 (SETB) or the register bank changing instruction F411 (CHGB) is used to specify a bank number, index registers I0 to ID used after that point can be used as separate index registers from the I0 to ID index registers used prior to changing the bank. The bank is automatically set to bank 0 before execution of the leading address of the program. The bank is also automatically set to bank 0 before execution of the leading address of a second program. The bank numbers of index registers used in interrupt programs, subroutines, and other sub programs should be specified in such a way that the F411 (CHGB) instruction is executed at the beginning of the sub program, and the F412 (POPB) instruction is executed at the end of the sub program.

1 - 70
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.3

Explanation of Memory Areas

Example 1: Changing banks using a register bank setting instruction F410 (SETB)
0

I0 to ID of bank 0
R9010 F410 SETB, H 11 SETB, H

I0 to ID of bank 1
R9010 F410 SETB, H 2

I0 to ID of bank 2
R9010 F410 SETB, H 3

I0 to ID of bank 3

Different values can be set for I0 in bank 0, bank 1 and bank 2. The set values are only effective within their respective ranges. Note For details on changing bank instruction, refer to the explanations of F410 (SETB), F411 (CHGB) and F412 (POPB) instructions.

Example 2: Changing banks within an interrupt program


Main program
END INT 0 R9010 F411 CHGB, H2

Sub program
R9010 F412 POPB IRET

1 - 71
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.4

Explanation of Constants

1.4.1

Integer Type Decimal Constants (K)

Function of decimal constants (K) This is binary data that has been converted to the decimal format. When entering and reading a decimal constant, specify the value by entering a K at the beginning. Decimal constants are primarily used to specify data sizes and quantities such as set values for timer. In the PLC, the decimal constant (K) is processed as binary (BIN) data in units of 16 bits, as shown below. The sign is determined by the MSB Most Significant Bit (bit position 15). [A 0 indicates a positive sign (+), and a 1 indicates a negative sign ().] The MSB (Most Significant Bit) is called the sign bit. Example: Decimal number +32 (K32)
Bit position 15 1211 8 7 4 3 0 Binary data 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0

Example:

Decimal number 32 (K32)


Bit position 15 1211 8 7 4 3 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0

Data is normally handled in units of one word (16 bits), however, it is also occasionally handled in units of two words (32 bits). In this case, as well, the MSB serves as the sign bit. The available range of a decimal constant is: 16-bit equivalent data: K-32768 to K32767 32-bit equivalent data: K-2147483648 to K2147483647

1 - 72
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.4

Explanation of Constants

1.4.2

Hexadecimal Constants (H)

Function of hexadecimal constants (H) Hexadecimal constants are values which have been converted from binary into hexadecimal. When entering and reading a hexadecimal constant, specify the value by entering an H at the beginning. Hexadecimal constants are primarily used to specify an ordering of 1s and 0s in 16bit data, such as system register settings and specification of control data for highlevel instructions. Hexadecimal constants are also used to specify BCD data. In the PLC, the hexadecimal constant (H) is processed as binary (BIN) data in units of 16 bits, as shown below. Example: Hexadecimal number 2A (H2A)
Bit position 15
Hexadecimal

A 2 Binary data 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0

1211
0 0

8 7

4 3

Data is normally handled in units of one word (16 bits), however, it is also occasionally handled in units of two words (32 bits). The available range of a hexadecimal constant is: 16-bit equivalent data: H0 to HFFFF 32-bit equivalent data: H0 to HFFFFFFFF

1 - 73
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.4.3

Floating Point Type Real Numbers (f)

Available PLC FP0, FP0R, FPe, FP, FPX, FP2, FP2SH and FP10SH Range of floating point type real numbers that can be used in operations The range of floating point type real numbers that can be stored in the memory area is as noted below. Range of negative numbers: 3.402823 x 1038 to 1.175494 x 1038 Range of positive numbers: 1.175494 x 1038 to 3.402823 x 1038 Even if the results of the realnumber operation involve multiple digits, the actual processing is effective for a mantissa of up to 7 digits. Example: If the actual operation result were 0.33333333 ..., the stored data would consist of the value 0.3333333.

Area in which floating point type real numbers are stored With floating point type real number operation instructions, the area in which data converted to a real number is stored consists of two words (32 bits) per data element. As a result, in transmission instructions such as that used to send realnumber data to a storage area and in other operations, data should be moved in units of two words (32 bits). Example 1: If DT0 is specified as the area in which floating point type real number data is to be stored, the data will be written to DT0 and DT1.
F313 F%, DT10, DT20, DT0

The operation results will be stored in DT0 and DT1.


DT10 DT11 (f1.0) DT20 (f2.0) DT21 Storage destination DT0 (f0.5) DT1

Example 2: When floating point type real number data stored in DT0 and DT1 is being sent to destination, the 32bit data sending instruction F1 (DMV) instruction should be used.
F1 DMV, DT0, DT100

Transmission source DT0 DT1 (f1.234)

Transmission source DT100 DT101 (f1.234)

1 - 74
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.4

Explanation of Constants

Processing of floating point type real number operations 1) Processing by specifying an integer device Instructions can be used to store data in a specific location. Adding the symbol % or # to either S (source: the area from which the data is loaded) or D (destination: the area in which the result is stored) determines how the data is processed. If added to S (source), integer data is automatically converted to realnumber data and the operation is carried out. If added to D (destination), the realnumber data resulting from the operation is automatically converted into integer data and stored in the destination. When the integer area consists of 16bit data It is specified using the % symbol. When the integer area consists of 32bit data It is specified using the # symbol. Example 1: Specifying the target operation data S for an integer device The contents of DT10 and DT20 are converted to real numbers, and the operation is executed. The results are stored in DT30 and DT31 as realnumber data.
F310 F+, %DT10, %DT20, DT30

Example 2: Specifying stored results D for an integer device The target operation data stored in DT40 and DT41 and DT50 and DT51 are loaded, and the operation is executed. The results of the operation are converted to an integer and stored in DT60.
F310 F+, DT40, DT50, %DT60

Example 3: When the integer data S targeted by the operation is stored as two words The contents of DT70 and DT71 and DT80 and DT81 are converted to real numbers and the operation is executed. The results of the operation are stored in DT90 and DT91 as realnumber data.
F310 F+, #DT70, #DT80, DT90

1 - 75
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

In processing involving an integer device specification and real numbers being converted to integers, the processing is the same as that of the F327 (INT) instruction. If the realnumber data is a positive number, the number is rounded off, and any digits to the right of the decimal point are discarded. If the realnumber data is a negative number, the value 0.4999 ... is subtracted from the target realnumber data, and the value is rounded off to the decimal point. Example 1: If the operation result is f1.234, the value will be stored as integer data K1. Example 2: If the operation result is f1.234, the value will be stored as integer data K2. Integer device specification can be used for the following instructions. F309 (FMV) to F324 (FSQR) / F336 (FABS) to F338 (DEG) / F345 (FCMP) to F349 (FZONE) 2) Using the integer real number and real number integer conversion instructions to convert values With this method, a conversion instruction is used to convert integer data to real numbers. When the integer data is 16bit data, F325 (FLT) is used. When the integer data is 32bit data, F326 (DFLT) is used. Realnumber data that has undergone realnumber operation processing is converted from realnumber data to integer data using the F327 (INT) to F332 (DROFF) conversion instructions. Example 1: When conversion is carried out using the maximum value that does not exceed the allowable range
F327 INT, DT0, DT10 converted to 16bit integer

F328 DINT, DT0, DT10

converted to 32bit integer

When the value is a positive number, the result is rounded off to the decimal point. When the value is a negative number, the value 0.4999 ... is subtracted from the data, and the result is rounded off. If the realnumber data is 1.5, it is converted as integer data K1. If the realnumber data is 1.5, it is converted as integer data K2.

1 - 76
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.4

Explanation of Constants

Example 2: When conversion is carried out by rounding down the digits to the right of the decimal point
F329 FIX, DT0, DT10 converted to 16bit integer

F330 DFIX, DT0, DT10

converted to 32bit integer

Digits to the right of the decimal point are rounded down. If the realnumber data is 1.5, it is converted as integer data K1. If the realnumber data is 1.5, it is converted as integer data K1. Example 3: When conversion is carried out by rounding off the digits to the right of the decimal point.
F331 ROFF, DT0, DT10 converted to 16bit integer

F332 DROFF, DT0, DT10

converted to 32bit integer

Digits to the right of the decimal point are rounded off. If the realnumber data is 1.5, it is converted as integer data K2. If the realnumber data is 1.5, it is converted as integer data K2.

1 - 77
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

3) Direct specification of the realnumber constant data When operations are being carried out on realnumber constants as realnumber data, the values can be directly input by using a programming tool in which f is added either to the target data S or the destination D defined by the instruction. The range that can be specified by these instructions is 0.0000001 to 9999999 (the effective value consists of seven digits). Example: Specifying the target data S with a realnumber constant The realnumber data stored in DT10 and DT11 is multiplied by the realnumber constant 0.5, and the result of the operation stored in DT20 and DT21 as realnumber data.
F312 f*, DT10, f0.5, DT20

4) Specifying a K constant for conversion The K constant (32bit data) is an integer data element, so it is automatically converted to realnumber data and the operation is executed.
F310 F+, K10, DT50, DT60 Automatic conversion to real number

5) Specifying an H constant for conversion With an H constant (32bit data), the operation is carried out using the H constant as floating point data. Operation if an overflow occurs If the operation result exceeds the realnumber range, an overflow flag (R9009) is set. If this occurs, one of the values noted below is set for R9009 as a result. Positive infinite value: H7F800000 Negative infinite value: HFF800000

1 - 78
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.4

Explanation of Constants

1.4.4

BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH)

Range of BCD type real numbers that can be used in operations The range of realnumber data that can be stored in the memory area is as noted below. 9999.9999 to +9999.9999 Data stored in the memory area in oneword units, with the positive/negative sign coming first, followed by the integer segment and then by the decimal point and any subsequent digits.
Oneword BCD Signs H0: Positive value H1: Negative value Integer segment H0 to H9999 Decimal point segment H0 to H9999 Oneword BCD Oneword BCD

Area in which the BCD type real number is stored In the BCD type real number operation instructions, the area in which data converted to real numbers is stored consists of a threeword area for each data element. As a result, in instructions such as that used to send realnumber data to a storage area and in other operations, data should be moved in units of three words. Example 1: If DT0 is specified as the area in which BCD type realnumber data is to be stored, the data will be written to DT0 to DT2.
X10 F300 BSIN, H45, D70 Operation results + 0. 7071

Areas in which data are stored DT0 H0 Sign DT1 H0 Integer segment DT2 H7071 Decimal point segment

Example 2: When sending BCD type realnumber data stored in DT0 to DT2, the F10 (BKMV) block transmission instruction or a similar instruction should be used, and the data sent in threeword units.
X10 F10 BKMV, DT0, DT2, DT100

Transmission source DT0 DT1 DT2 H0 H0 H7071

Transmission destination DT100 DT101 DT102 H0 H0 H7071

1 - 79
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.4.5

Character Constants (M)

Function of character constants (M) The character constant is used to express ASCII code in binary. The character constant is expressed by adding the prefix M to the data. There are only two instructions in which character constants can be specified, F95 (ASC) instruction, F257 to F265 (SYS1) instruction and F149 (MSG) instruction. The character constant M is stored in a specified memory area in the PLC as BIN data, as shown below. Example: When character constant MEWNET is input
T 54 E 45 N 4E W 57 E 45 M Character constant 4D ASCII Hex code

One word One word One word

1 - 80
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.5

Data Ranges Which can be Handled in the PLC

1.5

Data Ranges Which can be Handled in the PLC

1.5.1

Data Ranges Which can be Handled in the PLC


Decimal constants
K 32767

16bit data
Data which can be handled in the PLC (16bit binary data) 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Hexadecimal constants
H7FFF H0001 H0000 HFFFF H8000

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

K K K

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

32768

1 0 1

32-bit data
Data which can be handled in the PLC (32bit binary data) 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Decimal constants
K 2147483647 K 1 K 0 K 1 K2147483648

Hexadecimal constants
H7FFFFFFF H00000001 H00000000 HFFFFFFFF H80000000

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 - 81
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

Expression of decimal numbers in PLC Decimal number is basically processed in 16-bit or 32-bit binary. The most significant bit (MSB) expresses negative or positive sign of the data. When the MSB is 0, data is regarded as having a zero or positive value and when the MSB is 1, data is regarded as having a negative value. In the case of positive numbers, the bits following the most significant bit express the size of the data. Example 1: Expressing the decimal number 1868
0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0
16,384 8,192 4,096 2,048 1,024 512 256 128 64 32 16 8 4 2 1 The data size is indicated by the other bits. 1,024 + 512 + 256 + 64 + 8 + 4 = 1,868 Most significant bit: 0 (positive value)

A negative number is expressed as a twos complement (the bits of the 16bit binary data of the positive number are inverted and 1 is added to the result). Example 2: Expressing the decimal number -4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Binary expression of decimal number 4

Invert each bit


1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1

Add 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0

Binary expression of decimal number 4

Most significant bit: 1 (negative value)

1 - 82
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.5

Data Ranges Which can be Handled in the PLC

Data ranges which can be handled in the PLC Binary data which can be handled by programmable controllers are: 16-bit binary data: K-32768 to K32767 32-bit binary data: K-2147483648 to K2147483647 BCD code which can be handled by programmable controllers are: 16-bit (4-digit BCD H code): H0 to H9999 32-bit (8-digit BCD H code): H0 to H99999999 If any of the above ranges are exceeded when processing the corresponding data, overflow or underflow will result. BCD is an acronym for binary coded decimal and refers to expressing each digit of a decimal number by four binary digits. Example: When the decimal number is expressed in BCD
Decimal number

6
0110

4
0100

Each digit is converted to binary

BCD code (Binary coded decimal)

0101 H645

1 - 83
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1.5.2

Overflow and Underflow

Operation instructions occasionally produce a value which is outside of the allowed range. This is called overflow if the value exceeds the maximum value and underflow if the value falls short of the minimum value. When an overflow or underflow occurs, the carry flag R9009 turns on. Overflow and underflow during binary operation If any of the following values are exceeded, overflow or underflow will result.
16bit binary operation (Overflow results if over the maximum value.) Max. value K 32767 K K K Min. value
. .

32bit binary operation (Overflow results if over the maximum value.) K 2147483647 K K K
. .

H 7FFF H 0001 H 0000 H FFFF .


. . .

H 7FFFFFFF H 00000001 H 00000000 H FFFFFFFF .


. . .

. .

1 0 1

. .

1 0 1

K-32768

H 8000

K-2147483648

H 80000000

(Underflow results if under the minimum value.)

(Underflow results if under the minimum value.)

Overflow and underflow during BCD operation If any of the following values are exceeded, overflow or underflow will result. Only positive values can be handled.
4digit BCD code operation (Overflow results if over the maximum value.) Max. value H 9999
. . . . . .

8digit BCD code operation (Overflow results if over the maximum value.) H 99999999
. . . . . .

Min. value

(Underflow results if under the minimum value.)

(Underflow results if under the minimum value.)

1 - 84
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

1.5

Data Ranges Which can be Handled in the PLC

Values when overflow or underflow occurs Numerical value handled by the FP series programmable controller all form a loop joined at the maximum value and the minimum value as shown below. 16bit binary operation
Overflow
Max. value K 32767 H 7FFF

... ...

...

K K K Min. value

1 0 1

H 0001 H 0000 H FFFF

The max. value links with the min. value.

...
H 8000

K-32768

Underflow

Example 1: For K32767 + K1 (overflow) The operation result is K32768 and the carry flag turns on. Example 2: For K32768 K1 (underflow) The operation result is K32767 and the carry flag turns on. 4digit BCD code operation
Overflow
Max. value H 9999 The max. value links with the min. value. 0

.....

Min. value

Underflow

Example 1: For H9999 + H1 (overflow) The operation result is H0 and the carry flag turns on. Example 2: For H0 H1 (underflow) The operation result is H9999 and the carry flag turns on.

1 - 85
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Relays, Memory Areas and Constants

1 - 86
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Chapter 2 Basic Instructions

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

2-2
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

2.1

Composition of Basic Instructions

2.1
2.1.1

Composition of Basic Instructions


Sequence Basic Instructions

These basic instructions perform bit unit logic operations and are the basis of the relay sequence circuit. As shown in the illustration below, this is expressed by the combination of the relay coil and contact. There are several relay types which are explained in Section 1.2, and the relay which can be specified depends on the instruction. Refer to the explanation of each instruction. Example: Start (ST) instruction Read the on or off status of the specified contact.

Read the status of external input (X0).

Out (OT) instruction Output the operation result to the specified coil.

Outputs the operated result (on and off) to the external output (Y10).

Example:
Input contacts Address 0 X0 ST 1 R0 X1 AN OR Internal relay coil R0 OT Output coil

Internal relay contacts 4

R0 ST

Y10 OT Bus line <Ladder diagram>

2-3
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

2.1.2

Basic Function Instructions

These are the timer, counter and shift register instructions. To specify set values, the instructions are composed of several steps. Example: Example of setting 3.0 seconds in the 0.1 second timer (timer 5)
Timer 5 (0.1 s units timer) Set value X0 TMX 5 K 30

T5

Constant of timer 5

Y30

Timing begins when X0 turns on, and T5 turns on when 3.0 seconds elapses.

2.1.3

Control Instructions

These instructions determine the order and flow of program execution. It is possible to change the sections to be executed, or to execute only the necessary segments, depending on the conditions. Specify the section which will execute. This is composed of several steps. Master control relay A certain part of the program (specified with MC or MCE) is only executed when the appropriate condition is met. Jump Skips execution of part of the program (specified with JP or LBL) when the appropriate condition is met. This shortens program execution time. Step ladder control Part of the program (specified with SSTP or STPE) is treated as an independent process, and sequential and branch execution is carried out. Subroutine program A program which is repeatedly executed for a particular operation is called as a subroutine (specified with SUB or RET) and executed when needed.

2-4
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

2.1

Composition of Basic Instructions

Interrupt program In addition to the normal program, enter an interrupt program (specified with INT or IRET) if you need a program which will execute immediately when a certain condition is met. When an interrupt is received, the normal program is interrupted and the interrupt program is executed.

2.1.4

Data Compare Instructions

This is a group of instructions which compare two data. A contact is turned on or off based on the result of the comparison. Each comparison instruction is composed of several steps. Example: Example of comparing the value of DT10 to K100.
<=, DT 10, K100 Y30

If the value of DT10 is less than K100, Y30 is turned on. If the value of DT10 is greater than K100, Y30 is turned off.

2-5
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

2.2

Number of Steps in the FP2, FP2SH and FP10SH

Number of steps in basic instructions Of the basic instructions used with the FP2, FP2SH and FP10SH, the number of steps in the following instructions changes depending on the number specified. Sequence basic instructions With Start (ST), Out (OT), And (AN), Or (OR), and Keep (KP), the number of steps making up the instruction changes depending on the relay number which has been specified.
Type of relay
Input Output Internal relay y Special internal relay Link relay y Timer Counter X Y R R L T C

Relay number
0 to 127F 1280 or more R0 to R111F R1120 or more R9000 to R910F L0 to L127F L1280 to L639F 0 to 255 256 or more

Steps Normal
1 2 1 2 2 1 2 1 2

With index modification


2 2 2 2 2 2 2 2 2

Note Index modification is possible only with the FP2, FP2SH and FP10SH. Basic function instructions
Type of instruction yp
0.001 s units timer 0.01 0 01 s units timer 0.1 s units timer 1 s units timer Counter Shift register g TML TMR TMX TMY CT SR

Specified number p
0 to 255 256 or more 0 to 255 256 or more 0 to 255 256 or more WR0 to WR239 WR240 or more

Steps Normal
3 4 4 5 3 4 1 2

With index modification


4 4 5 5 4 4 2 2

Note Index modification is possible only with the FP2, FP2SH and FP10SH.

2-6
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

2.2

Number of Steps in the FP2, FP2SH and FP10SH

Control and subroutine instructions


Instructions
JP LOOP CALL FCAL

Steps Normal specification


2 4 2 4

With index modification


3 5 3 5

Note Index modification is possible only with the FP2, FP2SH and FP10SH.Table of Basic Instructions

2-7
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ST ST/ OT
Outline ST, ST/: OT: Program example

Start Start Not Out Begins a logic operation. Outputs the operation result.

Ladder Diagram X0 X0 Start Out Out Y10 Y11

Boolean Address 0 1 2 3 Instruction ST OT ST/ OT X Y X Y 0 10 0 11

0 2

Start Not

Operands
Relay Instruction X ST, ST/ OT A N/A Y A A R A A L P E (*1) (*2) (*3) A A A A Timer/Counter Contact T A N/A C A N/A Index modifier (*4) A A: Available N/A: Not Available

N/A N/A

(*1) This cannot be used with the FP0/FPe. (*2) This can be used only with the FP2/FP2SH/FP10SH. (*3) This can be used only with the FP2SH/FP10SH. (*4) This can be used only with the FP0R/FP2/FP2SH/FP10SH.

Explanation of example
Y10 goes on when X0 turns on. Y11 goes on when X0 turns off.
X0
on off on on

Y10 off Y11 off

Description
The ST instruction starts logic operations and regards the input contact specified at the start as a Form A (normally open) contact. The ST/ instruction starts logic operations and regards the input contact specified at the start as a Form B (normally closed) contact. The OT instruction outputs the operation result to a specified coil.

28
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Precautions during programming


The ST and ST/ instructions start from the bus line.
X0 Y10

The OT instruction cannot start directly from the bus line.


Y10

The OT instruction can be used consecutively.


X0 Y10 Y11 Y12

Some input devices, such as emergency stop switches, usually have a Form B (normally closed) contact. When an emergency stop switch with a Form B contact is programmed, be sure to use the ST instruction.

29
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

/
Outline Program example

Not

Inverts the operation result up to this instruction.

Ladder Diagram X0 0 Y11 Not Y10

Boolean Address 0 1 2 3 Instruction ST OT / OT Y 11 X Y 0 10

Explanation of example
Y10 goes on and Y11 goes off when X0 turns on. Y10 goes off and Y11 goes on when X0 turns off.
X0
on off on on

Y10 off Y11 off

Description
The / instruction inverts the operation result up to this instruction.

2 10
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

AN AN/
Outline

AND AND Not

AN: Connects Form A (normally open) contacts in series. AN/: Connects Form B (normally closed) contacts in series.

Program example
Ladder Diagram Boolean Address 0 X0 0 AND AND Not X1 X2 Y10 1 2 3 Instruction ST AN AN/ OT X X X Y 0 1 2 10

Operands
Relay Instruction X AN, AN/ (*1) (*2) (*3) (*4) A Y A R A L P E (*1) (*2) (*3) A A A Timer/Counter Contact T A C A Index modifier (*4) A A: Available N/A: Not Available

This cannot be used with the FP0/FPe. This can be used only with the FP2/FP2SH/FP10SH. This can be used only with the FP2SH/FP10SH. This can be used only with the FP0R/FP2/FP2SH/FP10SH.

Explanation of example
Y10 goes on when both X0 and X1 turn on and also X2 turns off.
X0 X1 X2
on off on off on off on

Y10 off

Description
Performs a logical AND operation with the results of the immediately preceding serially connected operation.

Precautions during programming


Use the AN instruction when normally open contacts (Form A contacts) are serially connected. Use the AN/ instruction when normally closed contacts (Form B contacts) are serially connected.
X0 X2 X1 X3 Y10 Y10

The AN and AN/ instructions can be used consecutively.


X0 X1 X2 X3

2 11
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

OR OR/
Outline

OR OR Not

OR: Connects Form A (normally open) contacts in parallel. OR/: Connects Form B (normally closed) contacts in parallel.

Program example
Ladder Diagram X0 0 X1 1 X2 2 OR OR Not Y10 Boolean Address 0 1 2 3 Instruction ST OR OR/ OT X X X Y 0 1 2 10

Operands
Relay Instruction X OR, OR/ A Y A R A L P E (*1) (*2) (*3) A A A Timer/Counter Contact T A C A Index modifier (*4) A A: Available N/A: Not Available

(*1) This cannot be used with the FP0/FPe. (*2) This can be used only with the FP2/FP2SH/FP10SH. (*3) This can be used only with the FP2SH/FP10SH. (*4) This can be used only with the FP0R/FP2/FP2SH/FP10SH.

Explanation of example
Y10 goes on when either X0 or X1 turns on or X2 turns off.
X0 X1 X2
on off on off on off

Y10 on off

Description
Performs a logical OR operation with the results of the immediately preceding operation connected in parallel.

2 12
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Precautions during programming


Use the OR instruction when normally open contacts (Form A contacts) are connected in parallel. Use the OR/ instruction when normally closed contacts (Form B contacts) are connected in parallel. The OR instruction starts from the bus line. The OR and OR/ instructions can be used consecutively.
X0 X1 X2 X3 Y10

2 13
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ST ST AN AN OR OR
Outline

Leading edge Start Trailing edge Start Leading edge AND Trailing edge AND
Availability

Leading edge OR Trailing edge OR

FP2/FP2SH/FP10SH FPX (V2.00 or more) FP (V3.10 or more) FP0R

Contact instructions for leading edge detection and trailing edge detection Logic processing is only carried out during the scan following detection of a leading edge or trailing edge in the signal.
Boolean Address Y10 0 2 X1 3 X3 7 X4 Y12 X2 3 Y11 4 6 7 9 11 Instruction ST OT ST AN OT ST OR OT X Y X Y X Y X Y 0 10 1 2 11 3 4 12

Program example
Ladder Diagram X0

Leading edge Start

Leading edge AND

Trailing edge OR

Operands
Instruction X ST, ST AN, AN OR, OR A A A Y A A A Relay R A A A L A A A P A A A E N/A N/A N/A Timer/Counter Contact T A A A C A A A Index modifier N/A N/A N/A A: Available N/A: Not Available

2 14
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example ST, AN and OR instructions


Output to Y10 takes place for one scan only following a change in X0 from off to on.
X0 Y10 on off on off

One scan Leading edge

One scan Leading edge

Output to Y11 takes place for one scan only following a change in X2 from off to on when X1 is on.
X1 X2 Y11 on off on off on off

One scan

Output to Y12 takes place for one scan only following a change in X3 or X4 from on to off.
X3 X4 Y12 on off on off on off

One scan

One scan

2 15
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

OT OT
Outline

Leading edge Out Trailing edge Out

Leading edge detection and trailing edge detection output The result of processing is output to the pulse relay for one scan only.
Boolean Address 0 P0 Leading edge Out 1 3 X1 3 Trailing edge Out P1 4 Instruction ST OT ST OT X P X P 0 0 1 1

Program example
Ladder Diagram X0 0

Operands
Instruction X OT OT Y Relay R L P A A E N/A N/A Timer/Counter Contact T N/A N/A C N/A N/A Index modifier A A A: Available N/A: Not Available

N/A N/A N/A N/A N/A N/A N/A N/A

Explanation of example
Output to pulse relay P0 takes place for one scan only following a change in X0 from off to on.
X0 P0 on off on off

One scan

Output to pulse relay P1 takes place for one scan only following a change in X1 from on to off.
X1 P1 on off on off

One scan

2 16
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
OT instructions Output to the pulse relay takes place for one scan only following a change in the immediately previous processing result from off to on. The pulse relay goes on for one scan only. OT instructions Output to the pulse relay takes place for one scan only following a change in the immediately previous processing result from on to off. The pulse relay goes on for one scan only.

Precautions during programming


When the pulse relay (P) (which goes on for one scan only due to execution of a OT or OT instruction) is used with a logic instruction (ST, AN or OR), operation is the same as a normal contact followed by DF instruction. Example using an OT instruction and the pulse relay (P)
X0 P0 P0 Y10

Example using a DF instruction


X0 DF Y10

Both example are executed as shown below.


X0 Y10 on off on off

One scan

One scan

2 17
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ALT
Outline

Alternative out

Inverts the output condition each time the leading edge of the signal is detected.
Boolean Address 0 0 X0 Y10 A Alternative out 1 Instruction ST ALT X Y 0 10

Program example
Ladder Diagram

Operands
Instruction X ALT N/A Y A Relay R A L A P E Timer/Counter Contact T N/A C N/A N/A N/A Index modifier N/A A: Available N/A: Not Available

Explanation of example
Each time X0 changes from off to on, the on/off state of output Y10 toggles.
X0 Y10 on off on off

Invert

Invert

Invert

Description
When the immediately previous processing result changes from off to on, the on/off state of the specified coil toggles. The on/off state of the specified coil is held until an ALT instruction specifying that coil rises. (Flip-flop control)

Precautions during programming


During the interval that the input remains on, the output only toggles when the rise occurs, not after that. When the mode is changed to RUN or the power is turned on in RUN mode such that the input is initially on, toggling does not occur at the first scan. When used with instructions which change the order of execution such as MC to MCE and JP to LBL (see below), take care because the operation of instructions may change depending on the timing of instruction execution and input. MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instructions

2 18
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ANS
Outline Program example

AND stack

Multiple blocks are connected in series.


Boolean Address 0 X0 0 X1 X3 Block 2 Block 1 X2 Y10 1 2 3 4 5 Instruction ST OR ST OR ANS OT Y 10 X X X X 0 1 2 3

Ladder Diagram

Explanation of example
Y10 goes on when X0 or X1 and X2 or X3 turn on. (X0 OR X1) AND (X2 OR X3) Y10 block 1
X0 X1 X2 X3
on off on off on off on off on

block 2

Y10 off

Description
Blocks connected in parallel are connected in series.

+
A block begins with the ST instruction.

2 19
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

When blocks are consecutive


When blocks are consecutive, a division of the blocks should be considered, such as that shown below.
1 2

block 5 block 4

block 4 X4 X5 Y10 block 5

block 1 block 2

ST OR ST OR ST OR OUT

X X X X X X Y

0 1 2 3
1

X0 X1

X2 X3

ANS . . . . . . . . . . . block 3 4 5

block 1

block 2

block 3

ANS . . . . . . . . . . . 10

2 20
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ORS
Outline Program example

OR stack

Multiple blocks are connected in parallel.

Ladder Diagram

Boolean Address 0 Instruction ST AN ST AN ORS OT Y 10 X X X X 0 1 2 3

X0

X1 X3

0
X2

Block 1 Block 2

Y10

1 2 3 4 5

Explanation of example
Y10 goes on when both X0 and X1 or both X2 and X3 turn on. (X0 AND X1) OR (X2 AND X3) Y10 block 1
X0 X1 X2 X3
on off on off on off on off on

block 2

Y10 off

Description
Blocks connected in series are connected in parallel.

+
A block begins with the ST instruction.

2 21
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

When blocks are consecutive


When blocks are consecutive, a division of the blocks should be considered, such as that shown below.
block 1 block 4 Y10 block 5 block 2 block 3 ST AN ST AN ST AN OUT X X X X X X Y 0 1 2 3
1

block 4 block 1 block 2 block 3


X0 X2 X4 X1 X3 1 X5 2

ORS . . . . . . . . .

4 5
2

ORS . . . . . . . . . block 5

10

2 22
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

PSHS RDS POPS


Outline

Push stack Read stack Pop stack

PSHS: Stores the operation result up to this instruction. 6 RDS: Reads the operation result stored by the PSHS instruction. POPS: Reads and clears the operation result stored by the PSHS instruction.
Boolean Address 0 1 X0 0 X2 Push Stack X3 Read Stack Pop Stack Y11 Y12 X1 Y10 2 3 4 5 6 7 8 9 Instruction ST PSHS AN OT RDS AN OT POPS AN/ OT X Y 3 12 X Y 2 11 X Y 1 10 X 0

Program example
Ladder Diagram

Explanation of example
When X0 turns on: Stores the operation result up to the PSHS instruction and Y10 goes on when X1 turns on. Reads the stored result using the RDS instruction and Y11 goes on when X2 turns on. Reads the stored result using the POPS instruction and Y12 goes on when X3 turns off. Also clears the result stored by the PSHS instruction.
X0 X1
on off on off on on off on on off on

Y10 off X2

Y11 off X3

Y12 off

2 23
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
One operation result can be stored in memory and read, and multiple processes performed. PSHS (stores operation result): Stores the operation result up to this instruction and continues execution from the next step. RDS (reads operation result): Reads the operation result stored using the PSHS instruction and, using this result, continues operation from the next step. POPS (resets operation contents): Reads the operation result stored using the PSHS instruction and, using this result, continues operation from the next step. Also clears the operation result stored by the PSHS instruction. These instructions are used if there is branching from a single contact, followed by another contact or contacts.

Precautions during programming


You can continue to use the same operation result several times by repeatedly using the RDS instruction. When you are finished, be sure to issue the POPS instruction.
X0 PSHS RDS POPS X1 X2 X3 X4 Y10 Y11 Y12

An RDS instruction can be used repeatedly any number of times.


X0 X1 X2 X4 X6 X3 X5 X7 Y10 Y11 Y12 Y13 Y14

RDS

2 24
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Caution regarding repeated use of a PSHS instruction


The PSHS instruction is limited in the number of times that it can be used consecutively. The number of times that the instruction can be used consecutively before the next POPS instruction is as shown below. Type
FP0, FPe, FP, FPX , FP0R FP2, FP2SH, FP10SH

No. of consecutive times


Up to 8 times maximum Up to 7 times maximum

If the instruction is used consecutively more than the allowable number of times, be aware that the program will not run correctly.
X0 X1 X2 X3 X4 X5 X6 Y10 ST X 0
PSHS AN X PSHS AN X PSHS AN X PSHS AN X PSHS AN X PSHS AN X .... 1 .... 2 .... 3 .... 4 .... 5 .... 6 1 2 3 4 5 6

This example shows the instruction used consecutively 6 times.

OT Y10

If a POPS instruction is used during repeated use of a PSHS instruction, reading will take place in order beginning from the last data stored by the PSHS instruction.
X0 X1 X2 X3 X4 X5 X6
1 2 3 4 5

Y10 Y11 Y12 Y13 Y14 Y15

X7 X8 X9 XA

POPS . . . . . 5 Reading AN X 6 OT Y 11 POPS . . . . . 4 Reading AN X 7 OT Y 12 POPS . . . . . 3 Reading AN X 8 OT Y 13

2 25
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

DF DF/
Outline

Leading edge differential Trailing edge differential

DF: Turns on the contact for only one scan when the leading edge of the trigger is detected. DF/: Turns on the contact for only one scan when the trailing edge of the trigger is detected. 7
Boolean Address 0 1 2 3 4 Trailing edge differential 5 Instruction ST DF OT ST DF/ OT Y 11 Y X 10 1 X 0

Program example
Ladder Diagram Leading edge differential 0 3 X0 X1 (DF) (DF/) Y10 Y11

Explanation of example
Y10 goes on for only one scan when the leading edge (off on) of X0 is detected. Y11 goes on for only one scan when the trailing edge (on off) of X1 is detected.
X0 X1
on off on off on 1 scan 1 scan 1 scan 1 scan

Y10 off

Y11 on off

Leading edge

Trailing edge

Related instructions
With the FP, FPX, FP0R, FP2, FP2SH and FP10SH, the DFI instruction can be used. It is executed only for the first scan.

2 26
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
The DF instruction executes and turns on output for only one scan duration when the trigger changes from an off to an on state. The DF/ instruction executes and turns on output for only one scan duration when the trigger changes from an on to an off state. There is no limit on the number of times the DF and DF/ instructions can be used. With the DF and DF/ differential instructions, only a change in the on and off status of the contact is detected. Thus, if the execution condition is initially on such as when the mode is changed to RUN or the power turned on in RUN mode, output will not be obtained.

Example:

Leading edge differential (DF) instruction


X0 on off Y10 on off DF instruction RUN not executed. Leading edge

Precautions during programming


With a program such as the one in the figure below, operation will be as follows.
X0 X0 (DF) X1 Y10 X1 Y10 1 2 3

1 2 3

When X1 is off, even if X0 rises, Y10 remains off. Even if X1 rises when X0 is on, Y10 remains off. If X0 rises when X1 is on, then Y10 will go on for one scan.

In the following program the execution condition is initially on, therefore output is not obtained.
R9013 DF Y10 R9013 only turns on during the first scan after RUN begins.

R9010 DF

Y10 R9010 is always on.

With the following program, output is obtained.


R9014 DF Y10 R9014 turns on from the second scan after RUN begins.

2 27
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Caution is required when using a differential instruction with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (below instructions). MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instructions When combining a differential instruction with an AND stack or pop stack instruction, take care that the syntax is correct. Operation is as follows with a circuit like the one shown below.

Time chart
X0 DF X1 Y0 X0 X1

Y0

You cannot output from here.

Please use a program as follows when Y0 is turned on at the rise of either X0 or X1.

Time chart
X0 DF X1 DF Y0 X0 X1

Y0

Example of a differential instruction application


Using a differential instruction makes it easier to adjust a program.

Application example for selfhold circuit


Using a differential instruction makes it possible to handle long input signals.
X0 DF Y10 X1 DF R0 R0 Y10 X0 X1 R0 Y10 Y10
With no differential instruction

2 28
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Application example for alternating circuit


A differential instruction can also be applied to an alternating circuit to hold and release the circuit using a single signal.

Example 1:
X0 R0 R0 DF R0 Y10 Y10 Y10

Example 2:
X0 R0 Y10 DF R0 Y10 R0 Y10

2 29
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

DFI
Outline

Leading edge differential (initial execution type)

When a leading edge of signal is detected, the contact goes on during that scan only. Leading edge detection is possible at the first scan.
Boolean Address Y10 DFI Leading edge differential (initial execution type) 0 1 3 Instruction ST DFI OT Y 10 X 0

Program example
Ladder Diagram X0 0

Explanation of example
Output to Y10 takes place for one scan only following a change in X0 from off to on. When the trigger X0 is met after RUN is begun
X0 Y10

One scan Leading edge When the trigger X0 is met before RUN
X0 Y10

One scan

Description
When the trigger (execution condition) changes from off to on, the DFI instruction outputs (differential output) during the following scan only. When the trigger (execution condition) is met before RUN is begun, output (differential output) takes place at the first scan. There is no limit to the number of times the DFI instruction can be used. When the mode is changed to RUN or the power is turned on in RUN mode and the trigger (execution condition) is already met, a DF instruction will not obtain output at the first scan. For this reason, use a DFI instruction.

2 30
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Precautions during programming


When used with instructions which change the order of execution such as MC to MCE and JP to LBL (see below), caution must be exercised. MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instructions Take care that the syntax is correct when combining a differential instruction with an ANS or POPS instruction.

2 31
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

SET RST
Outline

Set Reset

SET: When the execution conditions have been satisfied, the output is turned on, and the on status is retained. RST: When the execution conditions have been satisfied, the output is turned off, and the off status is retained.
Boolean Address Y30 Y30 Output destination Reset 20 21 24 25 Instruction ST SET ST RST X Y X Y 0 30 1 30

Program example
Ladder Diagram X0 20 X1 24 Set

Operands
Relay Instruction X SET, RST N/A Y A R A L (*1) A P N/A E (*2) A Timer/Counter Contact T N/A C N/A Index modifier (*3) A A: Available N/A: Not Available

(*1) This cannot be used with the FP0/FPe. (*2) This can be used only with the FP2SH/FP10SH. (*3) This can be used only with the FP0R/FP2/FP2SH/FP10SH. Operand WX RST N/A Relay WY A WR A WL A Timer/Counter SV A EV A Register DT A FL A

* A word device can be used only by FP2/FP2SH.

Explanation of example
When X0 turns on, Y30 goes on and holds on. When X1 turns on, Y30 goes off and stays off.
X0 X1
on off on off on

Y30 off

Description
The SET instruction executes when the trigger is turned on. Output turns on and holds on even if the triggers state changes. The RST instruction executes when the trigger is turned on. Output coil turns off and stays off even if the triggers state changes. You can use relays with the same number as many times as you like with the SET and RST instructions. (Even if a total check is run, this is not handled as a syntax error.) 2 32
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Index register I A

Constant K N/A H N/A M N/A

Index modifier A

Basic Instructions

When SET and RST instructions are used


When the SET and RST instructions are used, the output changes with each step during processing of the operation.

Example: When X0, X1, and X2 are turned on


Y10 This portion of the program is processed as if Y10 were on. X0 Y10

I/O update is performed when an ED instruction is executed, therefore the data actually output is determined by the final operation result. In the above example, the Y10 output is on. To output a result while operation is still in progress, use a partial I/O update instruction (F143).

Precautions during programming


The output destination of a SET instruction is held even during the operation of an MC instruction. The output destination of a SET instruction is reset when the mode is changed from RUN to PROG. or when the power is turned off, except when a hold type internal relay is specified as the output destination.

SET and RST instructions and differential instructions


Be sure to place a DF instruction before the SET and RST instructions to make program development and refinement easier. This is particularly effective when the same output destination is used in several places in the program.
(DF) (DF)

X1

Precautions when using the FP2SH and FP10SH


It is not possible to specify a pulse relay (P) as the output destination for a SET or RST instruction. All error alarm buffers can be cleared using the RST DT90400 instruction. The head of the error alarm buffers can be cleared using the RST DT90401 instruction.

How relays are handled with SET and RST instructions


Relays can be turned off using the RST instruction. Using the various relays with the SET and RST instructions does not result in double output. It is not possible to specify a pulse relay (P) as the output destination for a SET or RST instruction.

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Y10

X0

Y10

X2

Y10

X1

Y10

This portion is processed as if Y10 were off. This portion is processed as if Y10 were on.

2 33

Basic Instructions

KP
Outline Program example

Keep

This is output which is accompanied by set or reset input, and which is retained. 4
Boolean Address KP R 30 Reset input Output destination 0 1 2 Instruction ST ST KP X X R 0 1 30

Ladder Diagram X0 0 X1 1 Set input

Operands
Relay Instruction X KP N/A Y A R A L (*1) A P E Timer/Counter Contact T N/A C N/A Index modifier (*2) A A: Available N/A: Not Available

N/A N/A

(*1) This cannot be used with the FP0/FPe. (*2) This can be used only with the FP2/FP2SH/FP10SH.

Explanation of example
When X0 turns on, output relay R30 goes on and stays on. R30 goes off when X1 turns on.
X0 X1
on off on off on

R30 off

Set

Reset

Reset takes precedence

Description
When the set input turns on, output of the specified relay goes on and stays on. Output relay goes off when the reset input turns on. The output relays on state is maintained until a reset input turns on, regardless of the on or off states of the set input. If the set input and reset input turn on simultaneously, the reset input has priority.

Precautions during programming


When the KP instruction is programmed between the MC and MCE instructions, the status of output destination (relay) specified by the KP instruction is maintained. If a internal relay (R) specified by the KP instruction is set as the non-hold type, it is reset when the mode of operation is changed from RUN to PROG or when the power is turned off. (If an internal relay set as a hold type is specified as the output destination, a reset does not take place.)

2 34
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

NOP
Outline Program example

No operation
5

No operation

Ladder Diagram

Boolean Address 0 Instruction ST AN NOP AN/ OT X Y 2 10 X X 0 1

X0 0

X1

X2

Y10

1 2 3 4

NOP

Description
This instruction has no effect on the operation result to that point. The same operation takes place without a NOP instruction. The NOP instruction can be used to make the program easier to read when checking or correcting. When you want to delete an instruction without changing addresses, write a NOP instruction (overwrite the previous instruction). When you want to move the addresses of one part of a program without changing the program, insert a NOP instruction. This is a convenient means of breaking a long program into several blocks.

Example: To move the starting point of a program block from address 39 to address 40, insert a NOP instruction at address 39.
Address 36 39 40 44 ST OR OT ST AN OT ST DF ST X0 X1 Y10 X2 X3 R20 R2 X3 Address 36 39 40 41 45 ST X0 OR X1 OT Y10 NOP ST X2 AN X3 OT R20 ST R2 DF ST X3

This moves the starting point to address 40.

Insert a NOP instruction.

Deleting a NOP instruction


To delete the NOP instruction after editing in the PROG. mode, use the programming tools.

2 35
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

TML
Outline Program example

Timer (0.001s units)

Sets the on-delay timer for 0.001s units


Boolean Address Set value 5, K 300 4 0 1 Instruction ST TM K ST OT T R 5 X L 0 5 300 5 0

Ladder Diagram Timer instruction number Timer unit X0 TML

T5

R0

Timer contact of timer No. 5

Operands
Relay Instruction Timer/ Counter Register Index register IX IY Constant K A H N/A WX WY WR WL EV DT LD FL SV (*1) (*1) (*1) (*1) (*1) (*1) (*1) (*3) A A A A A A A A A Index modifier (*2) A A: Available N/A: Not Available

Set value

N/A N/A

(*1) This can be used with the FP2SH/FP10SH/FPX (V2.0 or more)/FP (V3.10 or more)/FP0R. (*2) This can be used with the FP2/FP2SH/FP10SH. (*3) This can be used with the FP2SH/FP10SH.

Description
The timer is reset and does not retain its data when the power is turned off or the mode is changed from RUN to PROG. (If you need to retain the operating state , set system register 6. In that case, a battery must be used.) Note) The FP0 T32 is the type with a builtin secondary battery. When the trigger (execution condition) is on, the set time decrements until the elapsed value reaches zero, and at this point the timer contact Tn (n represents the timer contact number) goes on. If the trigger (execution condition) goes off during decrement operation, operation stops and the elapsed value is reset to zero (cleared). An OT instruction can appear immediately after a timer coil.

2 36
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Setting the time in the timer


The time setting is equal to the time increment multiplied by the value set in the timer. The value set in the timer can be a decimal value within the range K1 to K32767. The time increment is 0.001 seconds, producing a time range of 0.001 to 32.767 seconds.

Example: When the value K43 is set, the time will be 0.001 43 = 0.043 seconds. When the K500 is set, the set time will be 0.001 500 = 0.5 seconds. Precautions during programming
The timer value decrements during processing, therefore, create the program so that one decrement occurs during one scan. (A correct result will not be obtained if no processing operations or multiple processing operations take place during one scan due to an interrupt program or JP/LOOP instruction.) If multiple processing operations are needed during one scan, set system register 4. Take care that the syntax is correct when combining a timer instruction with an ANS or POPS instruction. 1.

1) Specifying the timer setting with a decimal constant K


Timer operation when a decimal constant K is specified
When a K constant is specified for the timer setting, the memory area SV with the same number as the timer number is used as the setting value area. 1 When the mode is changed to RUN or the power is turned on in RUN mode, the timer setting will be transferred to the setting value area SV with the same number as the timer. Set value
X0 T5 TML5, K300 Y10
1

Transfer to SV area
SV5 300

When the trigger X0 (timer execution condition) rises from off to on, the setting is transferred from the setting value area SV to the elapsed value area EV with the same number. (The same operation takes place if the mode is changed to RUN while the trigger (execution condition) is on.) With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition) is on.
2

Transfer to EV area
EV5 300 229 228 227

X0 T5

TML5, K300 Y10

SV5 300
3

Decrement operation

2 37
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

When the value in the elapsed value area EV reaches zero, the timer contact T with the same number goes on.
X0 T5 TML5, K300 Y10 SV5 300
4

EV5 0

Decrement operation ends

Important points when specifying constant (K)


The constant (K) can be changed during RUN. A specified constant (K) cannot be modified by index modification. This program cannot be executed.
X0 TML5, I0K300

When the constant (K) is specified, the timer number cannot be modified by index modification. This program cannot be executed.
X0 TML I05, K300

2) Using a word memory area for a timer setting


Timer operation when a word memory area is specified
A word memory area specified as a set value is used as a setting value area 1 When the execution condition (X0) for a high-level instruction goes on, the setting value is set in the specified area (this explanation uses DT0 as an example). The following diagram uses the F0 (MV) instruction as an example. Setting value
X0 F0 MV, K30, DT0 TML5, DT0 Y10 DT0 30
1

X1 T5

Transfer to set value area

When the timer execution condition rises from off to on, the value is transferred from the setting value area (DT0 in this example) to the elapsed value area EV with the same number as the timer. (The same operation takes place if the mode is changed to RUN while the trigger (execution condition) is on.)

2 38
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition) is on. 2 Transfer to EV area X0
F0 MV, K30, SV5 TML5, DT0 Y10 DT0 30
3

X1 T5

Decrement

EV5 30 29 28 27

When the value in the elapsed value area EV reaches zero, the timer contact T with the same number goes on.
X1 T5 TML5, DT0 Y10 DT0 30
4

EV5 0

Decrement operation ends

Important points when specifying a word memory area


Even if the value of the specified word memory area is changed during decrement operation, decrement operation will continue using the value prior to the change. Timer operation using the new value will not begin until the next time the execution condition changes from off to on. There are both word memory area which reset (non-hold type) and do not reset (hold type) when the power is turned off or the mode changed from RUN to PROG. If you need to retain the value written to a word memory area when the power is turned on a second time, or after the mode is changed from RUN to PROG., use a memory area which has been set for hold type with the system register. When a word memory area is used for a set value, the memory area address and timer number can be modified by index modification.

Example:

Modifying a memory area address


X1 TML5, I2DT0

When I2 = K10, DT10 is used as the setting value area. Setting value area: DT10 Elapsed value area: EV5 Timer contact: T5

2 39
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Example:

Modifying a timer number


X1 T15 TML I05, DT 0 Y10

When I0 = K10, the timer operates as TML15. Setting value area: DT0 Elapsed value area: EV15 Timer contact: T15 The timer contact can also be modified by index modification.

Notes
When a timer number is modified, the number of steps is 4 regardless of the value in the index register. When both the memory area address and timer number are modified, different index registers can be used for each. Examples of timer instruction applications
Serial connection of timer Ladder diagram
X0 T0 T1
TMX 0, K 30 TML 1, K 200

Boolean
ST TMX K TML K ST OT ST OT X 0 0 30 1 200 0 10 1 11

Time chart
X0 T0 T1
on off on off on off on on

Y10 Y11

3s
0.2s

T Y T Y

Y10 off Y11 off

Parallel connection of timer Ladder diagram


X0 TML 0, K 300 TML 1, K 200 T0 T1 Y10 Y11

Boolean
ST PSHS TML K POPS TML K ST OT ST OT X 0 0 300 1 200 0 10 1 11

Time chart
X0 T0 T1
on off on off on off on

0.3s 0.2s

Y10 off

T Y T Y

Y11 on off

2 40
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Changing set values based on specified conditions


The set value is K50 when X0 is on and K30 when X1 is on.

Ladder diagram
X1 X0 X0 X1 X2 T5 F0 MV, K 500, DT 0 F0 MV, K 300, DT 0 TML 5, DT 0 Y30

Boolean
ST/ AN F0 ST/ AN F0 ST TML ST OT X X 1 0 (MV) K 500 DT 0 X 0 X 1 (MV) K 300 DT 0 X 2 5 DT 0 T 5 Y 30

Time chart
X0 X1 X2 T5
on off on off on off on off

DT0 K0

0.5s K500

0.3s K300

K500

Example of setting a set value from external digital switches


The BCD data of the digital switches connected to X0 through XF is converted and becomes the set value

Connection example
CPU and input units

Ladder diagram
R10 R11 T5

Boolean
ST F81 ST TML ST OT 10 (BIN) WX 0 DT 1 R 11 5 DT 1 T 5 Y 30 R

F81 BIN, WX 0, DT 1 TML 5, DT 1


Y30

Set value of timer

WX0 Digital switch

2 41
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

TMR TMX TMY


Outline

Timer (0.01s units) Timer (0.1s units) Timer (1.0s units)

TMR:Sets the on-delay timer for 0.01 s units TMX: Sets the on-delay timer for 0.1 s units TMY: Sets the on-delay timer for 1.0 s units 6
Boolean Address 0 1 4 5 Instruction ST TMX K Y37 ST OT T Y X 0 5 30 5 37

Program example
Ladder Diagram Unit of timer Timer number Set value

Trigger

0 4

X0 T5

TMX 5 K 30 Elapsed value


Timer contact of timer No.5

Operands
Relay Instruction Timer/ Counter Register Index register IX IY Constant K A H N/A WX WY WR WL EV DT LD FL SV (*1) (*1) (*1) (*1) (*1) (*1) (*1) (*3) A A A A A A A A A Index modifier (*2) A A: Available N/A: Not Available

Set value

N/A N/A

(*1) This can be used with the FP2SH/FP10SH/FPX (V2.0 or more)/FP (V3.10 or more)/FP0R. (*2) This can be used with the FP2/FP2SH/FP10SH. (*3) This can be used with the FP2SH/FP10SH.

Description
The timer is a nonhold type that is reset if the power is turned off, or if the mode is changed from the RUN to the PROG mode. (If it is necessary to hold the operation state, set system register 6. In that case, a battery must be used.) Note) The FP0 T32 is the type with a builtin secondary battery. When the trigger is on, the set time [n] decrements, and when the elapsed value reaches zero, timer contact Tn (n is the timer contact number) turns on. If the trigger turns off during operation, operation stops and the elapsed value is reset (cleared to 0). An OT instruction can be entered immediately after a timer coil.

2 42
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Timer set time


The formula of the timer set time is [the time unit] [set value] The timer setting [n] must be a decimal constant from K1 to K32767. TMR is from 0.01 to 327.67 seconds in increments of 0.01 seconds. TMX is from 0.1 to 3276.7 seconds in increments of 0.1 seconds. TMY is from 1 to 32767 seconds in increments of 1 second.

Example: When K43 is set in TMX, the set time is 0.1 43 = 4.3 seconds. When K500 is set in TMR, the set time is 0.01 500 = 5 seconds. Precautions during programming
In order to ensure correct timer operation, the TM instruction should be executed in every scan. Be aware of this when using instructions like INT, JP and LOOP. When a timer instruction is combined with an ANS or POPS instruction, take care that the syntax is correct.

Timer operation
The following is an example of setting the set value with a K constant. For an explanation of operation when an set value area (SV) is specified, see the following pages. When the mode is changed to RUN or when the power is turned on with the mode set to RUN, the timer set value is transferred to the set value area (SV) with the same number.
1

Set value X0 T5 TMX 5, K 30 Y10

Transfers to SV area SV5 30

When the timer trigger rises from off to on, the setting is transferred from the set value area (SV) to the elapsed value area (EV) with the same number. (The same operation takes place if the mode is changed to RUN when the trigger is on.) The value in the elapsed value area (EV) decrements every scan if the trigger stays on.
2

Transfers to EV area EV5 30 29 28 27

X0 T5

TMX 5, K 30 Y10
3

SV5 30

Decrements

2 43
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number turns on.
X0 T5 TMX 5, K 30 Y10 SV5 30
4

EV5 0 Decrement operation ends

Examples of timer instruction applications


Serial connection of timer Ladder diagram
X0 T0 T1
TMX 0, K 30 TMX 1, K 20

Boolean
ST TMX K TMX K ST OT ST OT X 0 0 30 1 20 0 10 1 11

Time chart
X0 T0 T1
on off on off on off on on

Y10 Y11

3s
2s

T Y T Y

Y10 off Y11 off

Parallel connection of timer Ladder diagram


X0 TMX 0, K 30 TMX 1, K 20 T0 T1 Y10 Y11

Boolean
ST PSHS TMX K POPS TMX K ST OT ST OT X 0 0 30 1 20 0 10 1 11

Time chart
X0 T0 T1
on off on off on off on 3s 2s

Y10 off

T Y T Y

Y11 on off

2 44
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Directly specifying a set value area number as a timer setting value


With FP0/FPe/FP/FPX/FP2/FP2SH/FP10SH with a CPU Ver. 4.4 or later with a CPU Ver. 2.7 or later, the set value area number can be specified directly as the set value n.
X0 X1 T5 F0 MV, K30, SV5 TMX 5, SV5 Y10
............. .............
1

The above program operates as follows:


1 2

When trigger X0 is on the data transfer instruction F0 (MV) is executed, set the K30 in SV5. When trigger X1 turns on, decrement operation begins from the set value 30.

Specify n (the number of the set value area SV) to be the same number as the timer.
Timer number Set value area number (n) TMX 5 SV 5

Ladder diagram:

These must be the same

Even if the value of the set value area (SV) is changed during decrement operation, the decrement operation will continue from the value before the change. Timer operation from the new value will not begin until decrement operation has ended or is interrupted and the trigger subsequently changes from off to on. The set value area (SV) is normally a nonhold type which resets if the power is turned off or the mode is changed from RUN to PROG. If the SV value was changed while in the RUN mode, and that value is to be used as the set value, without being reset, the next time that the power supply is turned on, or when the mode is changed from RUN to PROG, system register 6 should be used to specify the value as a hold type.

2 45
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Timer operation when a set value area number is directly specified


1

When the trigger for a highlevel instruction is on, the value is set in the set value area (SV). The following diagram shows an example of using the highlevel instruction F0(MV).
Set value X0 F0 MV, K30, SV5 TMX 5, SV 5
1

X1 T5

SV5 30 Transfers to SV area

Y10

When the timer trigger rises from off to on, the setting is transferred from the set value area (SV) to the elapsed value area (EV) with the same number. (The same operation takes place if the mode is changed to RUN when the trigger is on.) The value in the elapsed value area (EV) decrements if the trigger stays on every scan.
X0
2

Transfers to EV area EV5 30 29 28 27

F0 MV, K30, SV5 TMX 5, SV 5 Y10


3

SV5 30

X1 T5

Decrement operation

When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number turns on.
X1 T5 TMX 5, SV 5 Y10 SV5 30
4

EV5 0 Decrement operation ends

2 46
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Examples of applying direct specification of set value area numbers Changing set values based on specified conditions
The set value is K50 when X0 is on and K30 when X1 is on.

Ladder diagram
X1 X0 X0 X1 X2 T5 F0 MV, K 50, SV 5 F0 MV, K 30, SV 5 TMX 5, SV 5 Y30

Boolean
ST/ AN F0 ST/ AN F0 ST TMX ST OT X X 1 0 (MV) K 50 SV 5 X 0 X 1 (MV) K 30 SV 5 X 2 5 SV 5 T 5 Y 30

Time chart
X0 X1 X2 T5
on off on off on off on off

5s K50

SV5 K0

3s K30

K50

Example of setting a set value from external digital switches


The BCD data of the digital switches connected to X0 through XF is converted and becomes the set value

Connection example
CPU and input units

Ladder diagram
R10 R11 T5

Boolean
ST F81 ST TMX ST OT 10 (BIN) WX 0 SV 5 R 11 5 SV 5 T 5 Y 30 R

F81 BIN, WX 0, SV 5
TMX 5, SV 5 Y30

Set value of timer

WX0 Digital switch

With the FP2SH/FP10SH, FPX (Ver 2.0 or later), a memory area such as a data register DT can be specified as the set value. Regarding the operation, refer to the operation when specifying the SV.

2 47
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

CT
Outline Program example

Counter
5

Decrements a preset counter.

Ladder Diagram Count number X0 0 1 5 X1 C 100 Count input Reset input CT K 100 10

Boolean Address 0 1 2 5 6 Instruction ST ST CT K ST OT C Y X X 0 1 100 10 100 31

Elapsed value Set value Y31 Counter contact for counter no. 100 (example showing a case where 100 and subsequent numbers are specified for counters)

Operands
Relay Instruction Timer/ Counter Register Index register IX IY Constant K A H N/A WX WY WR WL EV DT LD FL SV (*1) (*1) (*1) (*1) (*1) (*1) (*1) (*3) A A A A A A A A A Index modifier (*2) A A: Available N/A: Not Available

Set value

N/A N/A

(*1) This can be used with the FP2SH/FP10SH/FPX (V2.0 or more)/FP (V3.10 or more)/FP0R. (*2) This can be used with the FP2/FP2SH/FP10SH. (*3) This can be used with the FP2SH/FP10SH.

Explanation of example
When the leading edge of X0 is detected ten times, counter contact C100 turns on and then Y31 goes on. The elapsed value is reset when X1 turns on.
X0 X1
on off on off

.... 10 times

C100 on off Y31 on off

2 48
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
The counter is a decremental preset counter. At the fall time when the reset input goes from on to off, the value of the set value area (SV) is preset in the elapsed value area (EV). When the reset input is on, the elapsed value is reset to 0. When the count input changes from off to on, the set value begins to decrement, and when the elapsed value reaches 0, the counter contact Cn (n is the counter number) turns on. If the count input and reset input both turn on at the same time, the reset input is given priority. If the count input rises and the reset input falls at the same time, the count input is ignored and preset is executed. An OT instruction can be entered immediately after a counter instruction.

Setting the counting value


The counting value can be set to a decimal constant (K constant) from K0 to K32767.

Counter operation
The following are examples of specifying a K constant as the set value. For an explanation of operation when a set value area number is specified, see following pages. (This example shows a case in which 100 is specified for the counter.)
1 2

When the mode is changed to RUN or the power is turned on with the mode set to RUN, the counter set value is transferred to the set value area (SV) with the same number. When the reset input falls, the value in the set value area (SV) is preset in the elapsed value area (EV).
1

X0

Transfer

CT 100 K 10

SV100 10

Preset

EV100 10

X1 C100 Y10

Each time the count input X0 turns on, the value in the elapsed value area (EV) decrements.
X0 CT 100 K 10
SV100 10 EV100 10

X1 C100

Y10

Decrements

9 8 7

next page

2 49
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

When the value in the elapsed value area (EV) reaches zero, the counter contact (C) with the same number turns on.
X0 CT 100 K 10
SV100 10
4

EV100 0

X1 C100

Decrement operation ends

Y10

Precaution during programming


When combining a counter instruction with an AND stack instruction or pop stack instruction, take care that the syntax is correct.

Precautions of counting input detection


In a counter instruction, the decrement takes place when the rise of the count input from off to on is detected. If the count input remains continuously on, since a decrement will only take place at the rise, no further subtraction will take place. In cases where the count input is initially on such as when the mode is changed to RUN or the power is turned on with the mode set to RUN, decrement operation will not take place at the first scan.
RUN (Power: on) Counter input Operation of instruction Not counting Counting

When used in combination with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (see below), the operation of the instruction may change depending on the timing of instruction execution and the count input. Exercise caution in these cases. MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instructions Step ladder instructions Subroutine instructions

Related instructions
Counter instructions also include an up/down counter instruction (F118). An increment instruction (F35) can be used to provide the same type of function.

2 50
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Directly specifying a set value area number as a counter set value


With FP0/FPe/FP/FPX/FP2/FP2SH/FP10SH with a CPU of Ver. 4.4 or later, the set value area number can be specified directly as the set value n.
X0 X1 X2 C100 F0 MV, K30, SV100 CT 100
.......... ..........
1

SV 100 Y30

The above program operates as follows:


1 2

When trigger X0 is on the data transfer instruction [F0 (MV)] is executed, set the K30 in SV100. When the count input X1 turns on, decrement operation begins from the set value 30.

Specify [n] (the number of the set value area SV) to be the same number as the counter. Display:
CT SV Counter number 100 100

These must be the same.

Set value area number (n)

Even if the value in the set value area (SV) is changed during decrement operation, the decrement operation will continue from the value before the change. Counter operation from the new value will not begin until the counter is reset and the count input subsequently changes from off to on.

2 51
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Counter operation when a set value area number is directly specified


1

When the trigger for a highlevel instruction is on, the value is set in the set value area (SV). The following diagram shows an example of using the highlevel instruction F0 (MV).
X0 X1 X2 C100 F0 MV, K30, SV100 CT SV 100 100 Y30
1

SV100 30 Transfers to SV area

When the reset input is off, the value in the set value area (SV) is preset in the elapsed value area (EV).
X1 X2 C100 CT SV 100 100 Y30

SV100 30
2

EV100 30

Presetting

Each time the count input X1 turns on, the value in the elapsed value area (EV) decrements.
X1 X2 C100 CT SV 100 100 Y30

SV100 30

EV100 30 29 28 27
3

Decrements

When the elapsed value area (EV) reaches zero, the counter contact C with the same number turns on.
X1 X2 C100 CT SV 100 100 Y30

SV100 30
4

EV100 0

Decrement operation ends

2 52
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Examples of applying direct specification of set value area numbers Changing set values based on specified conditions
The set value is K50 when X0 is on and K30 when X1 is on.

Ladder diagram
X1 X0 X0 X1 X2 X3 C100

Boolean
ST/ AN F0 ST/ AN F0 ST ST CT ST OT X X 1 0 (MV) K 50 SV 100 X 0 X 1 (MV) K 30 SV 100 X 2 X 3 100 SV 100 C 100 Y 30

Time chart
on off on off on off on off on off

Example when X0 turns on


X0 X1 X2 X3

F0 MV, K 50, SV 100 F0 MV, K 30, SV 100


CT SV 100 100 Y30

50 times ......

C100 SV100

K0

K50

Setting a set value from external digital switches


The BCD data of the digital switches connected to X0 through XF is converted and becomes the set value

Connection diagram
CPU and input units

Ladder diagram
X10

F81 BIN, WX 0, SV 100


X11 X12 CT SV 100 100 Y30

ST F81 ST ST CT ST OT

Boolean
X

Set value of counter

C100

Digital switch: WX0

10 (BIN) WX 0 SV 100 X 11 X 12 100 SV 100 C 100 Y 30

With the FP2SH/FP10SH, FPX (Ver 2.0 or later), a memory area such as a data register DT can be specified as the set value. Regarding the operation, refer to the operation when specifying the SV.

2 53
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

SR
Outline Program example

Shift register
5

One bit shift of 16-bit [word internal relay (WR)] data to the left.

Ladder Diagram X0 Data input X1 1 X2 2 Shift input Reset input SR WR 3

Boolean Address 0 1 2 3 Instruction ST ST ST SR X X X WR 0 1 2 3

Operands
Instruction Relay WX WY WR WL D: Data area N/A N/A A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register IX IY N/A Constant K N/A H N/A Index modifier (*) A A: Available N/A: Not Available

N/A N/A N/A N/A

(*) This can be used only with the FP2/FP2SH/FP10SH.

Explanation of example
1 is shifted in R30 if X0 is on, and 0 is shifted in R30 if X0 is off. If the X2 turns on, the contents of WR3 are reset to 0.
X0 X1 X2
on off on off on off on on on on on

If the X1 turns on when X2 is in the off state, the contents of the internal relay WR3 (internal relays R30 to R3F) are shifted one bit to the left.

R30 off R31 off R32 off R33 off R34 off

2 54
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
Shifts the specified data area (WR) one bit to the left. When the shift input turns on (rises), the contents of WR are shifted one bit to the left. During the shift, 1 is set in the empty bit (least significant bit) if the data input is on, or 0 if the data input is off. When shift input is turned on:
WR3 Bit position Binary data 3F . . . . . . . . . . . . . . . . 30 15 . . 12 0 0 0 0 11 . . 8 1 0 0 0 7 . . 4 1 0 0 0 3 . . 0 1 1 0 0

Shifts one bit to the left. Binary data 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 Data input (X0) on: set bit to 1. Data input (X0) off: set bit to 0.

When the reset input turns on, the contents of WR are cleared. When reset input is turned on:
WR (Binary data) 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0 1 Contents of WR3 are cleared to 0. WR (Binary data) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Precautions during programming


The SR instruction needs data input, a shift input, and a reset input. When the reset input and the shift input are detected simultaneously, the reset input has priority.
Shift input

Reset input
Data area (Rn) Reset input is given priority

If the internal relay area is specified as a hold type, take care that the data in the area is not reset to 0 when the power turns on. When combining a shift register instruction with an ANS or POPS instruction, take care that the syntax is correct.

2 55
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Cautions on shift input detection


With SR instructions, shift operation takes place when the offon rise of the shift input is detected. If the shift input remains continuously on, a shift will only take place at the rise. No further shifts will take place. In cases where the shift input is initially on such as when the mode is changed to RUN or when the power is turned on with the mode set to RUN, a shift operation will not take place at the first scan.
RUN (Power: on) Shift input Operation of instruction Does not shift Shifts

When used in combination with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (see below), the operation of the instruction may change depending on the timing of instruction execution and the shift input. Exercise caution in these cases. MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instructions

Related instructions
In addition to the shift register instruction, there is also a left/right shift register (F119). The same type of operation can also be implemented using a data shift instructions (F100 to F113) or a data rotate instructions (F120 to F123).

2 56
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

MC MCE
Outline

Master control relay Master control relay end

Executes the program between the MC and MCE when the execution condition turns on. 6 When the execution condition is off, output between the MC and MCE is turned off.
Boolean Address Master control relay number (MC 1 ) Y31 0 1 3 4 Y32 Master control area 5 6 7 8 9 (MCE 1 ) Master control relay number 9 Instruction ST/ MC ST OR OT ST OR OT MCE X Y Y X Y Y X 0 1 1 31 31 2 32 32 1

Program example
Ladder Diagram Execution condition

0 3

X0 X1 Y31 X2

6 Y32

Explanation of example
Executes the program from the MC1 instruction to the MCE1 instruction when the execution condition X0 turns on. If the execution condition is off, output is turned off without processing being carried out between the MC1 and MCE1 instructions.
on off on off on off on off on off on off

X0 Execution condition X1 Y31 X2 Y32

2 57
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
Executes program between the MC and MCE instructions when the execution condition turns on. When the execution condition is in the off state, the instructions operate as follows. Instruction
OT KP SET RST TM CT SR Differential Other instructions

Condition of input and output


All off Holds the state. Holds the state. Holds the state. Reset Holds the value. Holds the value. See next page. Not executed

You must be careful when using one of the instructions below, which are executed by detecting the leading edge of execution condition such as the differential instruction. DF instruction Count input for CT instruction Count input for F118 (UDC) instruction Shift input for SR instruction Shift input for F119 (LRSR) instruction NSTP instruction Differential execution type highlevel instruction (this instruction is specified by P and a number)

2 58
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Operation of differential instructions between MC and MCE


If a differential instruction is used between MC and MCE, the output will vary as follows depending on the timing of the MC execution condition and the input of differential instruction.
X0 MC X1 DF 0 Y10

MCE 0

Time chart 1
X0 X1 Y10
on off on off on off Execution of previous differential instruction The input X1 of the differential instruction has not changed with respect to the previous execution, therefore differential output is not obtained.

Time chart 2
X0 X1 Y10
on off on off on off Execution of previous differential instruction The input X1 of the differential instruction has changed from off to on with respect to the previous execution, therefore differential output is obtained.

Output will not be obtained if the same execution condition is specified for an MC instruction and a differential instruction. If output is needed, enter the differential instruction outside of the MC to MCE instruction sequence.
X0 MC X0 DF 0 Y10

MCE 0

X0 MC X0 0 R0

MCE 0 R0 Y10 DF

2 59
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Precautions during programming


A second MCMCE instruction pair can be entered (nested) between an initial MCMCE instruction pair. (There is no limit to the number of nestings.)
X0 MC X1 X2 MC X3 X4 MC X5 2 Y12 1 Y11 0 Y10

MCE 2 MCE 1 MCE 0

The program cannot be executed if: If either MC or MCE is missing The order of the MC and MCE instructions is reversed.
MCE 0 X1 X0 MC 0 Y10

There are two or more master control instruction sets with the same number.
X0 MC X1 MC X2 0 Y10 0 Duplicated use

MCE 0 MCE 0

2 60
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

JP LBL
Outline Program example

Jump Label

Skips to the LBL instruction with the same number as the JP instruction.
Boolean Address 10 11 Instruction ST JP X 1 1 1

Ladder Diagram X1 Label number 20

10

(JP

1)

....

....

(LBL 1 )

20

LBL

Explanation of example
When the execution condition X1 turns on, the program skips from JP1 to LBL1.
X1 Program (JP Program (LBL 1 ) Program 1) X1: on No execution

Description
When the execution condition turns on, the program jumps to the label (LBL) instruction that has the same number as the specified jump number. The program then continues with the instructions starting from the address of the label that is the jump destination. The same label is used for the JP, LOOP and F19(SJP) instructions. Any of these instructions can be used as the starting point for the jump destination. Two or more JP instructions with the same number can be used in a program.
X0 R20 X20 (JP (JP LOOP 1, DT0 (LBL 1 ) 1) 1)

Two or more LBL instructions with same number cannot be specified in the same program. If a label for the jump destination is not programmed, a syntax error will occur.

2 61
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

You must be careful when using one of the instructions below, which are executed by detecting the rise of a execution condition such as the differential instruction. DF (leading edge differential) Count input with CT (counter) Count input with F118 (up/down counter) Shift input with SR (shift register) Shift input with F119 (left/right shift register) NSTP (next step) Differential execution type highlevel instruction (this instruction is specified by P and a number)

Precautions during programming


If the address of the LBL instruction precedes the address of the JP instruction, the scan will not terminate and an operation bottleneck error may occur. The JP instruction and LBL instruction cannot be used in the step ladder area (the area between SSTP and STPE). You cannot perform a jump from a main program to a sub program (a subroutine program or interrupt program after the ED instruction), from a sub program to a main program, or from a sub program to another sub program.

TM, CT, and SR instruction operation between JP and LBL instructions


When the LBL instruction is located after the JP instruction: TM instruction: The TM instruction is not executed. If it is not executed once during a single scan the correct time cannot be guaranteed. CT instruction: Even if the count input is on, counting is not performed. The elapsed value is preserved. SR instruction: Even if the shift input is on, no shift is performed. The contents of the specified register are preserved. When the LBL instruction is located before the JP instruction: TM instruction: Because the TM will run several times during a single scan, the correct time cannot be guaranteed. CT instruction: If the state of the count input does not change during the scan, it will operate in the usual way. SR instruction: If the state of the shift input does not change during the scan, it will operate in the usual way.
X1 X1 (JP 1)

(LBL 1 ) The program jumps when the execution condition turns on. (LBL 1 )

(JP

1)

The program is repeated when the execution condition turns on.

Note
With the FP2SH and FP10SH, the time can be kept accurately even if these are executed multiple times during a single scan. To use these together with the JP instruction, change the setting of system register 4.

2 62
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Differential instruction operation between JP and LBL instructions


If a differential instruction is used in the area between a JP and LBL instruction, be aware that the output will differ as shown below depending on the execution condition of the JP and the input timing of differential instruction.
X0 JP X1 DF LBL 1 Y10

Time chart 1
X0 X1 Y10
on off on off on off Previous execution of JP instruction Since the execution condition X1 for the differential instruction did not change from the previous execution, the differential output cannot be obtained.

Time chart 2
X0 X1 Y10
on off on off on off Previous execution of JP instruction Since the execution condition X1 for the differential instruction changed from on to off from the previous execution, the differential output can be obtained.

When the execution condition for the JP instruction equals the execution condition for the differential instruction, the leading edge (or trailing edge) of the execution condition for the differential instruction will not be detected. If the differential output is required, do not write the differential instruction between the JP and LBL instructions.
X1 JP X1 DF/ LBL 1 1 Y11 Not executed.

X1 X1

Y11 DF/ JP LBL 1 1 Placed outside of the area between JP and LBL.

2 63
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

LOOP LBL
Outline

Loop Label

Skips to the LBL instruction that has the same number as the LOOP instruction and executes what follows, repeatedly, until the data of a specified operand becomes 0. 7
Boolean Address 10 X0 10 16 X1 Instruction ST F0 K DT 16 Number of timers for loop 30 LBL X 0 (MV) 5 0 1

Program example
Ladder Diagram

F0 MV, K5, DT 0
Label number

11

(LBL 1 )

....

LOOP 1 , DT 0
S Label number

30 31

ST LOOP DT

1 1 0

16-bit area for setting number of times for loop operation

Operands
Relay Instruction WX WY WR Set value (*1) (*2) (*3) (*4) (*5) N/A A A WL (*1) A Timer/Counter SV A EV A Register DT A Index register Constant K N/A H N/A LD FL IX IY (*1) (*2) (*3) (*4) A A A A Index modifier (*5) A A: Available N/A: Not Available

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FPe/FP0R/FP/FPX. With the FP0R, FP, FPX, FP2, FP2SH and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH and FP10SH, this is ID. Only FP2, FP2SH and FP10SH label numbers can be used.

2 64
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
When the execution condition (trigger) turns on, 1 is subtracted from the contents of S and if the result is other than 0, the program jumps to the label (LBL instruction) that has the same number as the specified number. The program then continues with the instructions starting from the address of the label that is the loop destination. Set the number of times to execute the program with the LOOP instruction. When the number of times set in S (K constant) reaches 0, the jump will not occur even if the execution condition (trigger) turns on.
X0 F0 MV, K5 , DT 0 (LBL 1 ) X1 LOOP 1 , DT 0 If the value of DT0 is K5, then after performing the jump 5 times, even if X1 is set to on, the jump operation is not executed.

If the contents of memory area specified by S is 0 from the beginning, the jump operation is not executed (it is ignored). A label is common for the JP instruction, the LOOP instruction and the F19 (SJP) instruction. One can be used as the destination for all instructions as many times as required.
X0 JP R20 JP 1 1

X20

LBL LOOP 1, DT0

Two or more LBL instructions with the same number cannot be specified in a program. With the FP2, FP2SH and FP10SH, index modification of the number specified by the LOOP instruction is possible. If a label for the loop destination is not programmed, a syntax error will occur.

Flag conditions

Error flag (R9007): Turns on and remains on when the specified value in the data area S becomes less than 0 (when the most significant bit (bit position 15) of the specified data area becomes 1).

Error flag (R9008): Turns on for an instant when the specified value in the data area becomes less than 0 (when the most significant bit (bit position 15) of the specified data area becomes 1).

2 65
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

TM, CT, and SR instruction operation between the LOOP and LBL instructions
When the LBL instruction is located after the LOOP instruction: TM instruction: The TM instruction is not executed. If it is not executed once during a single scan, the correct time cannot be guaranteed. CT instruction: Even if the count input is on, counting is not performed. The elapsed value is preserved. SR instruction: Even if the shift input is on, no shift is performed. The contents of the specified register are preserved. When the LBL instruction is located before the LOOP instruction: TM instruction: Because the timer will run several times during a single scan, the correct time cannot be guaranteed (see note). CT instruction: If the state of the count input does not change during the scan, it will operate in the usual way. SR instruction: If the state of the shift input does not change during the scan, it will operate in the usual way.
X0 LOOP 1, DT 0 The program is repeated when the execution condition (trigger) turns on. X0 LOOP 1, DT 0

(LBL 1 ) The program jumps when the execution condition (trigger) turns on.

(LBL 1 )

Note
With the FP2SH and FP10SH, the time can be kept accurately even if these are executed multiple times during a single scan. To use these together with the LOOP instruction, change the setting of system register 4.

2 66
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Precautions during programming


When the label is written in an address before the LOOP instruction, be careful of the following points. Be sure to have the instruction that sets the number of loop cycles before the area between the LBL and LOOP instructions. Set the instructions that will be repeated between LBL and LOOP so that they have the same trigger as the LOOP instruction. During repeating, it is possible that one scan can exceed the surveillance time for operation jams and cause a operation bottleneck error.

Example 1: Execute 5 times of both F0 (MV) instructions when X5 is on.


X5 F0 MV, K 5, DT 0 LBL 10 X5 F0 MV, WR 0, DT 10 F0 MV, WR 1, DT 20 LOOP 10, DT 0

Example 2: Send the value of DT100 to DT200 through DT219.


R0 F0 MV, K 20, DT 0 F0 MV, K 0, IX LBL 10 R0 F0 MV, DT100, IXDT200 F35 +1, IX LOOP 10, DT 0

The LOOP instruction and LBL instruction cannot be used in the step ladder area (the area between SSTP and STPE). You cannot perform a jump from a main program to a subprogram (a subroutine program or interrupt program after the ED instruction), from a subprogram to a main program, or from a subprogram to another subprogram. You must be careful when using one of the instructions below, which are executed by detecting the leading edge of execution condition (trigger) such as the differential instruction. DF (leading edge differential) Count input of CT (counter) Count input of F118 (up/down counter) Shift input of SR (shift register) Shift input of F119 (left/right shift register) NSTP (next step) Differential execution type highlevel instruction (this instruction is specified by P and a number)

2 67
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

BRK
Outline Program example

Break
8

Stops execution in TEST/RUN mode.

Ladder Diagram

Boolean Address Instruction

10

X0

Y30

10 11 12

ST OT BRK ST OT

X Y X Y

0 30 1 31

(BRK) 13 X1 Y31

13 14

Description
The BRK instruction is effective only in the TEST/RUN mode. In the normal RUN condition, this instruction is not executed. In the TEST/RUN mode, program execution is temporarily stopped with the address containing this BRK instruction. The BRK instruction is used for checking the program by executing a part of the program.

How to use the BRK instruction Procedure:


1. Set the INITIALIZE/TEST switch of the CPU to the TEST side. 2. Select the modes for TEST/RUN operation by using programming tool software, as follows: Output: DISABLE or ENABLE (select one according to your requirements) BRK: VALID (in the BRK instruction valid mode) Test mode: ConTI (in the continuous run mode) 3. Change the mode to RUN for starting TEST/RUN operation. R0 Y2F 0

10

X0

Y30

(BRK) 13 X1 Y31

Stops at the address 12

2 68
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

4. When X0 is in the on state, the BRK instruction is executed and program execution stops. 5. Press the F3 key while holding down the Shift key in the MONITOR & TEST RUN window of the programming tool software to continue the program execution. If a BRK instruction is executed, program execution stops. X1 Y31 Starts from the address 13 13 Execution (BRK) Stops at the address 35

35

X12

6. Up to the end of the program, proceed according to the operation in steps 4 and 5 above. If you want, change to the step operation mode, in which the program stops execution after execution of each instruction.

2 69
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ED
Outline Program example

End
9

Indicates the end of the ordinary program.

Ladder Diagram

Boolean Address 0 Instruction ST OR AN/ OT X R X R R X Y 0 0 1 0 0 2 30

X0 0 R0 R0

X1

R0

1 2 3

....

....

96 99

X2

Y30

96 97 98 99

ST AN OT ED

( ED )

Description
Indicates the end of the ordinary program. Program area Address 0

Ordinary program
( ED )

Subroutine program Interrupt program Program areas are divided into an ordinary program area (main program) and subroutine and interrupt program areas (subprograms) using this instruction. Enter subroutine programs and interrupt programs after the ED instruction.

2 70
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

CNDE
Outline Program example

Conditional end

Ends one scan of the program when the execution condition (trigger) turns on. 10
Boolean Address 0 1 X0 0 Y30 X3 96 R0 98 X2 Execution condition (Trigger) X1 Y30 2 3 96 97 98 99 100 Instruction ST OR AN/ OT X Y X Y X R X Y 0 30 1 30 3 0 2 31

Ladder Diagram

....
ST CNDE ST AN/ OT

....

( CNDE )
Y31

Description
The CNDE instruction enables you to end one scan of the program. When the execution condition (trigger) turns on, the program finishes and the input, output, and other such operations are performed. When the operations are completed, the program then returns to the starting address. You can adjust the timing that operations are performed by performing the operations only after a required number of program scans are completed. The CNDE instruction cannot be performed in subprograms such as subroutine programs or interrupt programs. Use the CNDE instruction in the main program area only. Two or more CNDE instructions can be used within the main program. You must be careful when using one of the instructions below, which are executed by detecting the leading edge of a execution condition (trigger) such as the differential instruction. DF (leading edge differential) Count input for CT (counter) Count input for F118 (UDC) (up/down counter) Shift input for SR (shift register) Shift input for F119 (LRSR) (left/right shift register) NSTP (next step) Differential execution type highlevel instruction (this instruction is specified by P and a number)

2 71
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Program execution when the CNDE instruction is executed (when X3 turns on). X0 Y30 X1 Y30

X3

CNDE

This part of the program is not executed when the CNDE instruction is executed. ED Program execution during normal scanning.

2 72
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

EJECT
Outline Program example

Eject

Adds page break for use when printing.


Boolean Address Y0 0 1 ( EJECT ) R1 3 R2 5 Y2 Y1 2 3 4 5 6 Instruction ST OT EJECT ST OT ST OT R Y R Y 1 1 2 2 R Y 0 0

Ladder Diagram R0 0 2

Explanation of example
Insert the EJECT instruction in the address where you want the page to break when printing out the program you created. In the above, the page will break at address 2.

Description
When printing out the program created with the software tool, the page will break at the position where this instruction is inserted. As with the NOP instruction, processes in the program will not be affected.

2 73
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

2 74
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

SSTP NSTL NSTP CSTP STPE


Outline

Start step Next step (scan execution type) Next step (pulse execution type) Clear step Step end

SSTP: Indicates the start of a step ladder process. 11 NSTL: Opens a step ladder process. NSTL is executed every scan if its trigger is on. NSTP: Opens a step ladder process. NSTP is executed when the leading edge of its trigger is detected. CSTP: Resets the specified process. STPE: Indicates the end of step ladder area.
Boolean Address (NSTP (SSTP 1) 1) Y10 X1 18 22 X3 100 104 (NSTL (SSTP 2) 2) 10 11 14 17 18 19 22 100 101 104 Instruction ST NSTP SSTP OT ST NSTL SSTP ST CSTP STPE Y X X 0 1 1 10 1 2 2 X 3 50

Program example
Ladder Diagram X0 10 14 17

....

....

(CSTP 50 ) (STPE )

2 75
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Description
When the NSTL instruction or the NSTP instruction is executed, the process starting with the SSTP instruction of the specified number is started and executed. In a step ladder program, a process is identified as being from one SSTP instruction to the next SSTP or STPE instruction.

Example:
(SSTP X0 X1 F0 MV, DT 0, DT 100 (SSTP 2) 1) Y10 Process 1

Operations such as the sequence control, selection branch control, parallel branch control are easily executed.

Sequence control
Only the necessary processes are switched and executed in order.
Process 1 Process 2 Process 3 Process 4

Selection branch control


The processes are selected and executed according to conditions.
Process 2 Process 1 Process 3 Process 4

Parallel branch merge control


Multiple processes are executed simultaneously. After each process is completed, the next process is executed.
Process 2 Process 1 Process 3 Process 4

2 76
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Syntax of step ladder instruction


SSTP (start step) instruction: This instruction indicates the start of a process n.
Program Program Program SSTP SSTP SSTP 1 Process 1 2 5 Process 2

In a step ladder program, a process n is identified as being from one SSTPn instruction to the next SSTP or STPE instruction. No two processes can have the same process number. The OT instruction can be programmed at the address just after the SSTP instruction. The SSTP instruction cannot be programmed in subprogram (subroutine or interrupt program area). The area starting from the first SSTP instruction to the STPE instruction is referred to as the step ladder area. The programs in this area are all controlled as processes. Other areas are referred to as ordinary ladder areas.
Ordinary ladder area SSTP 1 Step ladder area SSTP STPE Ordinary ladder area n

There is a special internal relay that turns on for one scan only when a process on the step ladder starts. (R9015: step ladder initial pulse relay.) This relay is used to perform operations for only one scan for counter reset or other such process starts.

2 77
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

NSTL (Next step, scan execution type) instruction: NSTP (Next step, differential (pulse) execution type) instruction:
When an NSTPn or NSTLn instruction is executed, the process with the same process number n as the NSTP or NSTL instruction is opened. The execution condition (trigger) for the next step instruction means the execution condition (trigger) to start the process.
X0 NSTP SSTP R0 1 1 X0: off on SSTP1: Starts

NSTL SSTP

2 2

R0: on SSTP1: Cleared SSTP2: Starts

Declare the first process to start in the next step instruction in the ordinary ladder area. A process can be started from the ordinary ladder area or from an already started process. However, when you start a process with a next step instruction from within a process, the process that is operating and contains the next step instruction is automatically cleared and the specified process starts. Be aware that the outputs and other processes are actually turned off by the clear operation during the next scan. The NSTP instruction is a differential (pulse) execution type instruction, so it is executed for only one time when the execution condition (trigger) turns on. Also, since it only detects if the execution condition (trigger) has changed between on and off, when switched to the RUN mode or when the power supply is turned on while in the RUN mode and the execution condition (trigger) is already on, the instruction is not executed.
RUN (Power: on) Shift input

Operations with NSTP Operations with NSTL

Not executed

Executed

Executed

Executed

When you use the NSTP instruction with one of the following instructions that changes the order of the execution of instructions, be aware that the operation of the instructions will differ depending on the timing of their execution and their triggers. MC to MCE instructions JP to LBL instructions F19 (SJP) LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instruction When combining the NSTP instruction with an ANS or POPS instruction, be careful that the programming is correct.

2 78
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

CSTP (clear step) instruction:


When a CSTP instruction is executed, the process n with the same process number n is cleared. This instruction can be used to clear the final process or to clear the processes when the parallel branch merge control is executed.
X0 NSTP 99 X1 CSTP 99 X1: on Process 99: cleared

SSTP 99 STPE

Process 99

A process can also be cleared from the ordinary ladder area or from a process that is already started.

Note
With the FP, FPX, FP0R, FP2, FP2SH and FP10SH, the SCLR (Block Clear) instruction used to clear multiple processes of specified range at one time. Refer to SCLR instruction.

STPE (step end) instruction:


The STPE instruction indicates the end of the step ladder area. Be sure to write this instruction at the end of the last process. Thus, the final process of the step ladder is from SSTP to STPE.
Ordinary ladder area SSTP 1 Step ladder area Process n Ordinary ladder area

SSTP STPE

In the above situation, process n is the last process. The STPE instruction is used only once in the main program. (This instruction cannot be programmed in subprogram such as a subroutine program or interrupt program.)

Precautions during programming


You do not have to program processes in the order of process numbers. In the step ladder area, you cannot use the following instructions: Jump instructions (JP and LBL) Loop instructions (LOOP and LBL) Master control instructions (MC and MCE) Subroutine instructions (SUB and RET) (*) Interrupt instructions (INT and IRET) ED instruction CNDE instruction (*): The CALL instruction can be used within the step ladder area.

2 79
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

When you need to clear an entire processes in step ladder program, use the master control (MC and MCE) instructions as shown below.

Example:

All processes are cleared when X0 becomes on.


X0 MC SSTP SSTP SSTP STPE MCE ED 0 0 1 2 3 Step ladder area Master control instructions

It is not necessary to execute processes in order of process numbers. You can execute two or more processes at the same time. Once you force on or off an output that is programmed in a process not yet executed, the output condition is maintained until the process starts even if the forced on and off operation is canceled.

Step ladder operations


When the step ladder processes are programmed, program execution proceeds in the ordinary ladder area and in the processes triggered by the next step instructions (NSTL or NSTP). Processes that have not been triggered are ignored.
Ordinary ladder area SSTP 1 Not executing Not executing process 1 SSTP Executing process 2 SSTP STPE Ordinary ladder area ED Executing 9 Not executing Not executing process 9 2 Executing Executing

In the diagram, program execution occurs in the ordinary ladder areas and in process 2. The moment the step ladder process is opened, step ladder internal pulse relay R9015 turns on for an instant only in the first scan of the process. You can use R9015 to reset a counter or shift register used in the opened process.

2 80
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

The execution state (start/stop) for processes are stored in special data registers:
Type FP0 C10, C14, C16, C32/ FPe FP0 T32/FP0R FP/FPX/FP2/FP2SH/ FP10SH Special data register DT9060 to DT9067 DT90060 to DT90067 DT90060 to DT90122

Example:

The startup conditions for processes No. 16 through No. 31


15 . . 12 11 . . 8 7 . . 4 3 . Bit position Process number 31 . . 28 27 . . 24 23 . . 20 19 . DT9061/DT90061 0 0 0 0 0 0 0 1 0 0 0 0 0 0 . 0 . 16 0 0

When bit position 8 of DT9061/DT90061 is 1, the process no. 24 is starting.

Notes on process clear


If the next step instruction is executed in an active process, that process is automatically cleared. However, the actual clear operation does not occur until the next scan. Therefore, for one scan during the process transition, there will be two simultaneously active processes. If you do not want them to be on at the same time, program with an interlock circuit. If there is a possibility of processes being simultaneously on because of hardware response delays, adapt hardware processing to take the response delay into account.

Example:
SSTP Y11 X0 0 Y10

NSTP SSTP

1 1 Y11

Y10

If the process is cleared, the instructions in that process operate as follows.


Instruction OT KP SET RST TM CT SR DF and DF/ (*) Other instructions Operation status All off Holds the state. Holds the state. Holds the state. Reset the elapsed value and timer contact output. Holds the state at the time just before the trigger turns off. Holds the state at the time just before the trigger turns off. Remembers the state of execution condition (trigger). Not executed.

(*): Same operation as when the execution condition (trigger) for the MC instruction turns off. Refer to the explanation of the MC and MCE instructions.

2 81
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

You must be careful when using one of the instructions below, which are executed by detecting the leading edge of execution condition (trigger) such as the differential instruction. DF (leading edge differential) Count input of CT (counter) Count input of F118 (UDC) (up/down counter) Shift input of SR (shift register) Shift input of F119 (LRSR) (left/right shift register) NSTP (next step) Differential execution type highlevel instruction (this instruction is specified by P and a number)

Examples of step ladder instructions


1

Sequence control of a process


This program repeats the same process until the work in a particular process is completed, then switches to be the next process as soon as the work is completed. Program an NSTL instruction to trigger the next process in each process. When the NSTL instruction is executed, the next process is activated, and the currently executing process is cleared. It is not necessary to execute in order of process number. You can also program the NSTL instruction to trigger a previous process in response to current conditions.

Program example
1) When the X10 turns on, process 10 is executed. 2) When X11 turns on, process 10 is cleared and process 11 is executed. 3) When X12 turns on, process 11 is cleared and process 12 is executed. 4) When X14 turns on, process 12 is cleared and step ladder operation finishes.

Process flowchart
X10: on Process 10 X11: on Process 11 X12: on Process 12 R52 turns on R51 turns on R50 turns on

Program
X10 (NSTP 10 ) (SSTP 10 ) R50 X11 (NSTL 11 ) (SSTP 11 ) R51 X12 (NSTL 12 ) (SSTP 12 ) R52 X14 (CSTP 12 ) (STPE ) Process 12 Process 11

X14: on END
Process 10

Time chart
X10 on off X11 on off X12 off X14 off
on on Executing Process 10 Process 11 Process 12

R50 Cleared

Executing R51 Cleared

R52 Executing Cleared

2 82
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Selection branch control of a process


This program selects and switches to the next process according to the actions and results of a particular process. Each process loops until its work is completed. Program two or more NSTL instructions to trigger the next process in a process. Depending on the execution conditions, the next process is selected, triggered and program execution is transferred.

Program example
1) When X100 turns on, process 100 is executed. 2) When X101 turns on in process 100, process 101 is executed. Or when X102 turns on in process 100, process 102 is executed. 3) When X103 turns on in process 101, process 101 is cleared and process 200 is executed. When X104 turns on in process 102, process 102 is cleared and process 200 is executed. 4) When X200 turns on, process 200 is cleared and step ladder operation finishes.

Process flowchart
X100: on Process 100 R150 turns on.

X101: on Process 101

X102: on

R152 R151 Process 102 turns on. turns on. X104: on X103: on

Process 200 X200: on END

R153 turns on.

Program
X100 (NSTP 100 ) (SSTP 100 ) R150 X101 (NSTL 101 ) X102 (NSTL 102 ) (SSTP 101 ) R151 X103 (NSTL 200 ) (SSTP 102 ) R152 X104 (NSTL 200 ) (SSTP 200 ) R153 Process 200 X200 (CSTP 200 ) (STPE ) Process 102 Process 101 Process 100

Time chart
When X101 turns on X100 off
on

X101 on off X102 off


on

X103 on off X104 off X200 off


on on Process 100 Process 101

R150 Cleared R151 Cleared

Executing Executing

Executing R152 Cleared

R153 Cleared

Executing

Process 200

2 83
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Parallel branch merge control of a process


This program triggers multiple processes simultaneously. After each of the branch processes has completed its work, they merge again before transferring execution to the next process. Program multiple NSTL instructions for one trigger in a process. To merge processes, include a flag indicating the state of the other processes in the transfer condition for the next process. When they merge and execute the next process, clear all uncleared processes at the same time.

Program example

1) When X0 turns on, process 0 is executed. 2) When X10 turns on, process 0 is cleared and process 10 and process 20 are executed simultaneously (Parallel branch control). 3) When X11 turns on, process 10 is cleared and process 11 is executed. 4) When X30 turns on, process 11 and process 20 are cleared and process 30 is activated. (Merge control) Clear process 20 with the clear instruction. Clear process 11 and execute process 30. 5) When X31 turns on, process 30 is cleared and initial process 0 is executed again.

Process flowchart
X0: on Process 0 R20 turns on.

Process 10 X11: on Process 11

R21 turns on. Process 20 R23 turns on. X30: on Process 30 X31: on

R22 turns on.

R24 turns on.

Program
X0 (NSTP (SSTP X10 (NSTL 10 ) (NSTL 20 ) (SSTP 10 ) R21 X11 (NSTL 11 ) (SSTP 20 ) R22 R100 (SSTP 11 ) R23 X30 R100 (NSTL 30 ) (CSTP 20 ) (SSTP 30 ) R24 X31 (NSTL 0 ) (STPE ) Process 30 Process 11 Process 20 Process 10 0) 0) R20 Process 0

Time chart
X0
on off

X10 on off X11 on off X30 on off X31 on off R20 Cleared
Executing Process 0

Process 0 R21 Executing Cleared Process 10 R22 Executing Process 20 Cleared

R23 Cleared R24 Cleared

Executing Executing Process 11 Process 30

2 84
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

SCLR
Outline Program example

Clear multiple processes

Reset multiple processes specified by n1 and n2.


Boolean Address 0 X0 0 X1 8 NSTL SSTP NSTL NSTL NSTL SSTP 21 XF 100 106 SCLR K1, K3 STPE 106 0 0 1 2 3 1 Y10 1 4 8 9 12 15 18 21 : 100 101 ST SCLR K K STPE 1 3 Instruction ST NSTL SSTP ST NSTL NSTL NSTL SSTP OT Y : X F X X 0 0 0 1 1 2 3 1 10

Ladder Diagram

Explanation of example
When input XF goes on, processes in operation from 1 through 3 are cleared. X0 Process 0 X1

Process 1

Process 2

Process 3

XF END

Description
When an SCLR instruction is executed, all processes in operation from process n1 through process n2 are cleared.

Precautions during programming


Set so that n1 is greater than or equal to n2 (n1 n2). The SCLR instruction can be executed from both normal ladder areas and operating processes.

2 85
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

CALL SUB RET


Outline

Subroutine call Subroutine entry Subroutine return

CALL: Executes the specified subroutine program. 12 SUB: Indicates the start of the subroutine program. RET: Indicates the end of the subroutine program.

Program example
Ladder Diagram Boolean Address 10 (CALL 1) ) 1) ) Subroutine 11 Instruction ST CALL X 0 1

10 20 21 30

X0

Subroutine program number (ED (SUB (RET

20 21 30

....
ED SUB

....
1

....
RET

....

Description
When the execution condition (trigger) turns on, the CALL instruction is executed and the subroutine program of the specified number is executed starting with the SUB instruction. When the subroutine reaches the RET instruction, the program returns to the address after the CALL instruction of the main program and the execution of the main program resumes.
X0 Main program CALL Main program ED SUB Subroutine program RET n
2

1 3

When CALLn is executed, the program is executed in the order

shown above.

Subroutine Program Syntax


The subroutine program n is the program from the SUBn instruction to the RET instruction. Always place the address (subroutine) after the ED instruction. The CALL instruction can be programmed in the main program area, interrupt program area, or subroutine program area. Two or more CALL instructions with the same program number can be specified in a program.

2 86
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Nesting of subroutines is possible until the 5th nesting.


SUB 0 CALL1 RET (Stage 2) SUB 1 CALL2 RET (Stage 3) SUB 2 CALL3 RET

(Stage 4) SUB 3 CALL4 RET

(Stage 5) SUB 4 RET

Called up from inside of the subroutine. 5th nesting example

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when performing five nestings and executing the CALL instruction for the subroutine of the 5th nesting. Turns on for an instant when performing five nestings and executing the CALL instruction for the subroutine of the 5th nesting.

Precautions during programming


In the interrupt program, a subroutine program cannot be used.
INT SUB RET IRET 1 21 Subroutine

In the subroutine program, an interrupt program cannot be used.


SUB INT Interrupt program IRET RET 21 0 Subroutine

For the FP0/FPe, subroutine program cannot be written inside another subroutine program.
SUB SUB 0 2 Subroutine program RET

Subroutine program

2 87
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

For the FP2/FP2SH/FP10SH, subroutine programs may be constructed with multiple entrances and only one exit.
1 2 3 4

SUB SUB SUB SUB RET

11 12 13 14

CALL11

CALL13

When CALL 11 is executed, When CALL 13 is executed,

1 3

to 4 are executed. and 4 are executed.

You must be careful when you use, in a subroutine, one of the instructions below that is executed by detecting the leading of execution condition (trigger) such as the differential instruction. DF (leading edge differential) Count input of CT (counter) Count input of F118 (up/down counter) Shift input of SR (shift register) Shift input of F119 (left/right shift register) NSTP (next step) Differential execution type highlevel instruction (this instruction is specified by P and a number)

When the CALL instruction execution condition (trigger) is off


If the execution condition (trigger) for the CALL instruction is in the off state, the subroutine program is not executed. (This is the same for CALL instructions within master controls or step ladders.) When the execution condition (trigger) for the CALL instruction is in the off state, the instructions in the subroutine operate as follows. Instruction
OT KP SET RST TM CT SR DF and DF/ Other instructions

Operation status
Holds the state. Holds the state. Holds the state. Holds the state. Does not perform any timing. If timing is not performed once per scan, the correct time cannot be guaranteed. Holds the elapsed value. Holds the elapsed value. Same as when a differential instruction is used between MC and MCE instructions. See page 257. Not executed.

2 88
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FCAL
Outline Program example

Output off type subroutine call

Executes the specified subroutine. When returning to the main program, all outputs in the subroutine program are set to off.
Boolean Address 1 10 11 : 20 21 21 X20 SUB 1 Y10 23 24 : 30 30 RET RET ED SUB ST OT X Y : Y 10 1 20 10 Instruction ST FCAL : X 0 1

Ladder Diagram X0 10 FCAL Subroutine program number 20 ED

Description
Operation and syntax are the same as normal subroutine call instructions. However, the following points are different. If the trigger for the CALL instruction is in the off state, the subroutine program is not executed. When the trigger for the CALL instruction is in the off state, the instructions in the subroutine program operate as follows. Instruction
OT KP SET RST TM CT SR DF and DF/ Other instructions

Operation status
All off (differs from a normal subroutine instruction) Holds the state. Holds the state. Holds the state. Resets (differs from a normal subroutine instruction) Holds the state at the time just before the trigger turns off. Holds the state at the time just before the trigger turns off. Same operation as when the execution condition (trigger) for the MC instruction turns off. Refer to the explanation of the MC and MCE instructions. Not executed.

2 89
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Precautions during programming


Like a CALL instruction, up to five nesting levels are possible. However, it will not be possible to use certain MC numbers depending on the number of nesting levels as shown below. Calls from other than subroutines
2nd 3rd 4th 5th

MC255
MC255 to 254 MC255 to 253 MC255 to 252 MC255 to 251

2 90
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

INT IRET
Outline INT: IRET: Program example

Availability

Interrupt Interrupt return Indicates the start of the interrupt program. Indicates the end of the interrupt program.
Boolean Address (ED (INT Interrupt program number (IRET ) 0) ) 20 21 Instruction ED INT 0 FP0/FP0R/FPe/ FP/FPX

Ladder Diagram 20 21 26

26

....

IRET

....

Description
When an interrupt is input, the interrupt program of the number specified is executed starting from the INT instruction. When the interrupt program reaches the IRET instruction, the program returns to the address where the interrupt occurred and the main program resumes.
X0 DF ICTL, S1, S2
1

Interrupting

Main program ED INT Interrupt program n IRET n


2

When the interrupt occurs, the program is executed in the order

2 3 shown above.

2 91
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

Syntax of interrupt program


An interrupt program n is the program between the INTn instruction and the IRET instruction. The interrupt program must always be placed after the ED instruction. The number of the interrupt program is decided by the type of the interrupt. Interrupt p Program No. P N
INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 INT9 INT10 INT11 INT12 INT13 INT24

FP0/FPe
X0 X1 X2 X3 X4 X5

Interrupt input FP/FP0R FPX Ry


X0 X1 X2 X3 X4 X5 X6 X7 X0 X1 X2 X3 X4 X5 X6 X7 X100 X101 X102 X200 X201 X202 Periodical interrupt

FPX Tr
X0 X1 X2 X3 X4 X5 X6 X7

Interrupt p Program No. P N


INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 INT9 INT10 INT11 INT12 INT13

FP0/FPe
ch0 ch1 ch2 ch3

Highspeed counterinitiated interrupt FP0R FP FPX Ry


ch0 ch1 ch2 ch3 ch4 ch5 PLSch0 PLSch1 PLSch2 PLSch3 ch0 ch1 ch2 ch3 ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 chA chB

FPX Tr
ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7

Note) When using the highspeed counterinitiated interrupt program, the counting performance of the highspeed counter may be decrement at the moment of the startup of the interrupt program. Note) Only for the PLSch* of FP0R, it is the target value match interrupt of pulse output.

2 92
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

Before inputting an interrupt program


1

Declare the contact point to be used as the interrupt input (trigger). Select the contact point to be used as the interrupt input (trigger) and indicate it at system register 403.

Notes
If the highspeed counter/pulse catch is set, that contact cannot be used as the interrupt input (trigger). For the high speed counterinitiated interrupts and periodical interrupts, it is not necessary to indicate the input (trigger) contact.
2

Enable the execution of interrupt programs. The default conditions are set with interrupt programs disabled. Enable the execution of interrupt programs with the ICTL instruction.

Precaution when rewriting in RUN mode (for FP0/FP0R/FPe/FP/FPX)


If the program is rewritten in the RUN mode, execution will be inhibited for all interrupt programs, and will have to be enabled again after the rewriting has been completed in the RUN mode. Use the R9034 (rewriting done flag in RUN) to enable the interrupt programs again automatically using the ladder program. The R9034 is a special relay that turns on for only I scan after the completion of the rewriting in the RUN mode.

Interrupt program execution


There are three types of interrupt. 1 Interrupt from the input contact The interrupt occurs when the input specified at system register 403.
2

Highspeed counterinitiated interrupt When executing the highspeed counter instruction, the interrupt occurs when the highspeed counter elapsed value equals the set target value.

Periodical interrupt (INT24) The interrupt occurs in fixed time intervals. Set the time interval with the ICTL instruction.

When the interrupt occurs, the interrupt program with the corresponding number is executed.
Main program INT program Interrupt input on off Execution Execution Execution

If interrupts are disabled, an interrupt will occur only at the point when interrupts are enabled with the ICTL instruction.
Main program INT program Interrupt input on off Enabled Execution Execution

2 93
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

When another interrupt program is being executed, an interrupt will occur after the current program is completed.
Main program INT1 program INT2 program INT2 input
on off

Execution Execution Execution

Precautions during programming for all types


If either the INT instruction or IRET instruction is missing, a syntax error will result. When an interrupt is issued, the operation memory corresponding to the interrupt input contact does not undergo I/O refreshing. Therefore, contacts other than the interrupt input contact, such as the constantlyon relay R9010, should be specified by the input conditions in the interrupt program.
INT 5 Specify R9010 or other contact instead of X5. F0 MV, K10, DT100 IRET

X5

A subroutine program cannot be used in an interrupt program.


INT SUB RET IRET 1 11 Subroutine

An interrupt program cannot be used in a subroutine program.


SUB INT Interrupt program IRET RET 11 0 Subroutine

Interrupt program cannot be programmed into another interrupt program.


INT INT 0 1

IRET

2 94
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

Control when more than one interrupt occurs simultaneously.


When more than one interrupt occurs simultaneously, the interrupt program with the smaller number is executed first. The other interrupt programs are then placed in the execution waiting state. After the first interrupt program is completed, the other programs will be executed in order from the smallest number to the greatest.

Example:
Main program INT1 program INT2 program INT3 program INT1 input INT2 input INT3 input
on off on off on off

When more than one interrupt occurs while a interrupt program is being executed, the other programs will be executed in order from the smallest number to the greatest after the program currently being executed is finished.

Example:
Main program INT1 program INT2 program INT3 program INT4 program INT1 input INT2 input INT3 input INT4 input
on off on off on off on off

During execution of the INT3 program in the example above, the INT2 input occurred before INT1. But, after INT3 program is done, the INT1 program is executed first and then INT2 is executed.

2 95
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

Interrupt program execution waiting state and clearing


When multiple interrupt programs occur simultaneously or new interrupt programs occur during the execution of another interrupt program, the interrupt programs of lower preference are placed in the execution waiting state. They are then executed in order of preference when the other interrupt programs are completed.

Example:
Main program INT1 program INT2 program INT1 input INT2 input
on off on off

Execution waiting state

If placed in the execution waiting state, there is a time difference between the time of when the interrupt occurs and when the interrupt program is actually executed. If you do not want to execute the interrupt program placed in the execution waiting state because of this, it can be cleared with the ICTL instruction. An interrupt program that is cleared will not be executed.

Example:
ICTL (INT2 clear) execution Main program INT1 program INT2 program INT1 input INT2 input
on off on off

Clear

When the execution of interrupt programs is disabled with the ICTL instruction, interrupts that occur are still placed in the execution waiting state. When the execution is enabled with the ICTL instruction, the waiting interrupt programs will then be executed. Programs in the execution waiting state can be cleared with the ICTL instruction.

2 96
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

INT IRET
Outline INT: IRET: Program example

Availability

Interrupt Interrupt return Indicates the start of the interrupt program. Indicates the end of the interrupt program.
Boolean Address (ED (INT Interrupt program number (IRET ) 0) ) 20 21 Instruction ED INT 0 FP2/FP2SH/FP10SH

Ladder Diagram 20 21 26

26

....

IRET

....

Description
When an interrupt is input, the interrupt program of the number specified is executed starting from the INT instruction. When the interrupt program reaches the IRET instruction, the program returns to the address where the interrupt occurred and the main program resumes.
X0 DF ICTL, S1, S2
1

Interrupting

Main program ED INT Interrupt program n IRET n


2

When the interrupt occurs, the program is executed in the order 1 2 3 shown above. In the default mode, all interrupt programs are disabled and cannot be executed. The ICTL instruction should be used to enable execution of an interrupt program.

Syntax of interrupt program


An interrupt program n (n: 0 to 24) is the program between the INTn instruction and the IRET instruction. The interrupt program must always be placed after the ED instruction. Up to 25 programs can be written. The number of the interrupt program is decided by the type of the interrupt. INT0 to INT15: Interrupts from the interrupt unit INT16 to INT23: Interrupts from an intelligent unit that issues interrupts INT24: Periodic interrupt

2 97
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

Interrupt program execution


There are three types of interrupt. 1 Interrupts from a interrupt unit (corresponding to INT0 to INT15) Interrupts are issued in response to the rise or fall of the interrupt unit input (whether rising or falling is specified on the unit side).
2

Interrupts from an intelligent unit that issues interrupts (corresponding to INT16 to INT23) Interrupts are issued in response to the operation status of an intelligent unit with an interrupt issuing function. Periodical interrupt (INT24) The interrupt occurs in fixed time intervals. Set the time interval with the ICTL instruction.
Execution Execution Execution

When the interrupt occurs, the interrupt program with the corresponding number is executed.
Main program INT program Interrupt input on off

If interrupts are disabled, an interrupt will occur only at the point when interrupts are enabled with the ICTL instruction.
Main program INT program Interrupt input on off Enabled Execution Execution

When another interrupt program is being executed, an interrupt will occur after the current program is completed.
Main program INT1 program INT2 program Interrupt 2 input
on off

Execution Execution Execution

2 98
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

Precautions during programming for all types


If either the INT instruction or IRET instruction is missing, a syntax error will result. When an interrupt is issued, the operation memory corresponding to the interrupt input contact does not undergo I/O refreshing. Therefore, contacts other than the interrupt input contact, such as the constantlyon relay R9010, should be specified by the input conditions in the interrupt program.
INT 5 Specify R9010 or other contact instead of X5. F0 MV, K10, DT100 IRET

X5

A subroutine program cannot be used in an interrupt program.


INT SUB RET IRET 1 21 Subroutine

An interrupt program cannot be used in a subroutine program.


SUB INT Interrupt program IRET RET 21 0 Subroutine

Interrupt programs with multiple entrances and one exit can be written.

Example: When the interrupt of the interrupt program 11 is issued, 1 to 3 are executed. When the interrupt of No. 13 is issued, 3 is executed.
1

INT INT INT

11 12 13

Interrupt 11 is issued

Interrupt 13 is issued

RET

2 99
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

Control when more than one interrupt occurs simultaneously.


When more than one interrupt occurs simultaneously, the interrupt program with the smaller number is executed first. The other interrupt programs are then placed in the execution waiting state. After the first interrupt program is completed, the other programs will be executed in order from the smallest number to the greatest.

Example:
Main program INT1 program INT2 program INT3 program INT1 input INT2 input INT3 input
on off on off on off

When more than one interrupt occurs while a interrupt program is being executed, the other programs will be executed in order from the smallest number to the greatest after the program currently being executed is finished.

Example:
Main program INT1 program INT2 program INT3 program INT4 program INT1 input INT2 input INT3 input INT4 input
on off on off on off on off

During execution of the INT3 program in the example above, the INT2 input occurred before INT1. But, after INT3 program is done, the INT1 program is executed first and then INT2 is executed.

2 100
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

Interrupt program execution waiting state and clearing


When multiple interrupt programs occur simultaneously or new interrupt programs occur during the execution of another interrupt program, the interrupt programs of lower preference are placed in the execution waiting state. They are then executed in order of preference when the other interrupt programs are completed.

Example:
Main program INT1 program INT2 program INT1 input INT2 input
on off on off

Execution waiting state

If placed in the execution waiting state, there is a time difference between the time of when the interrupt occurs and when the interrupt program is actually executed. If you do not want to execute the interrupt program placed in the execution waiting state because of this, it can be cleared with the ICTL instruction. An interrupt program that is cleared will not be executed.

Example:
ICTL (INT2 clear) execution Main program INT1 program INT2 program INT1 input INT2 input
on off on off

Clear

When the execution of interrupt programs is disabled with the ICTL instruction, interrupts that occur are still placed in the execution waiting state. When the execution is enabled with the ICTL instruction, the waiting interrupt programs will then be executed. Programs in the execution waiting state can be cleared with the ICTL instruction.

2 101
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

Availability

ICTL

Interrupt control

FP0/FPe/FP/FPX/ FP0R

Outline Performs the interrupt enable or disable and the interrupt clear. Program example
Ladder Diagram Boolean Address 0 X10 0 ( DF ) Instruction ST DF ICTL H H S1 S2 16-bit equivalent constant or 16-bit area for interrupt control data setting 16-bit equivalent constant or 16-bit area for interrupt condition setting 0 1 X 10

ICTL, H 0, H 1
S1 S2

1 2

Operands
Operand S1 S2 A A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A DT A A Register LD A A FL A A Index register IX A A IY A A Constant K A A H A A Index modifier A A A: Available

Description

When the ICTL instruction is executed, the interrupt program enable/disable and interrupt clear are set according to the settings in S1 and S2. Be sure to use ICTL instructions so that they are executed once at the leading edge of the execution condition (trigger) using the DF instruction. Two or more ICTL instructions can have the same execution condition (trigger).

Note
Before executing an interrupt program, be sure to execute the ICTL instruction and enable the execution of the interrupt program.

2 102
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

Precaution if rewriting during a RUN operation (for FP0/FP0R/FPe/FP)


If rewriting is done during a RUN operation while the interrupt function is being used, execution of the interrupt function is inhibited. The ICTL instruction has to be used once again to enable the interrupt program to be executed.

Example:

A periodic interrupt is set every 10 ms when the operation is begun. (After rewriting during a RUN operation, interrupts are enabled again.)
R9013 ICTL, H2, R9034 K1

Executes INT24 every 10 ms.

Input examples Example 1: Setting a periodical interrupt every 10ms from the start of operations
R9013 ICTL, H2, K1

Executes INT24 every 10ms

The R9013 (initial pulse relay) turns on only for the first scan after operations begin. Example 2: Enable INT0 through INT3 when X0 rises.
X0 DF ICTL, H0, HF X0: Enables INT0 to INT3 when on

Example 3: Clear interrupts other than INT0 after the INT0 program is completed.
INT 0 R0 ICTL, H100, H1 IRET Interrupts other than INT0 are cleared when the program of INT0 is finished

2 103
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

Specifying control data


S1: Specifying the control functions and interrupt types Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
S1 Interrupt type selection H00: INT 0 to INT 7 H02: INT 24 (10ms units) H03: INT 24 (0.5ms units) Selection of control function H00: Interrupt enabled/disabled control H01: Interrupt trigger reset control

Set S1 = H0 to specify enable or disable for the execution of INT0 through INT7. Set S1 = H100 to clear interrupts INT0 through INT7. Set S1 = H2 (for units of 10ms) to set the time interval for INT24. Set S1 = H3 (for units of 0.5ms) to set the time interval for INT24.

Precautions during programming


The inputs that can be actually used as an interrupt input are different depending on the models. (Refer to the table below.) Interrupt p Program No. P N
INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 INT9 INT10 INT11 INT12 INT13 INT24

FP0/FPe
X0 X1 X2 X3 X4 X5

Interrupt input FP/FP0R FPX Ry


X0 X1 X2 X3 X4 X5 X6 X7 X0 X1 X2 X3 X4 X5 X6 X7 X100 X101 X102 X200 X201 X202 Periodical interrupt

FPX Tr
X0 X1 X2 X3 X4 X5 X6 X7

Note) When using the highspeed counterinitiated interrupt program, the counting performance of the highspeed counter may be decrement at the moment of the startup of the interrupt program.

2 104
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

S2: Specifying the control of interrupts


1

Enabling or disabling interrupt programs (when S1 = H0 or S1 = H1).

Set the control data in the bit corresponding to the number of the interrupt program that you want to control. Set the bit corresponding to the number of the program you want to enable to 1. (INT program disabled.) Set the bit corresponding to the number of the program you want to disable to 0. (INT program enabled.)

Example:

When specified so that the interrupt programs INT1 and INT2 are enabled, and INT0 and INT3 to 13 are inhibited
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 number S2 (Enabled/ 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 disabled)

Clearing interrupt programs (when S1 = H100 or S1 = H101)

Set the control data in the bit corresponding to the number of the interrupt program that you want to control. Set the bit corresponding to the number of the program you want to clear to 0. (INT program disabled.) Set the bit corresponding to the number of the program you want to not clear to 1. (INT program enabled.)

Example:

When specified so that the interrupt programs INT0 to INT2 are cleared, and INT3 to INT13 are not cleared
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 number S2 (Enabled/ 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 disabled)

Specifying periodical interrupt (when S1 = H2)

Specify the setting with decimal number. The time interval = value of S2 10 (ms).
Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0 S2 K0 to K3000

Time interval setting: K1 to K3000 (10ms to 30s) INT24 disabled: K0


4

Specifying periodical interrupt programs (when S1 = H3)

The time interval = value of S2 0.5 (ms).


Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0 S2 K0 to K3000

Time interval setting: K1 to K3000 (0.5ms to 1.5s) INT24 disabled: K0

2 105
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

Example of enabling the execution of interrupt programs Example:


DF ICTL, H0, S1 S2 H21

S1: H0000 Specifies enabling or disabling of interrupt programs that correspond to interrupts at specified input contact or to target value match interrupts. S2: H0021 Enable INT0 and INT5 (set bits 0 and 5 to 1) and disable all others.
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 S2
INT No.

0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Input contact X0 X1 X2 X3 X4 X5 X6 X7 X8 (INT0) (INT1) (INT2) (INT3) (INT4) (INT5) (INT6) (INT7) (INT8)

X9 (INT9) X10 (INT10) X11 (INT11) X12 (INT12) X13 (INT13)

Set the bits to 1 that correspond to the interrupts to be enabled. When this ICTL instruction is executed, interrupt programs No. 0 and No. 5 will be executed when their corresponding interrupt inputs occur.

2 106
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

ICTL instruction Main program INT0 program INT5 program INT0 input INT5 input Condition
on off on off Execution

Execution
Execution Execution

Disabled

Enabled

How to start the interrupt program when executing the highspeed counter match ON/match OFF instruction.
1 2

Set the counter by the system register. (It is not necessary to set the external interrupt.) Describe the interrupt program on the program. The highspeed counter corresponds to the interrupt program as below. Interrupt p Program No. P N
INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 INT9 INT10 INT11 INT12 INT13

FP0/FPe
ch0 ch1 ch2 ch3

Highspeed counterinitiated interrupt FP/FP0R FPX Ry


ch0 ch1 ch2 ch3 ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 chA chB

FPX Tr
ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7

3 4 5

Enable the setting by the ICTLinstruction. Enable ICTL, H0, H9 INT0 and INT7. Start the match ON/match OFF instruction. The program is executed when the conditions for the match ON/match OFF instruciton are met.

Example for clearing interrupt programs Example:


DF ICTL, H100, S1 S2 HFE

S1: H100 Clears interrupts from specified input contact or target value match interrupts.
2 107
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP0/FP0R/FPe/FP/FPX

S2: HFE Clears interrupt INT0 (bit 0 is 0) and does not clear the other interrupts. For the relationship between the set value and the interrupt input contact, refer to page 2 106. Even though the INT0 interrupt input occurred, when the interrupt program is disabled, the ICTL instruction can still be used to clear the INT0 interrupt.
ICTL instruction Main program INT0 program INT1 program INT0 input INT1 input Condition
on off on off

Execution
Execution

Clear

Execution

Disabled

Enabled

Since INT0 is cleared, the INT0 program will not be executed even after execution is enabled. Since INT1 is not cleared, the INT1 program will be executed after execution is enabled. Example for setting periodical interrupt Example:
DF ICTL, H2, K1500 S1 S2

[S1]: H0002 Specifies periodical interrupt [S2]: K1500 Specifies the time interval for the periodical interrupt. With K1500, the time interval is K1500 x 10ms = 15000ms (15s) After this ICTL instruction is executed, the periodical interrupt will occur every 15 seconds. At these times, the INT24 interrupt program will be executed.
ICTL instruction
Execution

Main program Execution Execution INT24 program 15s 15s

2 108
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Basic Instructions

To stop the periodical interrupt program, execute the following program.


DF ICTL, H2, K0

2 109
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

Availability

ICTL

Interrupt control

FP2/FP2SH/FP10SH

Outline Performs the interrupt enable or disable and the interrupt clear. Program example
Ladder Diagram Boolean Address 40 X10 40 ( DF ) Instruction ST DF ICTL H H S1 S2 16-bit equivalent constant or 16-bit area for interrupt control data setting 16-bit equivalent constant or 16-bit area for interrupt condition setting 0 1 X 10

ICTL, H 0, H 1
S1 S2

41 42

Operands
Relay Operand WX WY WR WL S1 S2 A A A A A A A A SV A A EV A A DT A A LD A A FL A A Timer/Counter Register Index register IX (*1) A A IY (*2) A A Constant K A A H A A Index modifier A A A: Available

(*1) With the FP2, FP2SH and FP10SH, this is I0 to IC. (*2) With the FP2, FP2SH and FP10SH, this is ID.

Description
When the ICTL instruction is executed, the interrupt program enable/disable and interrupt clear are set according to the settings in S1 and S2. Be sure to use ICTL instructions so that they are executed once at the leading edge of the execution condition (trigger) using the DF instruction. Two or more ICTL instructions can have the same execution condition (trigger).

Note
Before executing an interrupt program, be sure to execute the ICTL instruction and enable the execution of the interrupt program. Flag conditions

Error flag (R9007, R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when the value outside of the range is specified for the interruption type and control function of [S1]. It turns on, when the value outside of the range is specified for [S2].

2 110
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

Input examples Example 1: Setting a periodical interrupt every 10ms from the start of operations
R9013 ICTL, H2, K1

Executes INT24 every 10ms

The R9013 (initial pulse relay) turns on only for the first scan after operations begin. Example 2: Enable INT0 through INT3 when X30 rises.
X30 DF ICTL, H0, HF X30: Enables INT0 to INT3 when on

Example 3: Clear interrupts other than INT0 after the INT0 program is completed.
INT 0 R0 ICTL, H100, H1 IRET Interrupts other than INT0 are cleared when the program of INT0 is finished

Specifying control data


S1: Specifying the control functions and interrupt types
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 S1 Interrupt type selection H00: INT 0 to INT15 H01: INT16 to INT23 (*1) H02: INT24 (10ms units) H03: INT24 (0.5ms units) (*2) H04: INT24 (in increments of 10 ms) (*3) H05: INT24 (in increments of 0.5 ms) (*3) Selection of control function H00: Interrupt execution enabled/disabled H01: Interrupt clear

(*1) The intelligent unit which issues interrupts has a highspeed counter unit, a pulse output unit, and other units. (*2) FP2/FP2SH/FP10SH only (*3) Available from FP2/FP2SH Ver. 1.50 or later

2 111
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

If execution has been specified as enabled or disabled for INT0 to INT15, [S1] = H0. If an interrupt clear has been specified for INT0 to INT15, [S1] = H100. If execution has been specified as enabled or disabled for INT16 to INT23, [S1] = H1. If an interrupt clear has been specified for INT16 to INT23, [S1] = H101. Set [S1] = H2 to set the time intervals for INT24. Set [S1] = H3 to set the time intervals for INT24 (for the FP2, FP2SH and FP10SH only)

S2: Specifying the control of interrupts


1

Enabling or disabling interrupt programs (when S1 = H0 or S1 = H1).

Set the control data in the bit corresponding to the number of the interrupt program that you want to control. Set the bit corresponding to the number of the program you want to enable to 1. (INT program disabled.) Set the bit corresponding to the number of the program you want to disable to 0. (INT program enabled.)
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 number S2 (Enabled/ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 disabled)

Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0

INT program 23 22 21 20 19 18 17 16 number S2 (Enabled/ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 disabled)

Clearing interrupt programs (when S1 = H100 or S1 = H101)

Set the control data in the bit corresponding to the number of the interrupt program that you want to control. Set the bit corresponding to the number of the program you want to clear to 0. (INT program disabled.) Set the bit corresponding to the number of the program you want to not clear to 1. (INT program enabled.)
Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0
INT program 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 number S2 (Enabled/ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 disabled)

Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0

INT program 23 22 21 20 19 18 17 16 number S2 (Enabled/ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 disabled)

Specifying periodical interrupt (when S1 = H2 or S1=H4)

Specify the setting with decimal number. The time interval = value of S2 10 (ms).
Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0 S2 K0 to K3000

Time interval setting: K1 to K3000 (10ms to 30s) INT24 disabled: K0

Note
For the difference in the operation of H2 and H4, refer to Example 2 for setting periodical interrupt. (H4 can be specified with the PLC FP2/FP2SH Ver. 1.50 or later.)

2 112
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

Specifying periodical interrupt programs (when S1 = H3 or S1=H5) for FP0/FP2/FP2SH/FP10SH only

Specify the setting with decimal number. The time interval = value of S2 0.5 (ms).
Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0 S2 K0 to K3000

Time interval setting: K1 to K3000 (0.5ms to 1.5s) INT24 disabled: K0

Note
For the difference in the operation of H3 and H5, refer to Example 2 for setting periodical interrupt. (H5 can be specified with the PLC FP2/FP2SH Ver. 1.50 or later.)

2 113
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

Example of enabling the execution of interrupt programs Example:


DF ICTL, H0, S1 S2 H101

[S1]: H0000 This specifies whether execution of the interrupt program corresponding to the interrupt from the interrupt unit (INT0 to INT15) is enabled or disabled. [S2]: H0101 Enable INT0 and INT8 (set bits 0 and 8 to 1) and disable all others.
Bit position 15 . . 12 11 . S2

. 8 7 . . 4 3 . . 0

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1

INT number 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Interrupt unit X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF (INT0) (INT1) (INT2) (INT3) (INT4) (INT5) (INT6) (INT7) (INT8) (INT9) (INT10) (INT11) (INT12) (INT13) (INT14) (INT15)

Set the bits to 1 that correspond to the interrupts to be enabled. The I/O number is an example showing the interrupt unit mounted in Slot 0. To enable all interrupts INT0 to INT15, set S2 = HFFFF.

2 114
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

When this ICTL instruction is executed, interrupt programs INT0 and INT8 will be executed when their corresponding interrupt inputs occur.
ICTL instruction Main program INT0 program INT8 program INT0 input INT8 input Condition
on off on off Execution

Execution
Execution Execution

Disabled

Enabled

2 115
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

Example for clearing interrupt programs Example:


DF ICTL, H100, S1 S2 HFFFE

[S1]: H0100 Clears interrupts from the interrupt unit (INT 0 to INT15). [S2]: HFFFE Clears interrupt INT0 (bit 0 is 0) and does not clear the other interrupts. For the relationship between the set value and the interrupt unit, refer to page 2 114 Example of enabling the execution of interrupt programs. Even though the INT0 interrupt input occurred, when the interrupt program is disabled, the ICTL instruction can still be used to clear the INT0 interrupt.
ICTL instruction Main program INT0 program INT8 program INT0 input INT8 input Condition
on off on off

Execution
Execution

Clear

Execution

Disabled

Enabled

Since INT0 is cleared, the INT0 program will not be executed even after execution is enabled. Since INT8 is not cleared, the INT8 program will be executed after execution is enabled.

2 116
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Basic Instructions

Example 1 for setting periodical interrupt Example:


DF ICTL, H2, K1500 S1 S2

[S1]: H0002 Specifies periodical interrupt (units: 10ms) [S2]: K1500 Specifies the time interval for the periodical interrupt. With K1500, the time interval is K1500 x 10ms = 15000ms (15s) After this ICTL instruction is executed, the periodical interrupt will occur every 15 seconds. At these times, the INT24 interrupt program will be executed.
ICTL instruction
Execution

Main program Execution Execution INT24 program 15s 15s

To stop the periodical interrupt program, execute the following program.


DF ICTL, H2, K0

2 117
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP2/FP2SH/FP10SH

Example 2 for setting periodical interrupt When H4 or H5 is designated, the periodical interrupt occurs at the specified interval regardless of interrupt processing time.
Compatibletimer: (kind= H02,H03) Int [S2] Int [S2] Int

After the periodical interrupt program completed, the next interrupt timing is counted. When the execution time of the periodical interrupt program is less than 500 s, the interrupt is carried out at every interval specified by [S2]. However, when the execution time is 500 s or longer, the interval is automatically shifted in increments of 500 s.
Constanttimer: (kind= H04,H05) Int [S2] Int [S2] Int [S2] Int

Regardless of the execution time of the interrupt program, it is executed for the fixed interval. The specified time interval for the periodical interrupt must be longer than the time taken for the interrupt processing.
S2]: Setting for Interrupt time interval (K0 to 3000)

When the specified time for the periodical interrupt is longer than the execution time of the interrupt program, the operation cannot be carried out for the specified interval, and the CPU may give an alarm.

2 118
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

SYS1
Outline

Availability

Communication conditions setting

FP/FPX/FP0R

This changes the communication conditions for the COM port or Tool port based on the contents specified by the character constant. Program example
Ladder Diagram Boolean Non-ladder Address 10 ST DF SYS1 M 25 SYS1 M
COM1,19200 COM1, B8POS1

Instruction R 0

Trigger
R0 10 DF SYS1, M S COM1, B8POS1 S SYS1, M COM1,19200
No. 1 No. 2 keyword keyword

11 12

Character constant M

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register I N/A K Constant H M A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

N/A N/A

Explanation of example
When R0 turns on, the transmission format and baud rate for the COM. 1 port are set as follows. Character bit: 8, Parity: Odd Stop bit: 1 Baud rate: 19,200 bps

Description
The communication conditions for the port specified by No. 1 keyword are changed to the contents specified by No. 2 keyword. Contents that can be changed include the following: 1) Communication format 2) Baud rate 3) Unit No. For FP0R, indirect settings are available. 4) Header and Terminator 5) RS (Request to Send) control

2 119
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

Keyword setting
1) Communication format (Shared by the Tool, COM. 1 and COM. 2 ports)
SYS1, M Port used
TOOL: Tool port COM1: COM. 1 port COM2: COM. 2 port

TOOL,B7 PN S1

Character bit
B7: 7bits

B8: 8bits PO: Odd S2: 2 PE: Even

Parity

PN: None

Stop bit
S1: 1

2) Baud rate (Shared by the Tool, COM. 1 and COM. 2 ports)


SYS1, M Port used
TOOL: Tool port COM1: COM. 1 port COM2: COM. 2 port

TOOL,19200

Baud rate

300: 300 bps 1200:1200 bps 4800: 4,800 bps 19200: 19,200 bps 57600: 57,600 bps

600: 600 bps 2400: 2,400 bps 9600: 9,600 bps 38400: 38,400 bps 115200: 115,200 bps

The baud rates of 300, 600 or 1200 bps can be specified only with the FP0R, FPX ver 2.0 or later and FP ver3.10 or later. Also, those baud rates cannot be specified by the system register.

3) Unit No. (Shared by the Tool, COM. 1 and COM. 2 ports)


SYS1, M Port used
TOOL: Tool port COM1: COM. 1 port COM2: COM. 2 port

TOOL,No1

Unit No.

No1 to No99: No. 1 to No. 99

For FP0R, the indirect settings of unit number is available.


SYS1, M Port used
TOOL: Tool port COM1: COM. port DT number that Unit No. is stored. D000D = DT0 D9999 = DT9999 Always specify with a number of D+4 digits.

COM1, D000D

2 120
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

4) Header and Terminator (Shared by the TOOL, the COM. 1 and COM. 2 ports)
SYS1, M Port used
TOOL: Tool port (FP 32k/FPX/FP0R) COM1: COM. 1 port COM2: COM. 2 port

COM1,STX

Header

STX: STX NOSTX: STX not exist

Terminator

ETX: ETX CR: CR CRLF: CR + LF NOTERM: None

5) RS (Request to Send) control (COM. 1 port only)


SYS1, M Port used
COM1: COM. 1 port

COM1,RTS1

RS control for the 1channel RS232C type communication cassette


RTS1: Disables communication (Sets the RS terminal to on) RTS0: Enables communication (Sets the RS terminal to off) * Not available for FP0R.

Precautions during programming Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software. We recommend using differential execution with this instruction. Because the system register settings are changed, a verification error may occur in some cases if verification is carried out with the tools. For No. 1 and No. 2 keywords, input 12 letters after M aligning to the right. Separate No.1 and No.2 keywords with a comma , and do not use spaces. An operation error will occur. [Example] If inputting (SYS1, M COM1, WAIT2) Input => M COM1,WAIT2 Input a space after M to be 12 letter aligning to the right. For FP0R, specify COM1 for COM port.

2 121
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: Any character other than a keyword is specified There is no comma between No. 1 and No. 2 keywords The small letter of the alphabet is used to specify the keyword (except for numbers used to specify unit No.) No communication cassette has been installed when COM1 or COM2 has been set The setting of the unit No. setting switch is anything other than 0 when COM1 or COM2 has been set and the unit No. is being changed The unit No. set using this instruction is anything other than a value between 1 and 99 The baud rate or transmission format for COM1 has been changed when the PLC link mode is specified for COM1 The baud rate or transmission format is changed while the Tool port, COM. port 1, or COM. port 2 is being initialized using MODEM The communication mode is set to anything other than the general communication mode when header and terminator have been set Any communication cassette other than the 1channel RS232C type communication cassette is installed when using RS control The specified unit No. is larger than the largest unit No. specified by the system register when the COM. 1 port is in the PLC link mode

2 122
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

SYS1
Outline Program example

Availability

Password setting

FP/FPX/FP0R

This changes the password specified by the controller, based on the contents specified by the character constant.
Boolean Non-ladder Address 10 ST DF SYS1 M
No. 1 keyword No. 2 keyword

Ladder Diagram

Instruction R 0

Trigger
R0 10 DF SYS1, M

S
PASS,ABCD

11 12

PASS,ABCD

R1 100 DF SYS1, M

S
PAS, abcdefgh
No. 1 keyword No. 2 keyword

100 101 102

ST DF SYS1 M

PAS,abcdefgh

Character constant M

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register I N/A K Constant H M A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

N/A N/A

Explanation of example
When R0 turns on, the controller password is changed to ABCD.

Description
This changes the password specified by the controller to the contents specified by No. 2 keyword.

2 123
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

Keyword setting
For the 4digit password SYS1, M PASS: Fixed Password (Example: To set the password to ABCD) For the 8digit password (It is available for FP 32k/FPX/FP0R.) SYS1, M PAS: Fixed Password (Example: When abcdefgh is specified for
the password.) If the specified characters are less than 8, spaces are added at the end of the characters to be 8digit password.

PASS,ABCD

PAS, abcdefgh

Precautions during programming When this instruction is executed, writing to the internal FROM takes approximately 100 ms. If the specified password is the same as the password that has already been written, the password is not written to the FROM. We recommend using differential execution with this instruction. For No. 1 and No. 2 keywords, input 12 letters after M aligning to the right. Separate No.1 and No.2 keywords with a comma , and do not use spaces. An operation error will occur. [Example] If inputting (SYS1, M COM1, WAIT2) Input => M COM1,WAIT2 Input a space after M to be 12 letter aligning to the right. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: Any character other than a keyword is specified There is no comma between No. 1 and No. 2 keywords The small letter of the alphabet is used to specify the keyword (For the 4digit password) The data specified for the password setting is any character other than 0 to 9 or A to F, or the specified data consists of other than four digits. (For the 4digit password)

2 124
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

SYS1
Outline

Availability

Interrupt setting

FP/FPX/FP0R

This sets the interrupt input based on the contents specified by the character constant. Program example
Ladder Diagram Boolean Non-ladder Address 10 ST DF SYS1 M INT1,UP Instruction R 0

Trigger
R0 10 DF SYS1, M

S
INT1,UP
No. 1 No. 2 keyword keyword

11 12

Character constant M

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register I N/A K Constant H M A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

N/A N/A

Explanation of example
When R0 turns on, input X1 is set to the interrupt that becomes valid at the rising edge.

Description
This sets the input specified by No. 1 keyword as the interrupt input, and changes the input conditions to the contents specified by No. 2 keyword.

Keyword setting
SYS1, M Interrupt input
INT0: X0 INT2: X2 INT4: X4 INT6: X6 INT8 INT10 INT11 INT12 INT8: X0 INT1: X1 INT10: X2 INT3: X3 INT12: X4 INT5: X5 INT7: X7 Pulse I/O cassette 1 Pulse I/O cassette 2

INT2,UP
INT9: X1 INT11: X3 INT13: X5

Effective edges

UP: Rising edge DOWN: Falling edge BOTH: Rising and falling edges

2 125
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

Precautions during programming Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software. We recommend using differential execution with this instruction. When UP or DOWN has been specified, the contents of the system registers change in accordance with the specification, so a verification error may occur in some cases, when the program is verified. When BOTH has been specified, the contents of the system registers do not change. For No. 1 and No. 2 keywords, input 12 letters after M aligning to the right. Separate No.1 and No.2 keywords with a comma , and do not use spaces. An operation error will occur. [Example] If inputting (SYS1, M COM1, WAIT2) Input => M COM1,WAIT2 Input a space after M to be 12 letter aligning to the right. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: Any character other than a keyword is specified There is no comma between No. 1 and No. 2 keywords The small letter of the alphabet is used to specify the keyword

2 126
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

SYS1
Outline

Availability

PLC link time setting

FP/FPX/FP0R

This sets the system setting time when a PLC link is used, based on the contents specified by the character constant. Program example
Ladder Diagram Boolean Non-ladder Address Instruction ST DF SYS1 M 25 SYS1 M
No. 1 keyword No. 2 keyword

R9014 10 DF SYS1, M

S
PCLK1T0,100

10 11 12

90141

S
SYS1, M PCLK1T1,100

PCLK1T0,100 PCLK1T1,100

Character constant M

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register I N/A K Constant H M A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

N/A N/A

Explanation of example
When R9014 turns on when a PLC link is being used, the link entry wait time and the error detection times for transmission assurance relay are set as follows. Link entry wait time: 100 ms Error detection time for transmission assurance relay: 100 ms

Description
The conditions specified by No. 1 keyword are set as the time specified by No. 2 keyword. The setting for the link entry waiting time is set if the transmission cycle time is shortened when there are stations that have not joined the link (*). * Stations that have not joined the link: Stations that have not been connected between the No. 1 station and the station with the largest number, or stations for which the power supply has not been turned on The error detection time setting for the transmission assurance relay is set if the time between the power supply being turned off at one station and the transmission assurance relay being turned off at a different station is to be shortened.

Keyword setting
1) Link entry wait time
SYS1, M PCLK1T0: Fixed Specified range: 10 to 400 (10ms to 400ms) PCLK1T0,100

2 127
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

2) Error detection time for transmission assurance relay


SYS1, M PCLK1T1: Fixed Specified range: 100 to 6400 (100ms to 6400ms) PCLK1T1,100

Precautions during programming The program should be placed at the beginning of all PLCs being linked, and the same values specified. This instruction should be specified in order to set special internal relay R9014 as the differential execution condition. The setting contents of the system registers are not affected by this instruction being executed. For No. 1 and No. 2 keywords, input 12 letters after M aligning to the right. Separate No.1 and No.2 keywords with a comma , and do not use spaces. An operation error will occur. [Example] If inputting (SYS1, M COM1, WAIT2) Input => M COM1,WAIT2 Input a space after M to be 12 letter aligning to the right. Precautions when setting the link entry wait time This should be specified such that the value is at least twice that of the largest scan time of all the PLCs that are linked. If a short value has been specified, there may be some PLCs that are not able to join the link even though the power supply for that PLC has been turned on. If there are any stations that have not joined the link, the setting should not be changed, even if the link transmission cycle time is longer as a result. (The default value is 400 ms.) Precautions when setting the error detection time for the transmission assurance relay This should be specified such that the value is at least twice that of the largest transmission cycle time of all the PLCs that are linked. If a short value has been specified, there is a possibility that the transmission assurance relay will malfunction. The setting should not be changed, even if the detection time for the transmission assurance relay is longer as a result. (The default value is 6400 ms.) Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: Any character other than a keyword is specified There is no comma between No. 1 and No. 2 keywords The small letter of the alphabet is used to specify the keyword The specified value is outside the specified range

2 128
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

Availability

SYS1
Outline

Change highspeed counter operation mode

FP 32k FPX Ver 1.10 or more FP0R

This changes the operation mode of the highspeed counter based on the contents specified by the character constant. Program example
Ladder Diagram Boolean Non-ladder Address 10 ST DF SYS1 M HSC1,UP Instruction R 0

Trigger
R0 10 DF SYS1, M

S
HSC1,UP
No. 1 No. 2 keyword keyword

11 12

Character constant M

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register I N/A K Constant H M A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

N/A N/A

Explanation of example
When R0 turns on, the operation mode of the highspeed counter CH0 is set to the addition mode.

Description
This changes the operation mode of the highspeed counter specified by No.1 keyword to the operation mode specified by No.2 keyword.

Keyword setting
SYS1, M
Highspeed counter setting HSCn n: 0 to 9, A, B with FPX Ry type n: 0 to 7 with FPX Tr type n: 0, 1, 2, 3 with FP n: 0, 1, 2, 3, 4, 5 with FP0R UP: Addition input setting DOWN: Subtraction input setting

HSC1,UP

2 129
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

Precautions during programming If the system register is not set to the addition input or subtraction input for this instruction, an operation error occurs. Set the system register to the addition or subtraction input in advance. When the addition/subtraction input setting is specified even if the setting has been already done, an operation error does not occur. Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software. We recommend using differential execution with this instruction. When UP or DOWN has been specified, the contents of the system registers change in accordance with the specification, so a verification error may occur in some cases, when the program is verified. When BOTH has been specified, the contents of the system registers do not change. For No. 1 and No. 2 keywords, input 12 letters after M aligning to the right. Separate No.1 and No.2 keywords with a comma , and do not use spaces. An operation error will occur. [Example] If inputting (SYS1, M COM1, WAIT2) Input => M COM1,WAIT2 Input a space after M to be 12 letter aligning to the right. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: Any character other than a keyword is specified There is no comma between No. 1 and No. 2 keywords The small letter of the alphabet is used to specify the keyword The system register is set to items other than the addition input or subtraction input.

2 130
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

SYS1
Outline

Availability

MEWTOCOLCOM response control

FP/FPX/FP0R

This specifies the response waiting time based on the MEWTOCOLCOM of the COM port or Tool port, in response to the contents specified by the character constant. Program example
Ladder Diagram Boolean Non-ladder Address 10 ST DF SYS1 M COM1,WAIT2 Instruction R 0

Trigger
R0 10 DF SYS1, M

S
COM1,WAIT2
No. 1 No. 2 keyword keyword

11 12

Character constant M

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register I N/A K Constant H M A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

N/A N/A

Description
The port MEWTOCOLCOM response time specified by No. 1 keyword is delayed based on the contents specified by No. 2 keyword. This instruction is used to delay the response time on the PLC side until the state is reached in which commands can be sent by an external device and responses can be received from the PLC. <Usage example> When a commercial RS232C/RS485 converter is being used to carry out communication between a personal computer and the FP, this instruction is used to return the PLC response after switching of the enable signal has been completed on the converter side.
Commercial RS232C/RS485 converter
Command

External device (PC)

Response

FP

FP

FP

2 131
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

Keyword setting
SYS1, M Port used
TOOL: Tool port COM1: COM. 1 port COM2: COM. 2 port

TOOL,WAITn

Response time

WAIT0 to WAIT999 (n: 0 to 999)

If the communication mode or the MOD BUS RTV mode has been set to the computer link mode, the set time is the scan time x n (n: 0 to 999). If the communication mode has been set to the PLC link mode, the set time is n s (n: 0 to 999). If n = 0, the delay time set by this instruction will be set to None.

Precautions during programming The settings should not be changed as long as there is no trouble, to prevent the PLC link from getting unstable. This instruction is valid only if the setting on the controller side has been set to the computer link mode or the PLC link mode. The instruction should be executed at the beginning of the program, at the rise of R9014. The same value should be set for all linked PLCs. Executing this instruction does not change the settings in the system registers. If changing the settings, a value of at least twice should be set. We recommend using differential execution with this instruction. When the power supply to the PLC is off, the settings set by this instruction are cleared. (The set value will become 0.) If the mode is switched to the PROG. mode after the instruction has been executed, however, the settings will be retained. If a commercial RS232C/RS485 converter is being used in the PLC link mode, this instruction should be programmed in all of the stations (PLCs) connected to the link. For No. 1 and No. 2 keywords, input 12 letters after M aligning to the right. Separate No.1 and No.2 keywords with a comma , and do not use spaces. An operation error will occur. [Example] If inputting (SYS1, M COM1, WAIT2) Input => M COM1,WAIT2 Input a space after M to be 12 letter aligning to the right. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: Any character other than a keyword is specified There is no comma between No. 1 and No. 2 keywords The small letter of the alphabet is used to specify the keyword No communication cassette has been installed when COM1 or COM2 has been set

2 132
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

SYS2
Outline

Change system registers (No. 40 to No. 47, No. 50 to No. 57)

Availability FP/FPX/FP0R

This changes the settings entered for the system registers of the PLC link function, in accordance with the specified data. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST SYS2 DT K K 0 40 47 R 0

Trigger R0 10 SYS2, DT0, S


S D1 D2

K40, D1

K47 D2

Starting number of the area in which 16bit data is stored Starting number of the system registers being specified (K40 to K47) Ending number of the system registers being specified (K40 to K47)

Operands
Operand S D1 D2 Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT A LD FL Index Constant register I N/A N/A N/A K H Index modifier N/A N/A N/A A: Available N/A: Not Available

N/A N/A

N/A N/A A A N/A N/A

N/A N/A N/A N/A N/A N/A

Description
The contents of system registers No. 40 to No. 47 are changed to the contents of the data registers starting with the number specified by [S]. Note) With the FP0R, the FP 32k and the FPX, the contents of system registers No. 50 to No. 57 are also changed.

2 133
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

FP/FPX/FP0R

System registers
No. 40 41 42 43 44 45 46 47 50 51 52 PLC WO1 WO 1 53 54 55 57 Name Range of link relays used Range of link data registers used Starting number for link relay transmission Link relay transmission size Starting number for link data register transmission Link data register transmission size PC (PLC) Link switch flag Maximum unit number setting for MEWNETW0 PLC link Range of link relays used Range of link data registers used Starting number for link relay transmission Link relay transmission size Starting number for link data register transmission Link data register transmission size Maximum unit number setting for MEWNETW0 PLC link Setting value and range 0 to 64 words 0 to 128 words 0 to 63 0 to 64 words 0 to 127 0 to 127 words Normal/reverse 1 to 16 0 to 64 words 0 to 128 words 64 to 127 0 to 64 words 128 to 255 0 to 127 words 1 to 16

PLC WO0

Program example
F0 MV , K F0 MV , K F0 MV , K F0 MV , K F0 MV , K F0 MV , K F0 MV , K F0 MV , K 64, DT0 128, DT1 0, DT2 10, DT3 0, DT4 10, DT5 0, DT6 5, DT7 Set value of system register 40 Set value of system register 41 Set value of system register 42 Set value of system register 43 Set value of system register 44 Set value of system register 45 Set value of system register 46 Set value of system register 47 Sets the values stored in DT0 to DT7 in system registers 40 to 47

SYS2 , DT0, K40, K47

Decimals of the average value are rounded off so that the average value is an integer.

2 134
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Basic Instructions

Precaution during programming Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software. A value between K40 and K47 should be specified for D1 or D2. Also, the values should always be specified in such a way that D1 D2. The values of the system registers change, so a verification error may occur when the program is verified. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: D1 > D2 The specified value is outside the ranges specified for the various system registers setting values

2 135
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ST = ST <> ST > ST >= ST < ST <=


Outline

16bit data comparison: Start equal 16bit data comparison: Start equal not 16bit data comparison: Start larger 16bit data comparison: Start equal or larger 16bit data comparison: Start smaller 16bit data comparison: Start equal or smaller

Performs start operation by comparing two word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. Program example
Ladder Diagram Boolean Address 0 S1 0 6 S2 Y30 Y31 5 6 Instruction ST = DT K OT ST > = DT S1 S2 11 S1 S2 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared K OT Y 0 60 31 Y 0 50 30

=, DT 0, K 50 > =, DT 0, K 60

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A DT A A Register LD (*1) A A FL (*2) A A Index register IX (*3) A A IY (*4) A A Constant K A A H A A Index modifier A A A: Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FPe/FP/FPX/FP0R. With the FP, FPX, FP0R, FP2, FP2SH and FP10SH, this is I0 to IC. With the FP, FPX, FP0R, FP2, FP2SH and FP10SH, this is ID.

2 136
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Compares the contents of data register DT0 with the constant K50 and K60. If DT0 = K50, the external output relay Y30 goes on and if DT0 K60, the external output relay Y31 turns on.
DT0 60 50

10 on Y30 off on Y31 off

Description
Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition. The ST instruction initiates a logical operation as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction ST= ST < > ST> ST> ST< ST<


= =

Condition
S1 < S2 S1 = S2 S1 > S2

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

Precautions concerning usage


The start comparison instructions ST =, ST<>, ST >, ST >=, ST <, and ST <= are programmed from the bus line. If mixed with BCD or other type of data, the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. In this case, use an F81 (BIN) instruction or similar instruction to change the data to binary data before making the comparison.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

2 137
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

STD = STD <> STD > STD >= STD < STD <=
Outline

32bit data comparison: Start equal 32bit data comparison: Start equal not 32bit data comparison: Start larger 32bit data comparison: Start equal or larger 32bit data comparison: Start smaller 32bit data comparison: Start equal or smaller

Performs start operation by comparing two double word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. 13 Program example
Ladder Diagram Boolean Address 0 S1 0 10 S2 Y30 Y31 9 10 Instruction STD = DT DT OT STD > DT DT 19 S1 S2 OT Y 0 100 31 Y 0 100 30

D =, DT 0, DT 100 D >, DT 0, DT 100


S1 S2

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A DT A A Register LD (*1) A A FL (*2) A A Index register IX (*3) A A IY (*4) N/A N/A Constant K A A H A A Index modifier A A A: Available N/A: Not Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FPe/FP/FPX/FP0R. With the FP, FPX, FP0R, FP2, FP2SH and FP10SH, this is I0 to IC. With the FP, FPX, FP0R, FP2, FP2SH and FP10SH, this is ID.

2 138
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100). If (DT1, DT0) = (DT101, DT100), the external output relay Y30 goes on and if (DT1, DT0) > (DT101, DT100), the external output relay Y31 goes on.

Description
Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition. The STD instruction initiates a logical operation as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction STD= STD< > STD> STD> STD< STD<


= =

Condition
(S1+1, S1) < (S1+1, S1) = (S1+1, S1) > (S2+2, S2) (S2+2, S2) (S2+2, S2)

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The specified data area and the following data area are handled together as 32bit data.

S1+1

S1 Comparison

S2+1

S2

Precautions concerning usage


The start comparison instructions STD =, STD <>, STD >, STD >=, STD <, and STD <= are programmed from the bus line. If mixed with BCD or other type of data, the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. In this case, use an F83 (DBIN) instruction or similar instruction to change the data to binary data before making the comparison.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

2 139
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

STF = STF <> STF > STF >= STF < STF <=
Outline

Floating point real number data comparison: Start equal Floating point real number data comparison: Start equal not Floating point real number data comparison: Start larger Floating point real number data comparison: Start equal or larger Floating point real number data comparison: Start smaller Floating point real number data comparison: Start equal or smaller

Availability FP0R FPX Ver 1.10 or more FP 32k

Performs start operation by comparing two single precision real number data items with the comparison condition. The contact goes on or off depending on the result of the comparison. 14 Program example
Ladder Diagram Boolean Address 0 S1 0 10 S2 Y30 Y31 9 10 Instruction STF = DT DT OT STF > DT DT 19 S1 S2 OT Y 0 100 31 Y 0 100 30

F =, DT 0, DT 100 F >, DT 0, DT 100


S1 S2

Real number data (2 words) or lower 16-bit area of 32-bit data to be compared Real number data (2 words) or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WX WY WR WL S1 S2 A A A A A A A A SV A A EV A A DT A A Timer/Counter Register FL LD (*1) A A A A Index register I (*2) A A K A A Constant H A A f A A A: Index Integer modifier device A* A* A A

(*1) This cannot be used with the FP/FPX. (*2) I0 to ID.

Available

* Index modification of a real number is not possible.

2 140
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Compares the real number value of data registers (DT0, DT1) with the real number value of data registers (DT100, DT101). If (DT0, DT1) = (DT100, DT101), the external output relay Y30 goes on and if (DT0, DT1) > (DT100, DT101), the external output relay Y31 goes on.

Description
Compares the real number data specified by S1 and S1+1 with the real number data specified by S2 and S2+1 according to the comparison condition. The STF instruction initiates a logical operation as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction STF= STF< > STF> STF> STF< STF<


= =

Condition
(S1+1, S1) < (S1+1, S1) = (S1+1, S1) > (S2+2, S2) (S2+2, S2) (S2+2, S2)

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The specified data area and the following data area are handled together as single precision real number data.

S1+1

S1 Comparison

S2+1

S2

Precautions concerning usage


The start comparison instructions STF =, STF <>, STF >, STF >=, STF <, and STF <= are programmed from the bus line. Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data are specified in (S1+1, S1) and (S2+1, S2).

2 141
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions 5

AN = AN <> AN > AN >= AN < AN <=

16bit data comparison: AND equal 16bit data comparison: AND equal not 16bit data comparison: AND larger 16bit data comparison: AND equal or larger 16bit data comparison: AND smaller 16bit data comparison: AND equal or smaller

Performs AND operation by comparing two word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in series. 15 Program example Outline
Ladder Diagram Boolean Address 0 X0 0 Instruction ST AN > = DT K 6 S1 S2 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared OT Y 0 60 30 X 0

> =, DT 0, K 60
S1 S2

Y30

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A DT A A Register LD (*1) A A FL (*2) A A Index register IX (*3) A A IY (*4) A A Constant K A A H A A Index modifier A A A: Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FP0R/FPe/FP/FPX. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is ID.

2 142
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Compares the contents of data register DT0 with the constant K60 when X0 turns on. If DT0 K60 in the X0 on state, external output relay Y30 goes on. If DT0 < K60 or if X0 is in the off state, external output relay Y30 goes off.
DT0 60 10 X0 on
off

Y30 on off

Description
Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition. The AN instruction results in serial connection as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction AN= AN< > AN> AN> AN< AN<


= =

Condition
S1 < S2 S1 = S2 S1 > S2

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

Precautions concerning usage


Multiple AND comparison instructions AN =, AN <>, AN >, AN >=, AN <, and AN <= can be used consecutively. If mixed with BCD or other type of data, the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. In this case, use an F81 (BIN) instruction or similar instruction to change the data to binary data before making the comparison.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

2 143
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

AND = AND <> AND > AND >= AND < AND <=
Outline

32bit data comparison: AND equal 32bit data comparison: AND equal not 32bit data comparison: AND larger 32bit data comparison: AND equal or larger 32bit data comparison: AND smaller 32bit data comparison: AND equal or smaller

Performs AND operation by comparing two double word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in series. 16
Boolean Address 0 X0 0 Instruction ST AND >= DT DT 10 S1 S2 OT Y 0 100 30 X 0

Program example
Ladder Diagram

D> =, DT 0, DT100
S1 S2

Y30

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A DT A A Register LD (*1) A A FL (*2) A A Index register IX (*3) A A IY (*4) N/A N/A Constant K A A H A A Index modifier A A A: Available N/A: Not Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FP0R/FPe/FP/FPX. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is ID.

2 144
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100) when X0 turns on. If (DT1, DT0) (DT101, DT100) in the X0 on state, the external output relay Y30 goes on. If (DT1, DT0) < (DT101, DT100) or if X0 is in the off state, the external output relay Y30 goes off.

Description
Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition. The AND instruction results in serial connection as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction AND= AND< > AND> AND> AND< AND<


= =

Condition
(S1+1, S1) < (S1+1, S1) = (S1+1, S1) > (S2+1, S2) (S2+1, S2) (S2+1, S2)

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The specified data area and the following data area are handled together as 32bit data.
S1+1 S1 Comparison

S2+1

S2

Precautions concerning usage


Multiple AND comparisons instructions AND =, AND <>, AND >, AND >=, AND <, and AND <= can be used consecutively. If mixed with BCD or other type of data, the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. In this case, use an F83 (DBIN) instruction or similar instruction to change the data to binary data before making the comparison.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

2 145
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ANF = ANF <> ANF > ANF >= ANF < ANF <=
Outline

Floating point real number data comparison: AND equal Floating point real number data comparison: AND equal not Floating point real number data comparison: AND larger Floating point real number data comparison: AND equal or larger Floating point real number data comparison: AND smaller Floating point real number data comparison: AND equal or smaller

Availability FP0R FPX Ver 1.10 or more FP 32k

Performs AND operation by comparing two single precision real number data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in series. 17
Boolean Address 0 X0 0 Instruction ST ANF>= DT DT 10 S1 S2 OT Y 0 100 30 X 0

Program example
Ladder Diagram

F> =, DT 0, DT100
S1 S2

Y30

Real number data (2 words) or lower 16-bit area of 32-bit data to be compared Real number data (2 words) or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WX WY WR WL S1 S2 A A A A A A A A SV A A EV A A DT A A Timer/Counter Register FL LD (*1) A A A A Index register I (*2) A2 A K A A Constant H A A f A A A: Index Integer modifier device A* A* A A

(*1) This cannot be used with the FP/FPX. (*2) I0 to ID.

Available

* Index modification of a real number is not possible.

2 146
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Compares the real number value of data registers (DT0, DT1) with the real number value of data registers (DT100, DT101) when X0 turns on. If (DT0, DT1) (DT100, DT101) in the X0 on state, the external output relay Y30 goes on. If (DT0, DT1) < (DT100, DT101) or if X0 is in the off state, the external output relay Y30 goes off.

Description
Compares the real number data specified by S1 and S1 +1 with the real number data specified by S2 and S2+1 according to the comparison condition. The ANF instruction results in serial connection as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction ANF= ANF< > ANF> ANF> ANF< ANF<


= =

Condition
(S1+1, S1) < (S1+1, S1) = (S1+1, S1) > (S2+1, S2) (S2+1, S2) (S2+1, S2)

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The specified data area and the following data area are handled together as single precision real number data.
S1+1 S1 Comparison

S2+1

S2

Precautions concerning usage


Multiple ANF comparisons instructions ANF =, ANF <>, ANF >, ANF >=, ANF <, and ANF <= can be used consecutively. Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data are specified in (S1+1, S1) and (S2+1, S2).

2 147
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

OR = OR <> OR > OR >= OR < OR <=


Outline

16bit data comparison: OR equal 16bit data comparison: OR equal not 16bit data comparison: OR larger 16bit data comparison: OR equal or larger 16bit data comparison: OR smaller 16bit data comparison: OR equal or smaller

Performs OR operation by comparing two word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in parallel. 18 Program example
Ladder Diagram Boolean Address Y30 0 1 Instruction ST OR > = DT K S1 S1 S2 S2 6 OT Y 0 60 30 X 0

X0

> =, DT 0, K 60

16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A DT A A Register LD (*1) A A FL (*2) A A Index register IX (*3) A A IY (*4) A A Constant K A A H A A Index modifier A A A: Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FP0R/FPe/FP/FPX. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is ID.

2 148
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Explanation of example
Y30 goes on when X0 is in the on state, or when DT0 goes off.
DT0 60 10 X0
on off on

K60. If DT0 < K60 and if X0 is in the off state, then Y30

Y30 off

Description
Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition. The OR instruction results in parallel connection as the liaison contact when the comparison result is a specified status (=, <, >, etc.). The result of the comparison operation is as follows:

Comparison instruction OR= OR< > OR> OR> OR< OR<


= =

Condition
S1 < S2 S1 = S2 S1 > S2

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

Precautions concerning usage


The OR comparison instructions OR =, OR <>, OR >, OR >=, OR <, and OR<= are programmed from the bus line. Multiple OR comparison instructions OR =, OR <>, OR >, OR >=, OR <, and OR <= can be used consecutively. If mixed with BCD or other type of data, the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. In this case, use an F81 (BIN) instruction or similar instruction to change the data to binary data before making the comparison.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

2 149
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ORD = ORD <> ORD > ORD >= ORD < ORD <=
Outline

32bit data comparison: OR equal 32bit data comparison: OR equal not 32bit data comparison: OR larger 32bit data comparison: OR equal or larger 32bit data comparison: OR smaller 32bit data comparison: OR equal or smaller

Performs OR operation by comparing two double word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in parallel. 19 Program example
Ladder Diagram X0 0 1 Y30 Boolean Address 0 1 Instruction ST DT DT S1 S1 S2 S2 10 OT Y X 0 0 100 30

ORD> =

D> =, DT 0, DT100

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A DT A A Register LD (*1) A A FL (*2) A A Index register IX (*3) A A IY (*4) N/A N/A Constant K A A H A A Index modifier A A A: Available N/A: Not Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0/FPe. This cannot be used with the FP0/FP0R/FPe/FP/FPX. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP, FPX, FP0R, FP2, FP2SH, and FP10SH, this is ID.

2 150
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Eplanation of example
Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100). When X0 turns on or if (DT1, DT0) (DT101, DT100), the external output relay Y30 goes on. If (DT1, DT0) < (DT101, DT100) and if X0 is in the off state, the external output relay Y30 goes off.

Description
Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition. The ORD instruction results in parallel connection as the liaison contact when the comparison result is a specified status (=, >, <, etc.). The result of the comparison operation is as follows:

Comparison instruction ORD= ORD< > ORD> ORD> ORD< ORD<


= =

Condition
(S1+1, S1)< (S2+1, S2) (S1+1, S1) = (S1+1, S1) > (S2+1, S2) (S2+1, S2)

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The specified data area and the following data area are handled together as 32bit data.
S1+1 S1 Comparison

S2+1

S2

Precautions concerning usage


The OR comparison instructions ORD =, ORD <>, ORD >, ORD >=, ORD <, and ORD <= are programmed from the bus line. Multiple OR comparison instructions ORD =, ORD <>, ORD >, ORD >=, ORD<, and ORD <= can be used consecutively. If mixed with BCD or other type of data, the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. In this case, use an F83 (DBIN) instruction or similar instruction to change the data to binary data before making the comparison.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

2 151
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

ORF = ORF <> ORF > ORF >= ORF < ORF <=
Outline

Floating point real number data comparison: OR equal Floating point real number data comparison: OR equal not Floating point real number data comparison: OR larger Floating point real number data comparison: OR equal or larger Floating point real number data comparison: OR smaller Floating point real number data comparison: OR equal or smaller

Availability FP0R FPX Ver 1.10 or more FP 32k

Performs OR operation by comparing two single precision real number data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in parallel. Program example
Ladder Diagram X0 0 1 Y30 Boolean Address 0 1 Instruction ST ORF> = DT DT S1 S1 S2 S2 10 OT Y 0 100 30 X 0

F> =, DT 0, DT100

Real number data (2 words) or lower 16-bit area of 32-bit data to be compared Real number data (2 words) or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WX WY WR WL S1 S2 A A A A A A A A SV A A EV A A DT A A Timer/Counter Register FL LD (*1) A A A A Index register I (*2) A2 A K A A Constant H A A f A A A: Index Integer modifier device A* A* A A

(*1) This cannot be used with the FP/FPX. (*2) I0 to ID.

Available

* Index modification of a real number is not possible.

2 152
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

Eplanation of example
When X0 turns on or if (DT0, DT1) (DT100, DT101) by comparing the real number value of data registers (DT0, DT1) with the real number value of data registers (DT100, DT101), the external output relay Y30 goes on. If (DT0, DT1) < (DT100, DT101) and if X0 is in the off state, the external output relay Y30 goes off.

Description
Compares the real number data specified by S1 and S1 +1 with the real number data specified by S2 and S2+1 according to the comparison condition. The ORF instruction results in parallel connection as the liaison contact when the comparison result is a specified status (=, >, <, etc.). The result of the comparison operation is as follows:

Comparison instruction ORF= ORF< > ORF> ORF> ORF< ORF<


= =

Condition
(S1+1, S1)< (S2+1, S2) (S1+1, S1) = (S1+1, S1) > (S2+1, S2) (S2+1, S2)

off on off off on on

on off off on off on

off on on on off off


< > indicates >= indicates <= indicates

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The specified data area and the following data area are handled together as single precision real number data.
S1+1 S1 Comparison

S2+1

S2

Precautions concerning usage


The OR comparison instructions ORF =, ORF <>, ORF >, ORF >=, ORF <, and ORF <= are programmed from the bus line. Multiple OR comparison instructions ORF =, ORF <>, ORF >, ORF >=, ORF<, and ORF <= can be used consecutively. Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data are specified in (S1+1, S1) and (S2+1, S2).

2 153
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Basic Instructions

2 154
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Chapter 3 Highlevel Instructions

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3-2
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

3.1

Composition of High-level Instructions

3.1
3.1.1

Composition of High-level Instructions


Composition

Each high-level instruction is composed of a high-level instruction number, boolean and operands. Example: F0 (MV) instruction
The K0 (S) is copied to DT0 (D) Execution condition (Trigger) Address X0 0 Operand

F0 MV , K0
S

DT 0

D Boolean Highlevel instruction number

Highlevel instruction number Highlevel instruction numbers are used for inputting the high-level instructions. Boolean Boolean indicate the processing content of each instruction. Operand Operands are used to specify the processing method and the storage area for processed data, etc. Operands are classified into three types: S (source), D (destination) and n (number). The number of operands differ depending on the instruction. Operand types

S (Source): Data which is to be processed or data which sets the processing method. D (Destination): Location where result of processing is stored. n (number): Numeric data which is to be processed or which sets the processing method.

Operands are specified using constants or memory areas (registers) as explained in section 1.3 and 1.4. Refer to the explanations of the instructions as only certain memory areas (registers) and constants can be used with each instruction.

3-3
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3.1.2

High-level Instruction Numbers and Program Input

High-level instruction numbers are assigned to high-level instructions. For example, the number assigned to the MV instruction (16-bit data transfer instruction) is 0 (F0 or P0). A highlevel instruction is entered by entering its high-level instruction number. A highlevel instruction with the prefix F is executed in every scan while its execution condition (trigger) is in the on state. A highlevel instruction with the prefix P is executed only when the leading edge of its execution condition (trigger) is detected. For details about F and P type highlevel instructions Input of F type highlevel instruction
X0 F0 MV , K 0 , DT 0
F 0

section 3.1.4

Input of P type highlevel instruction


X0 P0 PMV , K 0 , DT 0
P 0

3-4
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

3.1

Composition of High-level Instructions

3.1.3

High-level Instruction and Execution Condition (Trigger)

A high-level instruction is always used in a pair with its execution condition (trigger). When the operation result of the relay sequence circuit specified as the execution condition (trigger) is on, the high-level instruction is executed. Example: When the execution condition (trigger) X0 is on, the F0 (MV) instruction is executed and K0 is transferred to DT0.
X0 F0 MV, K0, DT0 Execution condition (Trigger)

There is no need to program the same execution condition (trigger) many times when two or more high-level instructions are programmed consecutively with the same execution condition (trigger). Example:
X0 X0 F0 MV, K50, DT1 F151 WRT, K0, DT1, K1, K0 This execution condition (trigger) is not required.

X0

F0 MV, K50, DT1 F151 WRT, K0, DT1, K1, K0

Precautions if omitting execution conditions (triggers) If you need to program both F and P type high-level instructions using the same execution condition (trigger), proceed according to one of the following two examples. Example 1: The same execution condition (trigger) is programmed twice for F and P type instructions.
X0 F0 MV, DT 0 , DT 1 F0 MV, DT 2 , DT 3 F60 CMP, DT 1 , DT 3 X0 P0 PMV, H 8000, DT 9058 P157 PCADD, DT 9054, DT 0, DT 30

3-5
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example 2: The execution condition (trigger) is programmed once using the PSHS, RDS and POPS instructions.
X0 PSHS F0 MV, WR 0 , DT 10 F0 MV, LD 1 , DT 11 RDS POPS P115 PFIFT, DT 10 , DT 11

3.1.4

F and P Type High-level Instructions

For more highlevel instructions, F and P types are available. F type high-level instruction While the execution condition (trigger) is on, the instruction is executed at each scan repeatedly.
Execution condition (Trigger) Ftype high-level instruction
on off Execution

1 scan

P type high-level instruction The leading edge of the execution condition (trigger) is detected, and a single scan is executed.
Execution condition (Trigger) Ptype high-level instruction
on off Execution

1 scan

As long as the execution condition (trigger) for the P type instruction continues to be on, the instruction is executed only at the rise of the condition, and is not subsequently executed. If the mode is switched to the RUN mode, or the power supply is turned on in the RUN mode, the instruction is not executed in the first scan if the execution condition (trigger) for the P type instruction has been in effect from the beginning.
RUN (Power: on) Execution condition (Trigger) Operation of instruction
Not executed

Executed

3-6
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

3.1

Composition of High-level Instructions

When you use the P type instruction with one of the following instructions that changes the order of the execution of instructions, be aware that the operation of the instructions will differ depending on the timing of their execution and their execution conditions (triggers). MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instruction section 4.3 For detailed information When combining the P type highlevel instruction with an AND stack instruction or pop stack instruction, be careful that the programming is correct. For detailed information section 4.7

3-7
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F0 (MV) P0 (PMV)
Outline

16-bit data move

Copies 16-bit data to the specified 16-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P0 (PMV) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 0 DT DT R 0 (MV) 10 20

Trigger R0 10 F0 MV , DT 10 , S
S D

DT 20 D

16-bit equivalent constant or 16-bit area (source) 16-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register Index register Constant K A N/A H A N/A LD FL DT IX (*3) IY (*4) (*1) (*2) A A A A A A A A A A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
The contents of data register DT10 are copied to data register DT20 when trigger R0 turns on.

Description
The 16-bit data or 16-bit equivalent constant specified by S is copied to the area specified by D.

Reference
When using an FP0/FPe/FP0R/FP/FPX highspeed counter: F0 (MV) page 3 437 When using an FP0/FPe/FP0R/FP/FPX pulse output: F0 (MV) page 3 443

38
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Application example Example 1: Transfer K30 to timer set value area SV0 when R1 turns on.
R1 F0 MV, K 30, SV 0

Example 2: Transfer the timer elapsed value EV0 to data register DT0 when R2 turns on.
R2 F0 MV, EV 0, DT 0

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

39
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F1 (DMV) P1 (PDMV)
Outline

32-bit data move

Copies 32-bit data to the specified 32-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P1 (PDMV) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F DT R 1 (DMV) 10 20 0

Trigger 10 R0 F1 DMV , DT 10 , DT20 S D

DT

S D

32-bit equivalent constant or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 32-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register Index register Constant K A N/A H A N/A LD FL DT IX (*3) IY (*4) (*1) (*2) A A A A A A A A N/A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
The contents of data registers DT11 and DT10 are copied to data registers DT21 and DT20 when trigger R0 turns on.
Higher 16bit area Lower 16bit area .... The content (16 bits) of DT10 and the content (16 bits) of DT11 are joined and treated as 32bit data.

Content for DT11

Content for DT10

.... 32bit data is separated into the higher 16bit data and the lower 16bit data, and stored in DT21 and DT20. To DT21 To DT20

3 10
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The 32-bit data or 32-bit equivalent constant specified by S is copied to the 32-bit area specified by D. When processing 32-bit data, the higher 16-bit areas (S+1, D+1) are automatically determined once the lower 16-bit areas (S, D) are specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Reference
FP1/FPM highspeed counter elapsed value: F1 (DMV) page **** FP0/FPe/FP/FPX highspeed counter pulse output elapsed value: F1 (DMV) page 3 449

3 11
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F2 (MV/) P2 (PMV/)
Outline

16-bit data invert and move

Inverts 16-bit data and transfers it to the specified 16-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P2 (PMV/) is not available. Program example
Ladder Diagram Boolean Address 10 Instruction ST F 2 DT DT R 0 (MV/) 11 20

Trigger 10 R0 F2 MV/ , DT 11 , S
S D

11

DT 20 D

16-bit equivalent constant or 16-bit area to be inverted (source) 16-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register Index register Constant K A N/A H A N/A LD FL DT IX (*3) IY (*4) (*1) (*2) A A A A A A A A A A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
The contents of data register DT11 are inverted and transferred to data register DT20 when trigger R0 turns on.
DT 10 DT 11 DT 12 H 3F [S] DT 20 DT 21 DT 22 H H 1111 23A [D]

H 5555 H 1234

H FFFF F2 (MV/) execution

Source [S]: H5555


Bit position 15 1211 8 7 4 3 0 DT11 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Invert and transfer

R0: on

DT 10 DT 11 DT 12

3F

H 5555 H 1234

Invert and transfer DT 20 DT 21 [S] DT 22

Destination [D]: HAAAA


H AAAA H 23A H FFFF Bit position 15 [D] DT20 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

1211

8 7

4 3

3 12
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The 16-bit data or 16-bit equivalent constant specified by S is inverted and transferred to the 16-bit area specified by D.
Bit position 15 1211 8 7 4 3 0 Binary data 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 Hexadecimal 0 4 D 2

Bit position 15 1211 8 7 4 3 0 Binary data 1 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1


Hexadecimal

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 13
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F3 (DMV/) P3 (PDMV/)
Outline

32-bit data invert and move

Inverts 32-bit data and transfers it to the specified 32-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P3 (PDMV/) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 3 DT DT R 0 (DMV/) 11 20

Trigger 10 R0 F3 DMV/ , DT11 , DT 20 S


S D

32-bit equivalent constant or lower 16-bit area of 32-bit data to be inverted (source) Lower 16-bit area of 32-bit data (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 14
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data registers DT12 and DT11 are inverted and transferred to data registers DT21 and DT20 when trigger R0 turns on. DT10 DT11 DT12 H 25AC H 0 [S] H FFFD DT20 DT21 DT22 H 1111 H 34A H FFFF [D]

R0: on

F3 (DMV/) execution

DT10 DT11 DT12

H 25AC H 0 H FFFD

Invert and transfer

DT20 DT21 DT22

H FFFF H 2 H FFFF

[D]

[S]

Description
The 32-bit data or 32-bit equivalent constant specified by S is inverted and transferred to the 32-bit area specified by D.
S S+1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1

D D+1

0 0 1 1 0 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 0

When processing 32-bit data, the higher 16-bit areas (S+1, D+1) are automatically determined once the lower 16-bit areas (S, D) are specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 15
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F4 (GETS) P4 (PGETS)
Outline Program example

Reading of head word No. of the specified slot.

The head word No. of the specified slot is read.


This function is available from FP2/FP2SH Ver. 1.50 or later.
Boolean Address 10 11 Instruction ST F 4 DT DT R 0 11 20

Ladder Diagram

Trigger 10 R0 F4 GETS , DT11 , DT 20 S


S D

(GETS)

Specification of slot numbers Area in which the WX and WY numbers stored (32 bits)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

Explanation of example
The number of WX and WY for the slot specified by S is read, and set in [D, D+1]. D D+1 Head number of WX of specified slot Head number of WY of specified slot

When the unit is with X only, the same value is stored for the head number of WY. When the unit is with Y only, the same value is stored for the head number of WX. When the unit without input/output is specified, the same value is stored in D and D+1.

Flag conditions

Error flag (R9007)(R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when the number other than 0 to 31 is specified for the slot number.

3 16
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F5 (BTM) P5 (PBTM)
Outline

Bit data move

Copies bit data of one 16-bit area to the specified bit of another 16-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P5 (PBTM) is not available.
Boolean Address 10 11 Instruction ST F 5 DT H DT R 0 (BTM) 20 C04 10

Program example
Ladder Diagram

Trigger 10 R0 F5 BTM , DT 20 , H C04 , DT 10 S


S n D

16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (specifies source and destination bit positions) 16-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S n D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 17
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The data at bit position 4 in data register DT20 is copied to bit position 12 in data register DT10 when trigger R0 turns on. Source [S]
Bit position 15 1211 8 7 4 3 0 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 DT20

n:H C 0 4 Source bit position 4 Destination bit position 12

Destination [D]
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 DT10

Destination [D]
Bit position 15 DT10

R0: on

F5 (BTM) execution 8 7

0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0

1211

4 3

Description
A single bit in the 16-bit data or the 16-bit equivalent constant specified by S is copied to a bit of the 16-bit area specified by D, as specified by n. With the FP2SH and FP10SH, it is possible to transfer the contents of multiple bits as a single transfer.

How to specify n
The n specifies the source and destination bit positions using hexadecimal data as follows:
n:H

Bit position of source S (set range: H0 to HF) Number of transfer bits Range other than the above: 0 should be specified. FP2 (Ver. 1.03 and subsequent versions), FP2SH and FP10SH only Range: From 0 to F can be specified (refer to next page). Bit position of destination D (set range: H0 to HF)

Bit position specification for S and D


Bit position Set value 15 HF 14 HE 13 HD 12 HC 11 HB 10 HA 9 H9 8 H8 7 H7 6 H6 5 H5 4 H4 3 H3 2 H2 1 H1 0 H0

For example, when bit position 10 is specified, HA should be specified. If bit position 4 of S is being transferred to bit position 12 of D, n = HC04.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 18
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Transferring multiple bits [this can only be executed with FP0R, FP, FPX, FP2 (Ver. 1.03 and subsequent versions), FP2SH, and FP10SH]
With the FP2, FP2SH and FP10SH, if the number of bits to be transferred is specified for n, the specified number of bits is transferred in sequential order, starting from the position specified by S, to destination, starting from the position specified by D. Up to 16 bits can be transferred. The number of bits to be transferred should be specified as a hexadecimal value. The range is from 0 to F (1 bit to 16 bits). No. of bits transferred
1 bit 2 bits 3 bits 4 bits 5 bits 6 bits 7 bits 8 bits 9 bits 10 bits 11 bits 12 bits 13 bits 14 bits 15 bits 16 bits

Setting (n)
H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF

Example:

When two bits are being transferred (n = H1 ) Two bits sent, starting from bit position 5 of S to bit position 10 of D........n = HA15
Bit position 15 12 11 8 7 4 3 0 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 S Two bits, starting from bit position 5 Bit position 15 12 11 8 7 4 3 0 1 1 1 0 1 1 0 1 0 0 0 1 1 0 0 1 D F5 (BTM) execution

Bit position 15 12 11 8 7 4 3 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 D Bit positions 5 and 6 of S are transferred to bit position 10 and 11 of D 3 19
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If 0 is specified as the number of bits to be transferred, the specified one bit is transferred. If the specified range extends beyond the area of S, the contents of the part extending beyond the area are transferred as 0.

Example:

When four bits starting from bit position 14 of S are transferred to bit position 2 of D...n = H23E
Bit position S 15 12 11 8 7 4 3 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 Four bits, starting from bit position 14 Bit position 15 12 11 8 7 4 3 0 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1 D F5 (BTM) execution Bit position 15 12 11 8 7 4 3 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1 D

Bit positions 14 and 15 of S are transferred to bit positions 2 and 3 of D. 0 is stored in bit positions 4 and 5 of D. If the specified range extends beyond the area of D, the contents of the part extending beyond the area are not transferred. Data is not written to the next address.

Example:

Six bits starting from bit position 6 of S are transferred to bit position 12 of D...n = HC56
Bit position 15 12 11 8 7 4 3 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 1 1 S Six bits, starting from bit position 6 Bit position 15 12 11 8 7 4 3 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 D F5 (BTM) execution

Bit position 15 12 11 8 7 4 3 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 D From among bit positions 6 to 11 of S, bit positions 6 to 9 are transferred to bit positions 12 to 15 of D (the contents of bit positions 10 and 11 of S are ignored). 3 20
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F6 (DGT) P6 (PDGT)
Outline

Hexadecimal digit data move

Copies hexadecimal digits at one 16-bit area to the specified digit position in another 16-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P6 (PDGT) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 6 DT H DT R 0 (DGT) 10 0 20

Trigger 10 R0 F6 DGT , DT 10 , H 0 , DT 20 S
S n D

16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (specifies source and destination hexadecimal digit position and number of hexadecimal digits) 16-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S n D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Hexadecimal digit position

Bit position 15 1211 8 7 4 3 0

DT10

0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1

The lower four bits in the data register DT10 is copied.


Hexadecimal 3 2 1 0 digit position Bit position 15 1211 8 7 4 3 0

DT20

0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1

In this example, the upper 12 bits of DT20 do not change.

3 21
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The hexadecimal digits in the 16-bit data or in the 16-bit equivalent constant specified by S are copied to the 16-bit area specified by D, as specified by n.

Digits
Digits are units of 4 bits used when handling data. With this instruction, 16bit data is separated into four digits. The digits are called in order hexadecimal digit 0, digit 1, digit 2 and digit 3, beginning from the least significant four bits
16-bit data 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1
Hexadecimal Hexadecimal digit 3 digit 1 Hexadecimal Hexadecimal digit 2 digit 0

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

How to specify n
n specifies the 3 source hexadecimal digit position, the 2 number of digits and the hexadecimal digit position to be copied using hexadecimal data as follows: n:H
3 1

destination

Source: Starting hexadecimal digit position H0: Hexadecimal digit 0 H1: Hexadecimal digit 1 H2: Hexadecimal digit 2 H3: Hexadecimal digit 3

Number of hexadecimal digits to be copied H0: Copies 1 hexadecimal digits (4 bits) H1: Copies 2 hexadecimal digits (8 bits) H2: Copies 3 hexadecimal digits (12 bits) H3: Copies 4 hexadecimal digits (16 bits)

Destination: Starting hexadecimal digit position H0: Hexadecimal digit 0 H1: Hexadecimal digit 1 H2: Hexadecimal digit 2 H3: Hexadecimal digit 3
1

If the value for form, H0.

and

is 0, such as H000 in the example program on the previous page, use the short

3 22
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Examples of hexadecimal digit copy


The following patterns of digit transfer are possible based on the specification of n. (1) When hexadecimal digit 1 of the source is copied to hexadecimal digit 1 of the destination:
digit S 3 2 1 0

Specify n: H 1 0 1
D digit digit S 3 3 2 2 1 1 0 0

(2) When hexadecimal digit 3 of the source is copied to hexadecimal digit 0 of the destination:

Specify n: H 0 0 3 (Short form: H3)


D digit 3 2 1 0

(3) When multiple hexadecimal digits (hexadecimal digits 2 and 3) of the source are copied to multiple hexadecimal digits (hexadecimal digits 2 and 3) of the destination:
digit S 3 2 1 0

Specify n: H 2 1 2
D digit 3 2 1 0

(4) When multiple hexadecimal digits (hexadecimal digits 0 and 1) of the source are copied to multiple hexadecimal digits (hexadecimal digits 2 and 3) of the destination:
digit S 3 2 1 0

Specify n: H 2 1 0
D

(5) When 4 hexadecimal digits (hexadecimal digits 0 to 3) of the source are copied to 4 hexadecimal digits (hexadecimal digits 0 to 3) of the destination:
digit S 3 2 1 0

digit

Specify n: H 1 3 0
D digit 3 2 1 0

3 23
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 24
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F7 (MV2) P7 (PMV2)
Outline

Two 16-bit data move

Copies two 16-bit data to the specified 32-bit area. For the FP0R/FP/FPX, the P type highlevel instruction P7 (PMV2) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F7 DT DT DT R 0 (MV2) 10 20 30

Trigger R0 10 F7 MV2, DT10, S1


S1 S2 D

DT20, S2

DT30 D

16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (source) Lower 16-bit area for 32-bit area (destination)

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A A K A A N/A Constant H A A N/A f N/A N/A N/A Index modifier A A A

(*1) This cannot be used with the FP0R, FP and FPX.

Explanation of example

A: Available N/A: Not Available

The contents of data register DT10 are copied to data register DT30 when trigger R0 turns on. The contents of data register DT20 are copied to data register DT31 when trigger R0 turns on. 16 bits [S2] Contents of DT20 [S1] Contents of DT10 16 bits

[D] DT31 DT30

3 25
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The two 16-bit data or two 16-bit equivalent constant specified by S1 and S2 is copied to the 32-bit area specified by D when the trigger turns on.

Related instruction
To copy three 16-bit data, use the F190 (MV3) instruction.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 26
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F8 (DMV2) P8 (PDMV2)
Outline

Two 32-bit data move

Copies two 32-bit data to the specified 64-bit area. For the FP0R/FP/FPX, the P type highlevel instruction P8 (PDMV2) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F8 DT DT DT R (DMV2) 10 20 30 0

Trigger
R0 10 F8 DMV2, DT10, S1 DT20, S2 DT30 D

S1 S2 D

32-bit equivalent constant or lower 16-bit area of 32-bit data (source) 32-bit equivalent constant or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 64-bit area (destination)

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

Explanation of example
Higher 16-bit area [S2] Contents of DT21 Contents of DT20 Lower 16-bit area [S1] Contents of DT11 Contents of DT10 Higher 16-bit area Lower 16-bit area

A: Available N/A: Not Available

The contents of data register DT11 and DT10 and the contents of data register DT21 and DT20 are copied to data registers DT33, DT32, DT31 and DT30 when trigger R0 turns on.

[D] DT33 DT32 DT31 DT30

3 27
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The two 32-bit data or two 32-bit equivalent constant specified by S1 and S2 is copied to the 64-bit area (D+3, D+2, D+1 and D) specified by D when the trigger turns on.

Related instruction
To copy three 32-bit data, use the F191 (DMV3) instruction.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 28
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F10 (BKMV) P10 (PBKMV)


Outline

Block move

Copies block data to the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available. 4 Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 10 DT DT DT R 0 0 3 10

Trigger 10 R0 F10 BKMV , DT 0 , DT 3 , DT 10 S1


S1 S2 D

(BKMV)

S2

Starting 16-bit area (source) Ending 16-bit area (source) Starting 16-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register I N/A N/A N/A Constant K N/A N/A N/A H N/A N/A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

Description
The data block specified by S1 and S2 is copied to the block starting from the 16-bit area specified by D.

Precautions during programming


The starting area S1 and ending area S2 should be the same type of operand. The number of the lower address should be specified by S1, and the number of the higher address should be specified by S2. If S1 is specified as higher than S2 and the instruction is executed, an operation error will occur.

3 29
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The data of data register DT0 to DT3 is copied to the data registers DT10 to DT13 when trigger R0 turns on.
[S1] DT0 DT1 DT2 [S2] DT3 DT4 K K K K K 10 11 12 13 14 R0: on Source DT9 DT10 DT11 DT12 DT13 K K K K K 0 0 0 0 0

F10 (BKMV) execution

[S1] DT0 DT1 DT2 [S2] DT3 DT4

K K K K K

10 11 12 13 14

DT9 DT10 DT11 DT12 DT13

K K K K K

0 10 11 12 13 [D]

Precautions if the same type of memory area is specified for S1, S2, and D
The instruction is not executed if the address and type of memory area is the same for S1 and D. If the block being transferred overlaps the transfer destination, the transfer results will be overwritten. If S1 < D, the source data is copied starting from the higher address to the lower address in order (DT4 DT3 DT2 DT1).
[S1] DT0 DT1 DT2 [S2] DT3 DT4 K K K K K 10 11 12 13 14 DT0 DT1 DT2 DT3 DT4 K K K K K 10 10 11 12 13 [D]

If S1 > D, the source data is copied starting from the lower address to the higher address in order (DT0 DT1 DT2).
DT0 DT1 [S1] DT2 DT3 [S2] DT4 K K K K K 10 11 12 13 14 DT0 DT1 DT2 DT3 DT4 K K K K K 12 13 14 13 14 [D]

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2 The data block to be copied exceeds the limit of the destination area.

3 30
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F11 (COPY) P11 (PCOPY)


Outline

Block copy

Copies the specified 16-bit data to a block with one or more 16-bit areas. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 11 DT DT DT R 0 1 10 14

Trigger 10 R0 F11 COPY , DT 1 , DT10 , DT14 S


S D1 D2

(COPY)

D1

D2

16-bit equivalent constant or 16-bit area (source) Starting 16-bit area (destination) Ending 16-bit area (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A N/A N/A IY (*4) A N/A N/A Constant K A N/A N/A H A N/A N/A Index modifier A A A A: Available N/A: Not Available

S D1 D2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 31
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data register DT0 are copied to the block ranging from data register DT10 to DT14 when trigger R0 turns on.
DT0 [S] DT1 DT2 DT3 DT4 K K K K K 10 11 12 13 14 R0: on DT10 DT11 DT12 DT13 DT14 K K K K K 0 0 0 0 0 [D2] [D1]

F11 (COPY) execution

DT0 [S] DT1 DT2 DT3 DT4

K K K K K

10 11 12 13 14

DT10 DT11 DT12 DT13 DT14

K K K K K

11 11 11 11 11

[D1]

[D2]

Description
The 16-bit equivalent constant or 16-bit area specified by S is copied to all 16-bit areas of the block specified by D1 and D2.

Precautions during programming


The starting area D1 and ending area D2 should be the same type of operand. The area of the lower address for the block being copied should be specified by D1, and the higher address should be specified by D2. If D1 is specified as higher than D2 and the instruction is executed, an operation error will occur. When the same number as D1 and D2 is specified, the 16bit data will be copied to the 16bit area of that number.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2.

3 32
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

F12 (ICRD)
Outline Program example

Data read from EEPROM

Availability FP0/FPe

Reads data from the EEPROM area.


Boolean Non-ladder Address 10 11 Instruction ST F 12 K K DT R 0 (ICRD) 0 10 0

Ladder Diagram

Trigger 10 R0 F12 ICRD , K 0 , S1


S1 S2 D

K10 , DT0 S2 D

Constant for specifying the starting address of EEPROM (for source data) 32bit equivalent constant or lower 16bit area of 32bit data for specifying number of words to be read Starting 16bit area for storing data read from EEPROM (for destination)

Operands
Operand S1 S2 D Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT LD FL Index register IX IY Constant K A A H N/A N/A Index modifier N/A N/A N/A A: Available N/A: Not Available

N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A A

N/A N/A N/A N/A N/A N/A

Explanation of example
10 blocks of data stored in blocks 0 to 9 of the EEPROM are transferred to data registers DT0 to DT639 when execution condition (trigger) R0 turns on.
EEPROM area [S1] 0 64 words 1 64 words [S2] 2 64 words 9 64 words Address (Block) Data register DT [D] 0 64 128 576

3 33
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Description
S2 blocks of data stored in the EEPROM starting from S1 are transferred into the data register specified by D. At this time, the transferred data is handled in units of 1 block/64 words.

Precautions during programming


Values that can be specified by S1, S2 and D Type yp
FP0 C10, C14, C16, FPe FP0 C32, SL1 FP0 T32

Memory area S1
K0 to K9 K0 to K95 K0 to K255

S2
K1 to K10 K1 to K96 K1 to K256

D
DT0 to DT1595 DT0 to DT6080 DT0 to DT16320

Volume of data held in the EEPROM Type


FP0 C10, C14, C16, FPe FP0 C32, SL1 FP0 T32

Volume that can be read


640 words 6,144 words 16,384 words

Because the initial data in the EEPROM is not fixed, caution is required when reading data that has not been written to the EEPROM.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The address specified by S1 does not exist in the EEPROM area. The area specified by S2 exceeds the limit of the EEPROM area. The area is exceeded when blocks specified by D and subsequent parameters are transferred.

3 34
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

F12 (ICRD)
Outline Program example

Availability

Data read from FROM

FP/FPX/FP0R

Reads data from the FROM area.


Boolean Non-ladder Address 10 11 Instruction ST F 12 K K DT R 0 (ICRD) 0 10 0

Ladder Diagram

Trigger 10 R0 F12 ICRD , K 0 , S1


S1 S2 D

K10 , DT0 S2 D

Constant for specifying the starting address of FROM (for source data) 32bit equivalent constant or lower 16bit area of 32bit data for specifying number of words to be read Starting 16bit area for storing data read from FROM (for destination)

Operands
Operand S1 S2 D Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT LD FL Index register I N/A N/A N/A Constant K A A H N/A N/A Index modifier N/A N/A N/A A: Available N/A: Not Available

N/A N/A N/A N/A N/A N/A A N/A N/A

N/A N/A

Explanation of example
10 blocks of data stored in blocks 0 to 9 of the FROM are transferred to data registers DT0 to DT20479 when execution condition (trigger) R0 turns on.
FROM area [S1] 0 2,048 words 1 2,048 words [S2] 2 2,048 words 9 2,048 words Address (Block) Data register DT [D] 0 2048 4096 18432

3 35
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Description
S2 blocks of data stored in the FROM starting from S1 are transferred into the data register specified by D. At this time, the transferred data is handled in units of 1 block (2,048 words).

Precautions during programming


Values that can be specified by S1, S2 and D Type yp
FP, FPX, FP0R

Memory area S1
K0 to K15

S2
K1 to K16

D
DT0 to DT30720 (FPX C14, FP0R C10, 14, 16: DT0 to DT12284)

Volume of data held in the FROM Type


FP, FPX, FP0R

Volume that can be read


32,765 words (FPX C14, FP0R C10, 14, 16: 12285 words)

Because the initial data in the FROM is not fixed, caution is required when reading data that has not been written to the FROM. The initial value of FROM of FP0R can be cleared to 0 when the programs are all deleted with a tool software.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The address specified by S1 does not exist in the FROM area. The area specified by S2 exceeds the limit of the FROM area. The area is exceeded when blocks specified by D and subsequent parameters are transferred.

3 36
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Highlevel Instructions

F12 (ICRD) P12 (PICRD)


Outline Program example

Data read from IC card

Availability FP2SH/FP10SH

Reads data from the expansion memory area of the IC card.

Ladder Diagram

Boolean Non-ladder Address 10 11 Instruction ST F 12 K K DT R 0 (ICRD) 0 10 100

Trigger 10 R0 F12 ICRD , K 0 , S1


S1 S2 D

K10 , DT100 S2 D

Constant for specifying the starting address of IC card expansion memory (for source data) 32bit equivalent constant or lower 16bit area of 32bit data for specifying number of words to be read Starting 16bit area for storing data read from IC card (for destination)

Operands
Relay Operand WX WY WR WL S1 S2 D N/A N/A N/A N/A A N/A A A A A A A SV N/A A A EV N/A A A DT LD FL Timer/Counter Register Index register IX (*1) N/A A N/A IY (*2) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

N/A N/A N/A A A A A A A

(*1) This is I0 to IC. (*2) This is ID.

Explanation of example
10 words of data stored in addresses 0 to 9 of the IC card expansion memory area are transferred to data registers DT100 to DT109 when trigger R0 turns on.
Expansion memory area in IC card [S1] 0 1 [S2] 2 9 Address Internal memory of CPU [D] DT100 DT101 DT102 DT109

3 37
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2SH/FP10SH

Description
S2 words of data stored in the IC card expansion memory area starting from S1 are transferred into the CPU memory location specified by D.

Precautions during programming


The values available for S1 and S2 vary depending on the size of the IC card expansion memory area. When using an nkB IC card Value that can be specified for S2: 1 to

( n x 21024

Value that can be specified for S1: 0 to ([S2]1) n


256 k 512 k 1M 2M

S1
K131070 K262142 K524286 K1048574

S2
K131071 (H1FFFF) K262143 (H3FFFF) K524287 (H7FFFF) K1048575 (HFFFFF)

Note: When using as remaining DOS formatted mkB expansion memory: S2: 1 to

m x 1024 2

S1: 0 to [S2]

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: No IC card is installed in the CPU. The IC card access enable switch is set to off (disabled). No expansion memory area is found on the IC card. The address specified by S1 does not exist in the expansion memory area of the IC card. The area specified by S2 exceeds the limit of the expansion memory area of the IC card. The area is exceeded when blocks specified by D and subsequent parameters are transferred.

3 38
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

P13 (PICWT)
Outline Program examplez

Step

Availability FP0 V2.0 or more/FPe

Data write to EEPROM

11

Writes data to the EEPROM area.


Boolean Non-ladder Address 10 11 Instruction ST P 13 DT K K R 0 0 10 0

Ladder Diagram

Trigger 10 R0 P13 PICWT , DT 0 , K10 , S1 S2 K0 D

(PICWT)

This instruction is a differential execution type (P type) of instruction, and should be specified with a P in front of the instruction number.
S1 S2 D Starting 16-bit area for storing source data 32bit equivalent constant or lower 16bit area of 32bit data for specifying number of words to be write Starting address (constant) of EEPROM area for storing received data (for destination)

Operands
Operand S1 S2 D Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT A LD FL Index register IX N/A N/A N/A IY N/A N/A N/A Constant K N/A A A H N/A N/A N/A Index modifier N/A N/A N/A A: Available N/A: Not Available

N/A N/A

N/A N/A N/A N/A N/A N/A

Explanation of example
10 blocks (640 words) of data stored in data registers DT0 to DT576 are transferred to blocks 0 to 9 in the EEPROM area when execution condition (trigger) R0 turns on.
Data register DT [S1] 0 64 words 64 64 words [S2] 128 64 words 576 64 words EEPROM area 0 1 2 9 Address (Block) [D]

3 39
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Description
S2 blocks of data stored in the data register starting from S1 are transferred into the EEPROM area specified by D. At this time, the transferred data is handled in units of 1 block/64 words.

Precautions during programming


Values that can be specified by S1, S2 and D Type yp
FP0 C10, C14, C16, FPe FP0 C32, SL1 FP0 T32

Memory area S1
DT0 to DT1595 DT0 to DT6080 DT0 to DT16320

S2
K1 to K10 K1 to K96 K1 to K256

D
K0 to K9 K0 to K95 K0 to K255

Volume of data that can be held in the EEPROM Type


FP0 C10, C14, C16, FPe FP0 C32, SL1 FP0 T32

Volume that can be read


640 words 6,144 words 16,384 words

Data can be written to the EEPROM up to 10,000 times. In order to prevent this instruction from being written to the EEPROM numerous times through erroneous programming, it has been set up as a differential execution type of instruction (P13). When setting up the program, however, please make sure that this instruction is not written to the EEPROM numerous times. When the instruction is executed, the operation execution time will be approximately 5 ms longer for block (64 words). This instruction should not be used in interrupt programs. If the FP0R is used as the FP0, the execution time will be longer. (FP0 compatibility mode) Comparative chart of execution time of FP0R in FP0 mode and FP0 No. of specified blocks
1 2 4 8 16 32 33 40

Execution time of FP0 (Unit: ms)


5 10 20 40 80 160 165 205

Execution time of FP0R in FP0 compatibility mode (Unit: ms)


100 100 100 100 100 100 200 200

Note that the execution time of the FP0R in FP0 mode is longer as shown in the above chart.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The number specified by S1 does not exist in the memory area. The area specified by S2 exceeds the limit of the memory area. The area is exceeded when blocks specified by D and subsequent parameters are transferred.

3 40
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

P13 (PICWT)
Outline Program example

Availability

Data write to FROM

FP/FPX/FP0R

Writes data to the FROM area.


Boolean Non-ladder Address 10 11 Instruction ST P 13 DT K K R 0 0 1 0

Ladder Diagram

Trigger 10 R0 P13 PICWT , DT 0 , S1 K1 , S2 K0 D

(PICWT)

This instruction is a differential execution type (P type) of instruction, and should be specified with a P in front of the instruction number.
S1 S2 D Starting 16-bit area for storing source data 32bit equivalent constant or lower 16bit area of 32bit data for specifying number of words to be write Starting address of FROM area for storing received data (for destination)

Operands
Operand S1 S2 D Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT A LD FL Index register I N/A N/A N/A Constant K N/A A A H N/A N/A N/A Index modifier N/A N/A N/A A: Available N/A: Not Available

N/A N/A

N/A N/A N/A N/A N/A N/A

Explanation of example
1 block (2,048 words) of data stored in data registers DT0 is transferred to block 0 in the FROM area when execution condition (trigger) R0 turns on.
Data register DT [S2] [S1] 0 2,048 words 2048 2,048 words 4096 2,048 words 18432 2,048 words FROM area 0 1 2 9 Address (Block) [D]

3 41
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Description
S2 block of data stored in the data register starting from S1 is transferred into the FROM area specified by D. At this time, the transferred data is handled in units of 1 block (2,048 words).

Precautions during programming


Values that can be specified by S1, S2 and D Type yp
FP, FPX, FP0R

Memory area S1
DT0 to DT30720 (FPX C14, FP0R C10, 14, 16: DT0 to DT12284)

S2
K1

D
K0 to K15

Volume of data that can be held in the FROM Type


FP, FPX, FP0R

Volume that can be read


32,765 words (FPX C14, FP0R C10, 14, 16: 12285 words)

Data can be written to the FROM up to 10,000 times. In order to prevent this instruction from being written to the FROM numerous times through erroneous programming, it has been set up as a differential execution type of instruction (P13). When setting up the program, however, please make sure that this instruction is not written to the FROM numerous times. The number of blocks that can be written to is only one. Also, a maximum time of approximately 100 ms is required for instruction execution. To write to multiple blocks, first divide into multiple scans. This instruction should not be used in interrupt programs.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The number specified by S1 does not exist in the memory area. The area specified by S2 exceeds the limit of the memory area. The area is exceeded when blocks specified by D and subsequent parameters are transferred.

3 42
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Highlevel Instructions

F13 (ICWT) P13 (PICWT)

Data write to IC card

Availability FP2SH/FP10SH

Outline Writes data to the expansion memory area in the IC card. Program example
Ladder Diagram Boolean Non-ladder Address 10 11 Instruction ST F 13 DT K K R 0 100 10 100

Trigger 10 R0 F13 ICWT , DT 100 , K10 , K100 S1


S1 S2 D

(ICWT)

S2

Starting 16-bit area for storing source data 32bit equivalent constant or lower 16bit area of 32bit data for specifying number of words to be write Starting address (constant) of IC card expansion memory area for storing received data (for destination)

Operands
Relay Operand WX WY WR WL S1 S2 D A A A A A A A A SV A A N/A EV A A N/A DT A A LD A A FL A A Timer/Counter Register Index register IX (*1) N/A A N/A IY (*2) N/A N/A N/A Constant K N/A A A H N/A A A Index modifier A A A A: Available N/A: Not Available

N/A N/A N/A N/A

N/A N/A N/A

(*1) This is I0 to IC. (*2) This is ID.

Explanation of example
10 words of data stored in data registers DT100 to DT109 are transferred to addresses 100 to 109 in the expansion memory area in the IC card when trigger R0 turns on.
Internal memory of CPU [S1] DT 100 DT101 [S2] DT102 DT109 Expansion memory area in IC card 100 101 102 109 Address [D]

3 43
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2SH/FP10SH

Description
S2 words of data stored in the CPU starting from S1 are transferred into the expansion memory area in the IC card specified by D. The F13 (ICWT)/P13 (PICWT) instruction can be executed only in the expansion memory area of an SRAMtype IC card.

Precautions during programming


The values available for D vary depending on the size of expansion memory area in the IC card. When using an nkB IC card Value that can be specified for S2: 1 to

( n x 21024

Value that can be specified for S1: 0 to ([S2]1) n


256 k 512 k 1M 2M

S1
K131070 K262142 K524286 K1048574

S2
K131071 (H1FFFF) K262143 (H3FFFF) K524287 (H7FFFF) K1048575 (HFFFFF)

Note: When using as remaining DOS formatted mkB expansion memory: S2: 1 to

m x 1024 2

S1: 0 to [S2]

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: No IC card is installed in the CPU. The IC card access enable switch is set to off (disabled). Write protect is in effect on the card side. The card is a FLASHEEPROM type. No expansion memory area is found on the IC card. The area specified by S2 exceeds the limit of the expansion memory area of IC card. The area is exceeded when blocks specified by D and subsequent parameters are transferred.

3 44
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F14 (PGRD) P14 (PPGRD)

Program read from IC card

Outline Reads a program from the IC card and executes it. Program example
Ladder Diagram Boolean Non-ladder Address 10 11 Instruction ST F 14 DT R 0 100

Trigger 10 R0 F14 PGRD , DT 100 S


S

(PGRD)

Starting 16-bit area (max. 4 words of data) for storing file name (max. 8 letters) in the ASCII format.

Operands
Relay Operand WX WY WR WL S A A A A SV A EV A DT A LD A FL A Timer/Counter Register Index register IX (*1) N/A IY (*2) N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) With the FP2SH/FP10SH, this is I0 to IC. (*2) With the FP2SH/FP10SH, this is ID.

Explanation of example
When the execution condition R0 is on, the programs for file names written to data register DT100 and subsequent data registers are read from the IC memory card, and are substituted for the program currently being executed. If STEP2 is written for data register DT100 or a subsequent register, the program with the file name STEP2 stored on the IC memory card is read.
CPU
R0 F14(PGRD) , DT100

IC memory card Program STEP1 Program STEP2 Program STEP3

RUN mode R0 : on DT100: STEP2


R20

Y40

The program STEP2 is executed.

R21

3 45
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The program for the file name stored in the area specified by S is read from the IC memory card, and is substituted for the program currently being executed. Subsequent operation is carried out based on the program which was read.

Precautions when changing programs


Programs are changed when the ED instruction is executed. At that point, the mode changes automatically from the RUN mode to the PROG. mode. All output goes off. The contents of memory areas not specified as holdtype are cleared. When a program is read, the system registers are rewritten at the same time. The same system register settings as those of the specified program should always be used, including the I/O map, remote I/O map, and others.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: No IC card is installed in the CPU. The IC card access enable switch is set to off (disabled). No DOS formatted area is found on the IC card. The specified file name does not exist on the IC card. The specified file is not a program file for the FP2SH/FP10SH. The file is damaged. A file name which cannot be used is specified.

3 46
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying file names


The program file name should be replaced with a character code, and written to the memory area that has S as the first address. ASCII codes can be used. No extension should be attached. A singlebyte numerical value H00 is the final code. If H00 is written at the end of the file name (the MSB), the characters up to that point area treated as the file name. If all 8 characters are specified for the file name, no final code is necessary. A code (H20) should be specified for any blank spaces. All 8 characters specified (Higher) (Lower)
DT100 DT101 DT102 DT103 B D H20 H20 A C H20 H20

Only some of the characters specified (Higher) (Lower)


DT100 DT101 B D A C H0

Space codes

DT102

Final code

Specific example of specifying a file name


There are two ways to write a character code to a memory area specified by the F14 (PGRD) instruction. The character code can be written directly, using a data move instruction (F0 or F1). The character code can be converted to the file name written when the program was created, using the ASCII conversion instruction (F95).

Writing a character code directly

Example:

When only some of the characters are specified Specifying a file name of ABCD
File name ASCII code R0 F1 (DMV), H 44434241, DT 100 F0 (MV), R1 F14 (PGRD), DT 100 H 0, DT 102 A B C D 41 42 43 44

Specifying a file name of STEP2


File name S T E P 2 ASCII code 53 54 45 50 32 R1 F1 (DMV), H 50455453, DT 100 F0 (MV), H 32, DT 102 R1 F14 (PGRD), DT 100

3 47
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying a file name with the ASCII conversion instruction, and converting it
The file name is converted to a character code using the ASCII conversion instruction F95 (ASC), and is written to a specified memory area. Programming can only be done with the programming tool software. When the ASCII conversion instruction is executed, the results are stored in a 6word (12character) memory area. The specification should be made as follows. Operand of F95 M The file name (8 characters) should be entered with characters filling the spaces starting from the left. Spaces should be entered where characters are not specified.

Example:

( indicates a space) Specifying a file name of ABCD


R0 R1 F95 (ASC), M ABCD F14 (PGRD), DT 100 ,DT 100

Specifying a file name of STEP2


R0 R1 F14 (PGRD), DT 100 F95 (ASC), M STEP2 ,DT 100

3 48
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F15 (XCH) P15 (PXCH)


Outline

16-bit data exchange

Exchanges two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P15 (PXCH) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 15 DT DT R 0 (XCH) 10 22

Trigger 10 R0 F15 XCH , DT 10 , DT 22 D1


D1 D2

D2

16-bit area to be exchanged 16-bit area to be exchanged

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

D1 D2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 49
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data register DT10 and data register DT22 are exchanged when trigger R0 turns on.
[D1] DT10 DT11 DT12 DT13 DT14 K K K K K 10 11 12 13 14 R0: on DT20 DT21 DT22 DT23 DT24 K K K K K 20 21 22 23 24 [D2]

F15 (XCH) execution

[D1] DT10 DT11 DT12 DT13 DT14

K K K K K

22 11 12 13 14

DT20 DT21 DT22 DT23 DT24

K K K K K

20 21 10 23 24

[D2]

Description
The contents in the 16-bit areas specified by D1 and D2 are exchanged.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 50
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F16 (DXCH) P16 (PDXCH)


Outline

32-bit data exchange

Exchanges two 32-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 16 DT DT R 0 10 22

Trigger 10 R0 F16 DXCH , DT 10 , DT22 D1


D1 D2

(DXCH)

D2

Lower 16-bit area of 32-bit data to be exchanged Lower 16-bit area of 32-bit data to be exchanged

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

D1 D2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 51
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data registers DT11 and DT10 and data registers DT23 and DT22 are exchanged when trigger R0 turns on.
[D1] DT10 DT11 DT12 DT13 H H H H 0 FFFD 25AC F23 DT20 DT21 DT22 DT23 H H H H 1234 5678 9ABC [D2] DEF1

R0: on

F16 (DXCH) execution

[D1] DT10 DT11 DT12 DT13

H H H H

9ABC DEF1 25AC F23

DT20 DT21 DT22 DT23

H H H H

1234 5678 0 [D2] FFFD

Description
The contents in the 32-bit areas specified by D1 and D2 are exchanged.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 52
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F17 (SWAP) P17(PSWAP)


Outline

Higher/lower byte in 16-bit data exchange

Exchanges higher and lower order bytes of the specified 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 17 DT R 0 0

Trigger 10 R0 F17 SWAP , DT 0 D


D

(SWAP)

16-bit area to be exchanged higher and lower bytes

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
The higher and lower bytes of data register DT0 are exchanged when trigger R0 turns on.
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 DT0
Hexadecimal

Higher byte (8-bit)

Lower byte (8-bit) R0: on F17 (SWAP) execution

Bit position 15 1211 8 7 4 3 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 DT0 Hexadecimal D 2 0 4

3 53
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The higher order byte (higher 8-bit) and lower order byte (lower 8-bit) of the 16-bit area specified by D are exchanged.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 54
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F18 (BXCH) P18(PBXCH)


Outline

16-bit blocked data exchange

Exchanges the 16-bit blocked data. For the FP0R/FP/FPX, the P type highlevel instruction P18 (PBXCH) is not available. Program example
Ladder Diagram Boolean Address 10 11 12 Instruction ST F18 DT DT DT R 0 10 13 31

Trigger R0 10 (DF) F18 BXCH, DT10, D1


D1 D2 D3

(BXCH)

DT13, D2

DT31 D3

Starting 16-bit area of block data 1 Ending 16-bit area of block data 1 Starting 16-bit area of block data 2

Operands
Relay Operand WX WY WR WL D1 D2 D3 N/A N/A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

3 55
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The data block from data register DT10 to data register DT13 and the data block (DT31 to DT34) starting from data register DT31 are exchanged when trigger R0 turns on. [D1] DT10 11 12 [D2] DT13 14 K K K K K 10 11 12 13 14 DT30 31 32 33 34 35 R0: on WR [D1] DT10 11 12 [D2] DT13 14 K K K K K 2 3 4 5 14 K K K K K K 1 2 3 4 5 6 [D3]

F18 (BXCH) execution DT30 31 32 33 34 35 K K K K K K 1 10 11 12 13 6 [D3]

Description
The data block specified by D1 and D2 and the block starting from the 16-bit area specified by D3 are exchanged when the trigger turns on.

Precautions during programming


The starting area D1 and ending area D2 should: Be the same type of operand. Satisfy D1 D2. If area D1 > D2, an operation error occurs. If the areas of blocks to be exchanged overlap, correct exchange will not be possible. Note, however, that an error will not occur (the error flag will not turn on).

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2 The data block to be exchanged exceeds the limit of the destination area.

3 56
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F19 (SJP) LBL


Outline

Auxiliary jump Label

Skips to the LBL instruction with the same number as the data area specified by the F19 (SJP) instruction. 20 Program example
Ladder Diagram Boolean Address 10 Instruction ST F19 R 0

10

R0

11

F19 SJP, DT 0 S Label number (LBL 20 )

(SJP) DT 0

16-bit area for storing the label number [0 to 255 (256 points)]

Operands
Relay Operand WX WY WR WL S A A A A SV A EV A DT A LD A FL A Timer/Counter Register Index register IX (*1) N/A IY (*2) N/A Constant K N/A H N/A Index modifier N/A A: Available N/A: Not Available

(*1) With the FP2, FP2SH, and FP10SH, this is I0 to IC. (*2) With the FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Skips to the label number with the same number as the value in data register DT0 when trigger R0 turns on. R0 F19 SJP, DT 0 Program (LBL 1 ) Program (LBL 125 ) When DT0 is K1, the program skips from F19 (SJP) to LBL1. When DT0 is K125, the program skips from F19 (SJP) to LBL125. When DT0 = K1 When DT0 = K125

3 57
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The F19 (SJP) instruction skips the program between the F19 (SJP) and the LBL with the number specified by S when the trigger turns on. Program execution continues from the next instruction after the jump destination label. Up to 256 jump destinations can be specified (the range of values in which S can be stored is from K0 to K255). LBL instructions are specified as destinations of JP, LOOP and F19 (SJP) instructions. Any instruction may be used as the starting point for the jump destination. Two or more LBL instructions with the same number cannot be used in the same program. If there is no label with the same number as the value of S, or if the value stored is outside of the range, the F19 (SJP) instruction will not be executed.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The content of S is smaller than K0. The content of S is larger than K255.

Precautions during programming


If the label is written to an address prior to the F19 (SJP) instruction, be aware that there is a possibility that the scan cannot be completed, and an operation bottleneck error will occur. The F19 (SJP) instruction cannot be used in a stepladder area (the range from SSTP to CSTP), in a subroutine, or in an interrupt program. A jump cannot be made from a main program to a subprogram (subroutines or interrupt programs written subsequent to the ED instruction).

Using differential type instructions between F19 (SJP) and LBL instructions
This is the same as when programming is done between the JP and LBL instructions. Refer to the explanation of the JP and LBL instructions. You must be careful when using one of the instructions below, which are executed by detecting the leading edge of execution condition (trigger) such as the differential instruction. DF (leading edge differential) Count input of CT (counter) Count input of F118 (up/down counter) Shift input of SR (shift register) Shift input of F119 (left/right shift register) NSTP (next step) Differential execution type highlevel instruction (this instruction is specified by P and a number)

3 58
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F20 (+) P20 (P+)


Outline

16-bit data addition [D+S D]

Adds two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P20 (P+) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 20 DT DT R 0 (+ ) 1 10

Trigger 10 R0 F20 +, DT 1 , DT 10 S
S D

16-bit equivalent constant or 16-bit area (for addend) 16-bit area (for augend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
The contents of data register DT10 and data register DT1 are added together when trigger R0 turns on. When the decimal number 4 is in DT1 and the decimal number 8 is in DT10, as shown below. Augend [D]: K8
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT10

Addend [S]: K4

Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 DT1

Result [D]: K12


Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0

3 59
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The 16-bit equivalent constant or 16-bit area specified by S and the 16-bit area specified by D are added together. Augend data
(D) +

Addend data
(S)

Trigger turns on

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If the calculated result accidentally overflows or underflows, use of the F21 (D+) instruction (32-bit data addition) is recommended. When you use the F21 (D+) instruction instead of F20 (+), be sure to convert the 16-bit addend and augend into 32-bit data using the F89 (EXT) instruction. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows).

3 60
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F21(D+) P21(PD+)
Outline

32-bit data addition [(D+1, D) + (S+1, S) (D+1, D)]

Adds two 32-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P21 (PD+) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 21 DT DT R 0 (D+) 0 10

Trigger 10 R0 F21 D+ , DT 0 , S
S D

DT 10 D

32-bit equivalent constant or lower 16-bit area of 32-bit area (for addend) Lower 16-bit area of 32-bit data (for augend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 61
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents (32 bits) of data registers DT11 and DT10 and the contents (32 bits) of data registers DT1 and DT0 are added together when trigger R0 turns on.
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10 (Addition)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT1

Contents of DT0 (Result is stored.)

The lower 16 bits of added result is stored in DT10 and the higher 16 bits of the result is stored in DT11. Store to DT11 Store to DT10

Description
The 32-bit equivalent constant or the 32-bit area specified by S and the 32-bit data specified by D are added together. Augend data
(D+1, D) +

Addend data
(S+1, S)

Result
(D+1, D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows).

3 62
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F22 (+) P22 (P+)


Outline

16-bit data addition [S1 + S2 D]

Adds two 16-bit data items and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P22 (P+) is not available.
Boolean Address 10 11 Instruction ST F 22 DT DT DT R 0 (+ ) 10 20 30

Program example
Ladder Diagram

Trigger 10 R0 F22+, DT 10 , DT 20 , DT 30 S1
S1 S2 D

S2

16-bit equivalent constant or 16-bit area (for augend) 16-bit equivalent constant or 16-bit area (for addend) 16-bit area (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 63
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data registers DT10 and DT20 are added when trigger R0 turns on. The added result is stored in data register DT30. when the decimal number 8 is in DT10 and the decimal number 4 is in DT20, as shown below. Augend [S1]: K8
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT10

Addend [S2]: K4

Bit position 15 1211 8 7 4 3 0 DT20 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

(Addition)

Result [D]: K12


Bit position 15 1211 8 7 4 3 0 DT30 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0

Description
The 16-bit data or 16-bit equivalent constant specified by S1 and S2 are added together. The added result is stored in D. Augend data
(S1) +

Addend data
(S2)

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If the calculated result accidentally overflows or underflows, use of the F23 (D+) instruction (32-bit data addition) is recommended. When you use the F23 (D+) instruction instead of F22 (+), be sure to convert the 16-bit addend and augend into 32-bit data using the F89 (EXT) instruction. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows).

3 64
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F23 (D+) P23 (PD+)


Outline

32-bit data addition [(S1+1, S1) + (S2+1, S2) (D+1, D)]

Adds two 32-bit data items and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P23 (PD+) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 23 DT DT DT R 0 (D+) 10 20 30

Trigger R0 10 F23 D+ , DT 10 , DT 20 , DT 30 S1
S1 S2 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data (for augend) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for addend) Lower 16-bit area of 32-bit data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 65
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 are added when trigger R0 turns on. The added result is stored in data registers DT31 and DT30.
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10 (Addition)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT21

Contents of DT20 (Result is stored.) The lower 16 bits of added result is stored in DT30 and the higher 16 bits of the result is stored in DT31. Store to DT30

Store to DT31

Description
The 32-bit data or 32-bit equivalent constant specified by S1 and S2 are added together. The added result is stored in D+1 and D. Augend data
(S1+1, S1) +

Addend data
(S2+1, S2)

Result
(D+1, D)

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined once the lower 16-bit areas (S1, S2, D) are specified.

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows).

3 66
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F25 () P25 (P)


Outline

16-bit data subtraction [D S D]

Subtracts 16-bit data from the minuend. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P25 (P) is not available. Program example
Ladder Diagram Boolean Address 10 Instruction ST F 25 DT DT R 0 ( ) 10 20

Trigger 10 R0 F25 , DT 10 , DT 20 S
S D

11

16-bit equivalent constant or 16-bit area (for subtrahend) 16-bit area (for minuend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Subtracts the contents of data register DT10 from the contents of data register DT20 when trigger R0 turns on.

Example 1: When the decimal number 16 is in DT20 and the decimal number 4 is in DT10.
DT20 D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 K16 (Subtraction) S:
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

DT10

K4 =

D:

0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0

DT20

K12

3 67
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example 2: When the decimal number 3 is in DT20 and the decimal number 5 is in DT10.
DT20 D: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 K3 K5 = D:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

(Subtraction)
S:
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1

DT10

DT20

K2

Description
Subtracts the 16-bit equivalent constant or 16-bit area specified by S from the 16-bit area specified by D. Minuend data
(D)

Subtrahend data
(S)

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If the calculated result accidentally overflows or underflows, use of the F26 (D) instruction (32-bit data subtraction) is recommended. When you use the F26 (D) instruction instead of F25 (), be sure to convert the 16-bit subtrahend and minuend into 32-bit data using the F89 (EXT) instruction. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows).

3 68
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F26 (D) P26 (PD)


Outline

32-bit data subtraction [(D+1, D) (S+1, S) (D+1, D)]

Subtracts 32-bit data from the minuend. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P26 (PD) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 26 DT DT R 0 (D) 10 20

Trigger 10 R0 F26 D , DT 10 , DT 20 S
S D

32-bit equivalent constant or lower 16-bit area of 32-bit area (for subtrahend) Lower 16-bit area of 32-bit data (for minuend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 69
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the contents (32 bits) of data registers DT11 and DT10 from the contents (32 bits) of data registers DT21 and DT20 when trigger R0 turns on.
Higher 16 bits Lower 16 bits

Contents of DT21

Contents of DT20 (Subtraction)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT11

Contents of DT10 (Result is stored.)

The lower 16 bits of subtracted result is stored in DT20 and the higher 16 bits of the result is stored in DT21. Store to DT21 Store to DT20

Description
Subtracts the 32-bit equivalent constant or the 32-bit data specified by S from the 32-bit data specified by D. Minuend data
(D+1, D)

Subtrahend data
(S+1, S)

Result
(D+1, D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows).

3 70
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F27 () P27 (P)


Outline

16-bit data subtraction [S1 S2 D]

Subtracts 16-bit data from the minuend and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P27 (P) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 27 DT DT DT R 0 () 10 20 30

Trigger R0 10 F27 , DT 10 , DT 20 , DT 30 S1
S1 S2 D

S2

16-bit equivalent constant or 16-bit area (for minuend) 16-bit equivalent constant or 16-bit area (for subtrahend) 16-bit area (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Description
Subtracts the 16-bit data or 16-bit equivalent constant specified by S2 from the 16-bit data or 16-bit equivalent constant specified by S1. The subtracted result is stored in D. Minuend data
(S1)

Subtrahend data
(S2)

Result
(D)

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. = flag (R900B): Turns on for an instant when the calculated result is recognized as 0. Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows). 3 71

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the contents of data register DT20 from the contents of data register DT10 when trigger R0 turns on. The subtracted result is stored in data register DT30.

Example 1: When the decimal number 16 is in DT10 and the decimal number 4 is in DT20.
Minuend [S1]: K16
Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

Subtrahend [S2]: K4

(Subtraction)

Bit position 15 1211 8 7 4 3 0 DT20 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Result [D]: K12


Bit position 15 1211 8 7 4 3 0 DT30 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0

Example 2: When the decimal number 3 is in DT10 and the decimal number 5 is in DT20.
Minuend [S1]: K3
Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

Subtrahend [S2]: K5

(Subtraction)

Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 DT20

Result [D]: K2
Bit position 15 1211 8 7 4 3 0 DT30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If the calculated result accidentally overflows or underflows, use of the F28 (D) instruction (32-bit data subtraction) is recommended. When you use the F28 (D) instruction instead of F27 () be sure to convert the 16-bit subtrahend and minuend into 32-bit data using the F89 (EXT) instruction. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

3 72
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F28 (D) P28 (PD)


Outline

32-bit data subtraction [(S1+1, S1) (S2+1, S2) (D+1, D)]

Subtracts 32-bit data from the minuend and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P28 (PD) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 28 DT DT DT R 0 (D) 10 20 30

Trigger R0 10 F28 D , DT 10 , DT 20 , DT 30 S1
S1 S2 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data (for minuend) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for subtrahend) Lower 16-bit area of 32-bit data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 73
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the contents of data registers DT21 and DT20 from the contents of data registers DT11 and DT10 when trigger R0 turns on. The subtracted result is stored in data registers DT31 and DT30.
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10 (Subtraction)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT21

Contents of DT20 (Result is stored.)

The lower 16 bits of subtracted result is stored in DT30 and the higher 16 Store to DT31 Store to DT30 bits of the result is stored in DT31.

Description
Subtracts the 32-bit data or 32-bit equivalent constant specified by S2 from the 32-bit data or 32-bit equivalent constant specified by S1. The subtracted result is stored in D+1 and D. Minuend data
(S1+1, S1)

Subtrahend data
(S2+1, S2)

Result
(D+1, D)

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1 D+1) are automatically determined once the lower 16-bit areas (S1, S2, D) are specified.

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur. If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows).

3 74
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F30 (*) P30 (P*)


Outline

16-bit data multiplication [S1 S2 (D+1, D)]

Multiplies two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available.
Boolean Address 10 11 Instruction ST F 30 DT DT DT R 0 (*) 10 20 30

Program example
Ladder Diagram

Trigger 10 R0 F30 *, DT 10 , DT 20, DT 30 S1


S1 S2 D

S2

16-bit equivalent constant or 16-bit area (for multiplicand) 16-bit equivalent constant or 16-bit area (for multiplier) Lower 16-bit area of 32-bit data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 75
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Multiplies the contents of data register DT10 and DT20 when trigger R0 turns on. The result is stored in data registers DT 31 and DT 30. When the decimal number 8 is in DT10 and the decimal number 2 is in DT20. Multiplicand [S1]: K8
Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

Multiplier [S2]: K2
Bit position 15 1211 8 7 4 3 0 DT20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

Result [D+1, D]: K16


Bit position 15 1211 8 7 4 3 0 DT31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Higher 16-bit area Bit position 15 1211 8 7 4 3 0 DT30 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Lower 16-bit area

The lower 16 bits of the 32bit multiplication result are stored in the specified memory area (DT30), and the higher16 bits are stored in the area following the specified area (DT31).

Description
Multiplies the 16-bit data or 16-bit equivalent constant specified by S1 and the 16-bit data or 16-bit equivalent constant specified by S2. The multiplied result is stored in D+1 and D (32-bit area). Multiplicand data
(S1)

Multiplier data
(S2)

Result
(D+1, D)

The multiplied result is stored in the 32-bit area. The higher 16-bit area (D+1) is automatically determined once the lower 16-bit area (D) is specified.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 76
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F31 (D*) P31 (PD*)


Outline

32-bit data multiplication [(S1+1, S1) (S2+1, S2) (D+3, D+2, D+1, D)]

Multiplies two 32-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 31 DT DT DT R 0 (D*) 10 20 30

Trigger 10 R0 F31 D* , DT 10, DT 20 , DT 30 S1


S1 S2 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplicand) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 64-bit data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A N/A IY (*4) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
16 bits Contents of DT11 16 bits Contents of DT21 16 bits 16 bits 16 bits 16 bits Contents of DT10 16 bits Contents of DT20 16 bits The specified data area and the following data area are handled together as 32bit data.

Store to DT33 Store to DT32

The 64 bits of multiplication result are stored in order in DT30 to DT33 beginning from the lowest Store to DT31 Store to DT30 16 bits.

3 77
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2. The multiplied result is stored in D+3, D+2, D+1 and D. Multiplicand data
(S1+1, S1)

Multiplier data
(S2+1, S2)

Result
(D+3, D+2, D+1, D)

The multiplied result is stored in the 64-bit area. When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified. The areas (D+3, D+2, D+1) other than the lowest 16-bit area (D) are automatically determined once the lowest 16-bit area is specified.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 78
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F32 (%) P32 (P%)


Outline

16-bit data division [S1/S2 D (DT9015/DT90015)]

Divides 16-bit data by the divisor. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 32 DT DT DT R 0 (% ) 10 20 30

Trigger 10 R0 F32 % , DT 10 , DT 20 , DT 30 S1
S1 S2 D

S2

16-bit equivalent constant or 16-bit area (for dividend) 16-bit equivalent constant or 16-bit area (for divisor) 16-bit area (for quotient), (Remainder is stored in special data register DT9015/DT90015.)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 79
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Divides the contents of data register DT10 by decimal constant DT20 when trigger R0 turns on. The quotient is stored in data register DT30 and the remainder is stored in special data register DT9015/DT90015. When the decimal number 15 is in DT10 and the decimal number 4 is in DT20, as shown below. Dividend [S1]: K15
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 DT10

Divisor [S2]: K4
Bit position 15 1211 8 7 4 3 0 DT20 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Quotient [D]: K3

Remainder: K3

Bit position 15 1211 8 7 4 3 0 Bit position 15 1211 8 7 4 3 0 DT30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 . . . DT9015/ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 DT90015

Description
The 16-bit data or 16-bit equivalent constant specified by S1 is divided by the 16-bit data or 16-bit equivalent constant specified by S2. The quotient is stored in D and the remainder is stored in the special data register DT9015 (DT90015 for FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH). Dividend data (S1)

Divisor (S2)

Quotient (D)
....

Remainder (DT9015/DT90015)

With the FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FPe, the numbers of the special data registers are different.
Type FP0 C10, C14, C16, C32/ FPe FP0 T32/FP0R/FP/FPX/ FP2/FP2SH/FP10SH Special data register DT9015 DT90015

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the negative minimum value K-32768 (H8000) is divided by K-1 (HFFFF).

3 80
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F33 (D%) P33 (PD%)


Outline

32-bit data division [(S1+1, S1)/(S2+1, S2) (D+1, D)(DT9016, DT9015)/ (DT90016, DT90015)]

Divides 32-bit data by the divisor. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P33 (PD%) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 33 DT DT DT R 0 (D%) 10 20 30

Trigger 10 R0 F33 D% , DT 10 , DT 20 , S1
S1 S2 D

DT 30 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data (for dividend) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for divisor) Lower 16-bit area of 32-bit data (for quotient) (Remainder is stored in special data registers DT9016 and DT9015/DT90016 and DT90015.)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 81
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10

(Division)
Contents of DT20 Quotient is stored in DT31 and DT30.

Contents of DT21

To DT31

To DT30 The lower 16 bits of the remainder is stored in DT9015/DT90015 and the higher 16 bits of the remainder is stored in DT9016/DT90016.

To DT9016/ DT90016

To DT9015/ DT90015

Description
The 32-bit data or 32-bit equivalent constant specified by S1 is divided by the 32-bit data or 32-bit equivalent constant specified by S2. The quotient is stored in D+1 and D and the remainder is stored in the special data registers DT9016 and DT9015 (DT90016 and DT90015 for FP0 T32/FP0R/FP/FPX/FP2/FP2SH/ FP10SH). Dividend data Divisor S1: lower 16-bit S2: lower 16-bit S1+1: higher16-bit S2+1: higher16-bit Quotient D: lower 16-bit D+1: higher 16-bit Remainder
DT9015/DT90015 DT9016/DT90016

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined once the lower 16-bit areas (S1, S2, D) are specified. With the FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FPe, the numbers of the special data registers are different.
Type FP0 C10, C14, C16, C32/ FPe FP0 T32/FP0R/FP/FPX/ FP2/FP2SH/FP10SH Special data register DT9016, DT9015 DT90016, DT90015

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when negative minimum value K-2147483648 (H80000000) is divided by K-1 (HFFFFFFFF).

3 82
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F34 (*W) P34 (P*W)


Outline

16-bit data multiplication (result in 16 bits)

Multiplies two 16-bit data items and stores the result in the specified 16-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P34 (P*W) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F34 DT DT DT R 0 (*W) 10 20 30

Trigger R0 10 F34 *W, DT10, S1


S1 S2 D

DT20, S2

DT30 D

16-bit equivalent constant or 16-bit area (for multiplicand) 16-bit equivalent constant or 16-bit area (for multiplier) 16-bit area for storing multiplied result

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

Explanation of example
Multiplicand [S1]: K8 Bit position 15 12 11
DT10

A: Available N/A: Not Available

Multiplies the contents of data register DT10 and data register DT20 when trigger R0 turns on. The multiplied result is stored in data register DT30.
8 7

4 3

0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

Multiplier [S2]: K2 Bit position 15


DT20

12 11

8 7

4 3

0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

Result [D]: K16 Bit position 15


DT30

R0: on
12 11

8 7

4 3

0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

3 83
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Multiplies the 16-bit data or 16-bit equivalent constant specified by S1 and the 16-bit data or 16-bit equivalent constant specified by S2 when the trigger turns on. The multiplied result is stored in D (16-bit area). Multiplicand data S1 Multiplier data Trigger turns on Result D

S2

The multiplied result is stored in the 16-bit area.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The calculated result exceeds the 16-bit area specified by D. Turns on for an instant when the calculated result is recognized as 0.

Precautions during programming


Keep the calculated result D within the range K32768 to K32767.

3 84
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F35 (+1) P35 (P+1)


Outline

16-bit data increment [D + 1 D]

Adds 1 to 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P35 (P+1) is not available. Program example
Ladder Diagram Boolean Address 10 Instruction ST F 35 DT R 0 (+1) 0

Trigger 10 R0 F35 +1 , DT 0 D
D 16-bit area to be increased by 1

11

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Adds 1 to the contents of data register DT0 when trigger R0 turns on. Original data [D]: K9
Bit position 15 1211 8 7 4 3 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 +1

Result [D]: K10


Bit position 15 1211 8 7 4 3 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0

Description
Adds 1 to the 16-bit data specified by D. The result is stored in D. Original data (D) + 1 Result (D)

3 85
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If the operation result accidentally overflows, use of the F36 (D+1) instruction (32-bit data increment) is recommended. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows).

3 86
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F36 (D+1) P36 (PD+1)


Outline

32-bit data increment [(D + 1, D) + 1 (D + 1, D)]

Adds 1 to 32-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P36 (PD+1) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 36 DT R 0 (D+1) 0

Trigger 10 R0

F36 D+1 , DT 0 D

Lower 16-bit area of 32-bit data to be increased by 1

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Adds 1 to the content of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32bit data.

Contents of DT1

Contents of DT0 +1

Store to DT1

Store to DT0

3 87
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Adds 1 to the 32-bit data specified by D. The result is stored in D+1 and D. Original data (D+1, D) + 1 Result (D+1, D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows).

3 88
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F37 (1) P37 (P1)


Outline

16-bit data decrement [D 1 D]

Subtracts 1 from 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 37 DT R 0 (1 ) 0

Trigger 10 R0 F37 1 , DT 0 D
D 16-bit area to be decreased by 1

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Subtracts 1 from the contents of data register DT0 when trigger R0 turns on. Original data [D]: K10
Bit position 15 1211 8 7 4 3 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0

Result [D]: K9

Bit position 15 1211 8 7 4 3 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1

Description
Subtracts 1 from the 16-bit data specified by D. The result is stored in D. Original data (D) 1 Result (D)

3 89
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If the operation result accidentally underflows, use of the F38 (D1) instruction (32-bit data decrement) is recommended. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit data (underflows).

3 90
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F38 (D1) P38 (PD1)


Outline

32-bit data decrement [(D+1, D) 1 (D+1, D)]

Subtracts 1 from 32-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P38 (PD1) is not available.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 38 DT R 0 (D1) 0

Trigger 10 R0 F38 D1 , DT 0 D
D

Lower 16-bit area of 32-bit data to be decreased by 1

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Subtracts 1 from the content of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32bit data.

Contents of DT1

Contents of DT0 1

Store to DT1

Store to DT0

3 91
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Subtracts 1 from the 32-bit data specified by D. The result is stored in D+1 and D. Original data (D+1, D) 1 Result (D+1, D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 32-bit data (underflows).

3 92
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F39 (D*D) P39 (PD*D)


Outline

32-bit data multiplication (result in 32 bits)

Multiplies two 32-bit data items and stores the result in the specified 32-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P39 (PD*D) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F39 DT DT DT R 0 (D*D) 10 20 30

Trigger R0 10 F39 D*D, DT 10, DT 20, DT 30 S1


S1 S2 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplicand) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 32-bit data (for result)

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A N/A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

Explanation of example

A: Available N/A: Not Available

Multiplies the contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 when trigger R0 turns on. The multiplied result is stored in data registers DT31 and DT30. 16 bits DT11 16 bits DT21 16 bits DT10 16 bits DT20 R0: on 16 bits DT30 3 93
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

16 bits DT31

Highlevel Instructions

Description
Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2 when the trigger turns on. The multiplied result is stored in D+1 and D (32-bit area). Multiplicand data S1: lower 16-bit S1+1: higher 16-bit Multiplier data Trigger turns on Result (32-bit) D D+1

S2: lower 16-bit S2+1: higher 16-bit

The multiplied result is stored in the 32-bit area (2 words).

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The calculated result exceeds the 32-bit area specified by D. Turns on for an instant when the calculated result is recognized as 0.

Precautions during programming


Keep the calculated result D within the range K2147483648 to K2147483647.

3 94
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F40 (B+) P40 (PB+)


Outline

4-digit BCD data addition [D + S D]

Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P40 (PB+) is not available. Program example
Ladder Diagram Boolean Address 10 Instruction ST F 40 DT DT R 0 (B+ ) 1 10

Trigger 10 R0 F40 B+, DT 1 , DT 10 S


S D

11

4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for addend) 16-bit area for 4-digit BCD data (for augend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K K N/A H A N/A Index modifier A A A: Available N/A: Not Available K: K0 to K9

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 95
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data register DT10 and data register DT1 are added together when trigger R0 turns on. When H4 (BCD)is in DT1 and H8 (BCD) is in DT10, as shown below. Augend [D]: H8 (BCD)
Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 BCD H code 0 0 0 8

Addend [S]: H4 (BCD)

Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 DT1 BCD H code 0 0 0 4

(Addition)

Result [D]: H12 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 DT10 BCD H code 0 0 1 2

Description
The 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S and the 16-bit area for 4-digit BCD data specified by D are added together. Augend data
(D) +

Addend data
(S)

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If the calculated result accidentally overflows, use of the F41 (DB+) instruction (8-digit BCD data addition) is recommended. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (overflows).

3 96
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F41 (DB+) P41 (PDB+)


Outline

8-digit BCD data addition [(D+1, D) + (S+1, S) (D+1, D)]

Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P41 (PDB+) is not available.
Boolean Address 10 11 Instruction ST F 41 DT DT R 0 (DB+) 0 10

Program example
Ladder Diagram

Trigger 10 R0 F41 DB+ , DT 0 , DT 10 S


S D

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for addend) Lower 16-bit area for 8-digit BCD data (for augend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) N/A N/A Constant K K N/A H A N/A Index modifier A A A: Available N/A: Not Available K: K0 to K9

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 97
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data registers DT11 and DT10 and the contents of data registers DT1 and DT0 are added together when trigger R0 turns on.
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10 (Addition)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT1

Contents of DT0 (Result is stored.)

The lower 16 bits of added result is stored in DT10 and the higher 16 bits of the result is stored in DT11. Store to DT11 Store to DT10

Description
The 8-digit BCD equivalent constant or 8-digit BCD data specified by S and the 8-digit BCD data specified by D are added together. Augend data Addend data
+

Result

D: lower 4-digit D+1: higher 4-digit

S: lower 4-digit S+1: higher 4-digit

D: lower 4-digit D+1: higher 4-digit

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (overflows).

3 98
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F42 (B+) P42 (PB+)


Outline

4-digit BCD data addition [S1 + S2 D]

Adds two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes) and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P42 (PB+) is not available.
Boolean Address 10 11 Instruction ST F 42 DT DT DT R 0 (B+) 10 20 30

Program example
Ladder Diagram

Trigger 10 R0 F42 B+, DT10 , DT20 , DT30 S1


S1 S2 D

S2

4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for augend) 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for addend) 16-bit area for 4-digit BCD data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K K K N/A H A A N/A Index modifier A A A A: Available N/A: Not Available K: K0 to K9

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 99
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data register DT10 and data register DT20 are added to gether when trigger R0 turns on. The added result is stored in data register DT30. When H (BCD) 8 is in DT10 and H (BCD) 4 is in DT20, as shown below. Augend [S1]: H8 (BCD)
Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 BCD H code 0 0 0 8

Addend [S2]: H4 (BCD)

Bit position 15 1211 8 7 4 3 0 DT20 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 BCD H code 0 0 0 4

(Addition)

Result [D]: H12 (BCD)


Bit position 15 1211 8 7 4 3 0 DT30 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 BCD H code 0 0 1 2

Description
The 4-digit BCD equivalent constants or 16-bit areas for 4-digit BCD data specified by S1 and S2 are added together. The added result is stored in D. Augend data
(S1) +

Addend data
(S2)

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If the calculated result accidentally overflows, use of the F43 (DB+) instruction (8-digit BCD data addition) is recommended. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (overflows).

3 100
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F43 (DB+) P43 (PDB+)


Outline

8-digit BCD data addition [(S1+1, S1) + (S2+1, S2) (D+1, D)]

Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes) and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P43 (PDB+) is not available.
Boolean Address 10 11 Instruction ST F 43 DT DT DT R 0 (DB+) 10 20 30

Program example
Ladder Diagram

Trigger 10 R0 F43 DB+ , DT10 , DT20 , DT30 S1


S1 S2 D

S2

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for augend) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for addend) Lower 16-bit area for 8-digit BCD data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY N/A N/A N/A Constant K K K N/A H A A N/A Index modifier A A A A: Available N/A: Not Available K: K0 to K9

S1 S2 D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 101
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 are added together when trigger R0 turns on. The added result is stored in data registers DT31 and DT30.
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10 (Addition)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT21

Contents of DT20 (Result is stored.) The lower 16 bits of added result is stored in DT30 and the higher 16 bits of the result is stored in DT31. Store to DT30

Store to DT31

Description
The 8-digit BCD equivalent constants or 8-digit BCD data specified by S1 and S2 are added together. The added result is stored in D+1 and D.

S1: lower 4-digit S1+1: higher 4-digit

Augend data

S2: lower 4-digit S2+1: higher 4-digit

Addend data

Result D: lower 4-digit D+1: higher 4-digit

When processing 8-digit BCD data, the higher 16-bit areas for 8-digit BCD data (S+1, D+1) are automatically determined once the lower 16-bit areas (S, D) are specified.

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (overflows).

3 102
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F45 (B) P45 (PB)


Outline

4-digit BCD data subtraction [D S D]

Subtracts one BCD data item that expresses a 4-digit decimal number (4-digit BCD H codes) from another (minuend). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P45 (PB) is not available.
Boolean Address 10 11 Instruction ST F 45 DT DT R 0 (B) 10 20

Program example
Ladder Diagram

Trigger 10 R0

F45 B, DT10 , DT20 S D

S D

4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for subtrahend) 16-bit area for 4-digit BCD data (for minuend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K K N/A H A N/A Index modifier A A A: Available N/A: Not Available K: K0 to K9

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Subtracts the contents of data register DT10 from the contents of data register DT20 when trigger R0 turns on. When H (BCD) 16 is in DT20 and H (BCD) 4 is in DT10, as shown below. Minuend [D]: H16 (BCD)
Bit position 15 1211 8 7 4 3 0 DT20 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 BCD H code 0 0 1 6

Subtrahend [S]: H4 (BCD)

(Subtraction)

Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 BCD H code 0 0 0 4

Result [D]: H12 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 DT20 BCD H code 0 0 1 2

3 103
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S from the 16-bit area for 4-digit BCD data specified by D. Minuend data
(D)

Subtrahend data
(S)

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If the calculated result accidentally underflows, use of the F46 (DB) instruction (8digit BCD data subtraction) is recommended. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (underflow).

3 104
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F46 (DB) P46 (PDB)


Outline

8-digit BCD data subtraction [(D+1, D) (S+1, S) (D+1, D)]

Subtracts one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) from another (minuend). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P46 (PDB) is not available.
Boolean Address 10 11 Instruction ST F 46 DT DT R 0 (DB) 10 20

Program example
Ladder Diagram

Trigger 10 R0 F46 DB , DT10 , S


S D

DT20 D

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for subtrahend) Lower 16-bit area for 8-digit BCD data (for minuend and result)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K K N/A H A N/A Index modifier A A A: Available N/A: Not Available K: K0 to K9

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 105
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the contents of data registers DT11 and DT10 from the contents of data registers DT21 and DT20 when trigger R0 turns on.
Higher 16 bits Lower 16 bits

Contents of DT21

Contents of DT20 (Subtraction)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT11

Contents of DT10 (Result is stored.)

The lower 16 bits of subtracted result is stored in DT20 and the higher 16 bits of the result is stored in DT21. Store to DT21 Store to DT20

Description
Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by S from the 8-digit BCD data specified by D. Augend data Addend data Result

D: lower 4-digit D+1: higher 4-digit

S: lower 4-digit S+1: higher 4-digit

D: lower 4-digit D+1: higher 4-digit

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (underflows).

3 106
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F47 (B) P47 (PB)


Outline

4-digit BCD data subtraction [S1 S2 D]

Subtracts one BCD data item that expresses a 4-digit decimal number (4-digit BCD H code) from another (minuend) and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P47 (PB) is not available.
Boolean Address 10 11 Instruction ST F 47 DT DT DT R 0 (B) 10 20 30

Program example
Ladder Diagram

Trigger 10 R0 F47 B, DT10 , DT20 , DT30 S1


S1 S2 D

S2

4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for minuend) 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for subtrahend) 16-bit area for 4-digit BCD data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K K K N/A H A A N/A Index modifier A A A A: Available N/A: Not Available K: K0 to K9

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 107
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the contents of data register DT20 from the contents of data register DT10 when trigger R0 turns on. The subtracted result is stored in data register DT30. When H (BCD) 16 is in DT10 and H (BCD) 4 is in DT20, as shown below. Minuend [S1]: H16 (BCD)
Bit position 15 1211 8 7 4 3 0 DT10 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 BCD H code 0 0 1 6

Subtrahend [S2]: H4 (BCD)

(Subtraction)

Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 DT20 BCD H code 0 0 0 4

Result [D]: H12 (BCD)


Bit position 15 1211 8 7 4 3 0 DT30 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 BCD H code 0 0 1 2

Description
Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S2 from the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S1. The subtracted result is stored in D. Minuend data
(S1)

Subtrahend data
(S2)

Result
(D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If the calculated result accidentally underflows, use of the F48 (DB) instruction (8digit BCD data subtraction) is recommended. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (underflows).

3 108
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F48 (DB) P48 (PDB)


Outline

8-digit BCD data subtraction [(S1+1, S1) (S2+1, S2) (D+1, D)]

Subtracts one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) from another (minuend) and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P48 (PDB) is not available.
Boolean Address 10 11 Instruction ST F 48 DT DT DT R 0 (DB) 10 20 30

Program example
Ladder Diagram

Trigger 10 R0 F48 DB , DT10 , DT 20 , DT30 S1


S1 S2 D

S2

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for minuend) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for subtrahend) Lower 16-bit area for 8-digit BCD data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) N/A N/A N/A Constant K K K N/A H A A N/A Index modifier A A A A: Available N/A: Not Available K: K0 to K9

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 109
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the contents of data registers DT21 and DT20 from the contents of data registers DT11 and DT10 when trigger R0 turns on. The subtracted result is stored in data registers DT31 and DT30.
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10 (Subtraction)

The specified data area and the following data area are handled together as 32bit data.

Contents of DT21

Contents of DT20 (Result is stored.)

The lower 16 bits of subtracted result is stored in DT30 and the higher 16 Store to DT31 Store to DT30 bits of the result is stored in DT31.

Description
Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by S2 from the 8-digit BCD equivalent constant or the 8-digit BCD data specified by S1. The subtracted result is stored in D+1 and D.

S1: lower 4-digit S1+1: higher 4-digit

Minuend data

S2: lower 4-digit S2+1: higher 4-digit

Subtrahend data

D: lower 4-digit D+1: higher 4-digit

Result

When processing 8-digit BCD data, the higher 16-bit areas for 8-digit BCD data (S+1, D+1) are automatically determined once the lower 16-bit areas (S, D) are specified.

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (underflows).

3 110
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F50 (B*) P50 (PB*)


Outline

4-digit BCD data multiplication [S1 S2 (D+1, D)]

Multiplies two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P50 (PB*) is not available.
Boolean Address 10 11 Instruction ST F 50 DT DT DT R 0 (B*) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F50 B*, DT10 , DT20, DT 30 S1


S1 S2 D

S2

4-digit BCD equivalent constant or 16-bit area for BCD data (for multiplicand) 4-digit BCD equivalent constant or 16-bit area for BCD data (for multiplier) Lower 16-bit area for 8-digit BCD data (for result)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 111
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When H (BCD) 8 is in DT10 and H (BCD) 2 is in DT20, as shown below.

Multiplicand [S1]: H8 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT10 BCD H code 0 0 0 8

Multiplier [S2]: H2 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 DT20 0 0 0 2 BCD H code

Result [D+1, D]: H16 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DT31 BCD H code 0 0 0 0

R0: on Bit position 15 1211 8 7 4 3 0

DT30
BCD H code

0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 6

Higher 4-digit area

Lower 4-digit area

The lower 16 bits of the 32bit multiplication result are stored in the specified memory area (DT30), and the higher16 bits are stored in the area following the specified area (DT31).

Description
Multiplies the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S1 and S2. The multiplied result is stored in D+1 and D.
Multiplicand data (S1) Multiplier data (S2) Multiplied result (D+1, D)

The multiplied result is stored in the 8-digit area (32bit area). The higher 16-bit area (D+1) is automatically determined once the lower 16-bit area (D) is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

3 112
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F51 (DB*) P51 (PDB*)


Outline

8-digit BCD data multiplication [(S1+1, S1) (S2+1, S2) (D+3, D+2, D+1, D)]

Multiplies two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P51 (PDB*) is not available.
Boolean Address 10 11 Instruction ST F 51 DT DT DT R 0 (DB*) 10 20 30

Program example
Ladder Diagram

Trigger R0 F51 DB* , DT10 , DT20 , S1


S1 S2 D

10

DT30 D

S2

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for multiplicand) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for multiplier) Lowest 16-bit area for 16-digit BCD data (for result)

Operands
Relay Operand WL (* WX WY WR **** ) A A N/A A A A A A A A A A Timer/Counter Register LD (* FL DT **** (*2) ) A A A A A A A A A Index register IX (*3) A A N/A IY N/A N/A N/A Constant Index modifier

SV A A A

EV A A A

K A A N/A

H A A N/A

S1 S2 D

A A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 113
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
16 bits Contents of DT11 16 bits Contents of DT21 16 bits 16 bits 16 bits 16 bits Contents of DT10 16 bits Contents of DT20 16 bits The specified data area and the following data area are handled together as 32bit data.

Store to DT33 Store to DT32

The 64 bits of multiplication result are stored in order in DT30 to DT33 beginning from the lowest Store to DT31 Store to DT30 16 bits.

Description
Multiplies the 8-digit BCD equivalent constant or 8-digit BCD data specified by S1 and the one specified by S2. The multiplied result is stored in D+3, D+2, D+1, and D. Multiplicand data
(S1+1, S1)

Multiplier data
(S2+1, S2)

Result
(D+3, D+2, D+1, D)

The multiplied result is stored in the 64-bit area (16digit BCD). When processing 8-digit BCD data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified.The areas (D+3, D+2, D+1) other than the lowest 16-bit area (D) are automatically determined when the lowest 16-bit area is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

3 114
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F52 (B%) P52 (PB%)


Outline

4-digit BCD data division [S1/S2 D (DT9015) or (DT90015)]

Divides one BCD data item that expresses a 4-digit decimal number (4-digit BCD H code) by another (divisor). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P52 (PB%) is not available.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F 52 DT DT DT R 0 (B%) 10 20 30

Trigger R0 F52 B% , DT10 , DT20 , DT30 S1


S1 S2 D

10

S2

4-digit BCD equivalent constant or 16-bit area for BCD data (for dividend) 4-digit BCD equivalent constant or 16-bit area for BCD data (for divisor) 16-bit area for BCD data (for quotient) (Remainder is stored in special data register DT9015 or DT90015.)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K K K N/A H A A N/A Index modifier A A A A: Available N/A: Not Available K: K0 to K9

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 115
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Divides the contents of data register DT10 by the contents of data register DT20 when trigger R0 turns on. The quotient is stored in data register DT30 and the remainder is stored in special data register DT9015 (DT90015 for FP2/FP2SH/FP10SH). When H (BCD) 15 is in DT10 and H (BCD) 4 is in DT20, as shown below.

Dividiend [S1]: H15 (BCD)


Bit position 15 DT10 BCD H code 0 12 11 0 8 7 1 4 3 5 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1

Divisor [S2]: H4 (BCD)


Bit position 15 DT20 BCD H code 0 12 11 0 X0: on 8 7 0 0 4 3 3 0 8 7 0 4 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Quotient [D]: H3 (BCD)


Bit position 15 DT30 BCD H code 0 12 11

0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

Remainder: H3 (BCD)
Bit position 15 BCD H code 0 12 11 0 8 7 0 4 3 3 0
DT9015/DT90015 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

Description
The 4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S1 is divided by the 4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S2. The quotient is stored in the area specified by D and the remainder is stored in a special data register DT9015 (DT90015 for FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH). Dividend data Divisor Quotient .... Remainder
(DT9015/ DT90015)

(S1)

(S2)

(D)

With the FP0 T32,FP0R, FP, FPX, FP2, FP2SH, FP10SH and FP0 C10, C14, C16, C32/ FPe, the numbers of the special data registers are different. Type FP0 C10, C14, C16, C32/FPe FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH Special data register DT9015 DT90015

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. The 4-digit BCD equivalent constant or 4-digit BCD data for the divisor (specified by S2) is 0. Turns on for an instant when the calculated result (quotient) is recognized as 0.

3 116
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F53 (DB%) P53 (PDB%)


Outline

8-digit BCD data division [(S1+1, S1)/(S2+1, S2) (D+1, D) (DT9016, DT9015) or (DT90016, DT90015)]

Divides one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) by another (divisor). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P53 (PDB%) is not available.
Boolean Address 10 11 Instruction ST F 53 DT DT DT R 0 (DB%) 10 20 30

Program example
Ladder Diagram

Trigger R0

10

F53 DB% , DT10 , DT 20 , DT30 S1


S1 S2 D

S2

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for dividend) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for divisor) Lower 16-bit area for 8-digit BCD data (for quotient) (Remainder is stored in special data registers DT9016 and DT9015 or DT90016 and DT90015)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available K: K0 to K9

S1 S2 D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 117
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Higher 16 bits Lower 16 bits

Contents of DT11

Contents of DT10

(Division)

Contents of DT21

Contents of DT20 Quotient is stored in DT31 and DT30.

To DT31

To DT30 The lower 16 bits of the remainder is stored in DT9015/DT90015 and the higher 16 bits of the remainder is stored in DT9016/DT90016.

To DT9016/ DT90016

To DT9015/ DT90015

Description
The 8-digit BCD equivalent constant or the 8-digit BCD data specified by S1 is divided by the 8-digit BCD equivalent constant or the 8-digit BCD data specified by S2. The quotient is stored in the areas specified by D+1 and D, and the remainder is stored in special data registers DT9016 and DT9015 (DT90016 and DT90015 for FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH). Dividend data
S1: lower 4-digit S1+1: higher 4-digit

Divisor
S2: lower 4-digit S2+1: higher 4-digit

Quotient ....
D: lower 4-digit D+1: higher 4-digit

Remainder
DT9015/DT90015 DT9016/DT90016

When processing 8-digit BCD data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined once the lower 16-bit areas (S1, S2, D) are specified. With the FP0 T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FPe, the numbers of the special data registers are different.
Type FP0 C10, C14, C16, C32/FPe DT9015 FP0T32/FP0R/FP/FPX/FP2/FP2SH/FP10SH DT90015 Special data register

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. The 8-digit BCD equivalent constant or the 8-digit BCD data for the divisor (specified by S2) is 0. Turns on for an instant when the calculated result (quotient) is recognized as 0.

= flag (R900B):

3 118
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F55 (B+1) P55 (PB+1)


Outline

4-digit BCD data increment [D + 1 D]

Adds 1 to BCD data that expresses a 4-digit decimal number (4-digit BCD H code). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P55 (PB+1) is not available.
Boolean Address 10 11 Instruction ST F 55 DT R 0 (B+1) 0

Program example
Ladder Diagram

Trigger R0 10 F55 B+1 , DT 0 D


D

16-bit area for 4-digit BCD data to be increased by 1

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Adds 1 to the contents of data register DT0 when trigger R0 turns on.

Original data [D]: H9 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 DT0 BCD H code 0 0 0 9 +1

Result [D]: H10 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 DT0 BCD H code 0 0 1 0

3 119
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Adds 1 to the 4-digit BCD data specified by D. The result is stored in D. Original data (D) + 1 Result (D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If the calculated result accidentally overflows, use of the F56 (DB+1) instruction (8-digit BCD data increment) is recommended. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (overflows).

3 120
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F56 (DB+1) P56 (PDB+1)


Outline

8-digit BCD data increment [(D+1, D) + 1 (D+1, D)]

Adds 1 to BCD data that expresses an 8-digit decimal number (8-digit BCD H code). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P56 (PDB+1) is not available.
Boolean Address 10 11 Instruction ST F 56 DT R 0 (DB+1) 0

Program example
Ladder Diagram

Trigger R0 F56 DB+1 , DT 0 D


D

10

Lower 16-bit area for 8-digit BCD data to be increased by 1

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Adds 1 to the contents (8digit BCD data) of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32bit data.

Contents of DT1

Contents of DT0 +1

Store to DT1

Store to DT0

3 121
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Adds 1 to the 8-digit BCD data specified by D. The result is stored in D+1 and D. Original data (D+1, D) + 1 Result (D+1, D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (overflows).

3 122
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F57 (B1) P57 (PB1)


Outline

4-digit BCD data decrement [D 1 D]

Subtracts 1 from BCD data that expresses a 4-digit decimal number (4-digit BCD H code). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P57 (PB1) is not available.
Boolean Address 10 11 Instruction ST F 57 DT R 0 (B1) 0

Program example
Ladder Diagram

Trigger R0 F57 B1 , DT 0 D
D 16-bit area for BCD data to be decreased by 1

10

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Subtracts 1 from the contents of data register DT0 when trigger R0 turns on.

Original data [D]: H10 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 DT0 BCD H code 0 0 1 0 1

Result [D]: H9 (BCD)


Bit position 15 1211 8 7 4 3 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 BCD H code 0 0 0 9

3 123
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Subtracts 1 from the 4-digit BCD data specified by D. The result is stored in D. Original data (D) 1 Result (D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If the calculated result accidentally underflow, use of the F58 (DB1) instruction (8-digit BCD data decrement) is recommended. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (underflows).

3 124
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F58 (DB1) P58 (PDB1)


Outline

8-digit BCD data decrement [(D+1, D) 1 (D+1, D)]

Subtracts 1 from BCD data that expresses an 8-digit decimal number (8-digit BCD H code). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P58 (PDB1) is not available.
Boolean Address 10 11 Instruction ST F 58 DT R 0 (DB1) 0

Program example
Ladder Diagram

Trigger R0 F58 DB1 , DT 0 D


D

10

Lower 16-bit area for 8-digit BCD data to be decreased by 1

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Subtracts 1 from the contents (8digit BCD data) of data registers DT1 and DT0 when trigger R0 turns on.
Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32bit data.

Contents of DT1

Contents of DT0 1

Store to DT1

Store to DT0

3 125
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Subtracts 1 from the 8-digit BCD data specified by D. The result is stored in D+1 and D. Original data (D+1, D) 1 Result (D+1, D)

Precautions during programming


If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data is not BCD data. Turns on for an instant when the calculated result is recognized as 0.

= flag (R900B):

Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (underflows).

3 126
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F60 (CMP) P60 (PCMP)


Outline

16-bit data comparison

The two specified 16bit data are compared and the result is output to the special internal relay. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P60 (PCMP) is not available.
Boolean Address 40 41 Instruction ST F 60 DT K 46 ST AN OT ST AN OT ST AN OT R Y R Y R Y 47 48 49 50 51 52 53 54 S1 S2 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared R 0 (CMP) 0 100 0 10 0 11 0 12 R 900A

Program example
Ladder Diagram

Trigger 40 46 49 52 R0

S1

S2 Y10 Y11 Y12

F60 CMP , DT 0 , K 100 R0 R900A R0 R900B R0 R900C

R 900B

R 900C

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K A A H A A A: Index modifier A A Available

S1 S2 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 127
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Compares decimal constant K100 with the contents of data register DT0 when trigger R0 turns on. When DT0 > K100, R900A turns on and external output relay Y10 turns on. When DT0 = K100, R900B turns on and external output relay Y11 turns on. When DT0 < K100, R900C turns on and external output relay Y12 turns on.

Description
Compares the 16-bit data specified by S1 with that specified by S2. The comparison result is output to the special internal relays R9009, R900A, R900B and R900C. The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag (R900C), depending on the relative sizes of S1 and S2.
Comparison between S1 and S2 S1 < S2 S1 = S2 S1 > S2 Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off on off on off on off off off

: turns on or off according to the conditions

Execution condition (Trigger)


In this program example, the comparison will be performed only when R0 turns on. If ongoing comparison is necessary, relay R9010, which is always on, should be used in the execution conditions (trigger).
Always on relay. R9010 R9010 R9010 F60 CMP, DT 0, K 100 R900A Y10 R900B Y11 Y12

R9010 R900C

R9010 can be eliminated in this case.

You can also program the above using the PSHS, RDS, and POPS instructions.
X0 PSHS F60 CMP, DT 0, K 100 R900A Y10 RDS POPS R900B R900C Y11 Y12

This is a program in which operation is the same as the above program example.

3 128
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when using two or more comparison instructions


The comparison instruction flags R900A to R900C are updated with each execution of the comparison instruction. If you use two or more comparison instructions in your program, be sure to use the flags immediately after each comparison instruction, by employing output relays or internal relays.

Example:

Compares DT0 with K100, and DT1 with K200.


R0

a)

R0 R0

F60 CMP, DT 0, K 100 R900A Y10 R900B R900C Y11 Y12

b)
R0

R1

c)
R1 R1

F60 CMP, DT 1, K 200 R900A Y13 R900B R900C Y14 Y15

d)
R1

The comparison result for a) is output to the output relays (Y10, Y11, and Y12) of program b). The comparison result for c) is output to the output relays (Y13, Y14, and Y15) of program d).

3 129
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when comparing BCD or external data


When comparing special data, such as BCD or unsigned binary (0 to FFFF), construct your program as shown in the program example below, using special internal relays R900B and R9009.

Example:

Compares BCD data in DT0 and DT1.


R0 R0 R0 R0 F60 CMP, DT 0, DT 1 R9009 R900B R900B R9009 R1 R2 R3

DT0 < DT1, internal relay R1 turns on 2 ....When DT0 = DT1, internal relay R2 turns on 3 ....When DT0 > DT1, internal relay R3 turns on

1 ....When

Flag operation when comparing BCD data or unsigned 16bit data (0 to FFFF)
Comparison between S1 and S2 S1 < S2 S1 = S2 S1 > S2 off Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off on off off on off off

: turns on or off according to the conditions

For example, when S1 = H8000 and S2 = H1000, R900A will turn off and R900C will turn on. For this reason, the correct comparison result will not be obtained in a program which uses R900A and R900C.
S1 BCD 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0

S2 BCD

0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 130
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F61 (DCMP) P61 (PDCMP)


Outline

32-bit data comparison

The two specified 32bit data are compared and the result is output to the special internal relay. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P61 (PDCMP) is not available.
Boolean Address 50 51 Instruction ST F 61 DT DT 60 ST AN OT ST AN OT ST AN OT R Y R Y R Y 61 62 63 64 65 66 67 68 S1 S2 R 0 0 10 0 10 0 11 0 12 R 900A

Program example
Ladder Diagram

(DCMP)

Trigger 50 60 63 66 R0 S1 S2 Y10 Y11 Y12 F61 DCMP , DT 0 , DT 10 R0 R900A R0 R900B R0 R900C

R 900B

R 900C

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K A A H A A Index modifier A A A: Available N/A: Not Available

S1 S2

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 131
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Compares the content (32bit data) of data registers DT11 and DT10 with the content (32bit data) of data registers DT1 and DT0 when trigger R0 turns on. When (DT1 and DT0) > (DT11 and DT10), R900A turns on and external output relay Y10 turns on. When (DT1 and DT0) = (DT11 and DT10), R900B turns on and external output relay Y11 turns on. When (DT1 and DT0) < (DT11 and DT10), R900C turns on and external output relay Y12 turns on.

Description
Compares the 32-bit data or 32-bit equivalent constant specified by S1 with that specified by S2. The comparison result is output to special internal relays R9009, R900A, 900B, and R900C. The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag (R900C), depending on the relative sizes of (S1+1, S1) and (S2+1, S2).
Comparison between (S1+1, S1) and (S2+1, S2) (S1+1, S1) < (S2+1, S2) (S1+1, S1) = (S2+1, S2) (S1+1, S1) > (S2+1, S2) Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off on off on off on off off off

: turns on or off according to the conditions

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified.

Execution condition (Trigger)


In this program example, the comparison will be performed only when R0 turns on. If ongoing comparison is necessary, relay R9010, which is always on, should be used in the execution conditions.
Always on relay. R9010 R9010 R9010 R9010 F61 CMP, DT 0, DT10 R900A Y10 R900B R900C Y11 Y12

R9010 can be eliminated in this case.

You can also program the above using the PSHS, RDS, and POPS instructions.
X0 PSHS F61 DCMP, DT 0, DT10 R900A Y10 RDS POPS R900B R900C Y11 Y12

This is a program in which operation is the same as the above program.

3 132
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when using two or more comparison instructions


The comparison instruction flags R900A to R900C are updated with each execution of the comparison instruction. If you use two or more comparison instructions in your program, be sure to use the flags immediately after each comparison instruction, by employing output relays or internal relays.

Example:

Compares DT1 and DT0 with DT11 and DT10, and DT3 and DT2 with DT21 and DT20.
X0

a)
X0 X0

F61 DCMP, DT 0, DT 10 R900A Y10 R900B R900C Y11 Y12

b)

X0

X1

c)
X1 X1

F61 DCMP, DT 2, DT 20 R900A Y13 R900B R900C Y14 Y15

d)
X1

The comparison result for a) is output to the output relays (Y10, Y11, and Y12) of program b). The comparison result for c) is output to the output relays (Y13, Y14, and Y15) of program d).

3 133
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when comparing BCD or external data


When comparing special data, such as BCD or unsigned binary (0 to FFFFFFFF), flags R9009, R900A, R900B, and R900C work as shown in the table below. In this case, construct your program as shown in the program example below, using special internal relays R900B and R9009.

Example:
R0 R0 e) R0 f) R0 g)

Compares BCD data in (DT1, DT0) and (DT11, DT10).


F61 DCMP, DT 0, DT 10 R9009 R1 R900B R900B R9009 R2 R3

e)....When (DT1, DT0) < (DT11, DT10), internal relay R1 turns on f)....When (DT1, DT0) = (DT11, DT10), internal relay R2 turns on g)....When (DT1, DT0) > (DT11, DT10), internal relay R3 turns on

Flag operation when comparing BCD data or unsigned 32bit data (0 to FFFFFFFF)
Comparison between (S1+1, S1) and (S2+1, S2) (S1+1, S1) < (S2+1, S2) (S1+1, S1) = (S2+1, S2) (S1+1, S1) > (S2+1, S2) off Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off on off off on off off

: turns on or off according to the conditions

For example, if an F61 (DCMP) instruction is executed when S1 = H80000000 (K2147483648) and S2 = H10000001 (K+268435457), the result will be S1<S2. Thus R900A will turn off and R900C will turn on. In a program which uses R900A and R900C, the correct comparison result will not be obtained.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 134
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F62 (WIN) P62 (PWIN)


Outline

16-bit data band comparison

Compares one 16-bit data item with the data band specified by two other 16-bit data items and the comparison result is output to the special internal relay. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P62 (PWIN) is not available.
Boolean Address 50 Lower limit value 51 Instruction ST F 62 DT DT DT 58 ST AN OT ST AN OT ST AN OT R Y R Y R Y 59 60 61 62 63 64 65 66 S1 S2 S3 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area for lower limit 16-bit equivalent constant or 16-bit area for upper limit R 0 (WIN) 10 20 30 0 10 0 11 0 12 R 900A

Program example
Ladder Diagram

Trigger R0 R0 R0 R0 R900A R900B R900C S1 S2 S3

Upper limit value

50 58 61 64

F62 WIN , DT10 , DT20 , DT 30 Y10 Y11 Y12

R 900B

R 900C

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A A H A A A A: Index modifier A A A Available

S1 S2 S3 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 135
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Compares the contents of data register DT10 with the contents of data register DT20 (lower limit of the data band) and data register DT30 (upper limit of the data band) when trigger R0 turns on.

Example:

When K500 is in DT20 and K500 is in DT30, as shown below.


R900A : on R900B : on R900C : on 500 +500

When DT10 is K680, R900C turns on and external output relay Y12 goes on. When DT10 is K500, R900B turns on and external output relay Y11 goes on. When DT10 is K256, R900B turns on and external output relay Y11 goes on. When DT10 is K680, R900A turns on and external output relay Y10 goes on. Description
Compares the 16-bit equivalent constant or 16-bit data specified by S1 with the data band specified by S2 and S3. This instruction checks whether S1 is in the data band between S2 (lower limit) and S3 (upper limit), larger than S3, or smaller than S2. The comparison result is output to special internal relays R9009, R900A, R900B, and R900C. The following table lists the states of the R9009, R900A, R900B and R900C.
Comparison between S1, S2 and S3 S1 < S2 S2 S1 S3 S3 < S1 Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off on off on off on off off

Precaution during programming


Set it so that the value of the lower limit is less than the value of the upper limit (S2 S3).

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S2 > S3.

3 136
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F63 (DWIN) P63 (PDWIN)


Outline

32-bit data band comparison

Compares one 32-bit data item with the data band specified by two other 32-bit data items and the comparison result is output to the special internal relay. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P63 (PDWIN) is not available.
Boolean Address 50 Instruction ST F 63 DT DT DT 64 ST AN OT ST AN OT ST AN OT R Y R Y R Y R 0 (DWIN) 10 20 30 0 10 0 11 0 12 R 900A

Program example
Ladder Diagram

Trigger R0 R0 R0 R0 R900A R900B R900C S1 S2

Lower limit value Upper limit value

51

S3

50 64 67 70

F63 DWIN , DT 10 , DT20 , DT30 Y10 Y11 Y12

65 66 67 68 69 70 71 72

R 900B

R 900C

S1 S2 S3

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data for lower limit 32-bit equivalent constant or lower 16-bit area of 32-bit data for upper limit

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) N/A N/A N/A Constant K A A A H A A A Index modifier A A A A: Available N/A: Not Available

S1 S2 S3 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 137
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Compares the contents of data registers DT11 and DT10 with the contents of data registers DT21 and DT20 (lower limit of the data band) and data registers DT31 and DT30 (upper limit of the data band), when trigger R0 turns on.

Example:

When K50000 is in DT21 and DT20 and K50000 is in DT31 and DT30, as shown below.
R900A : on R900B : on R900C : on 50000 +50000

When (DT11, DT10) is K68000, R900C turns on and external output relay Y12 goes on. When (DT11, DT10) is K50000, R900B turns on and external output relay Y11 goes on. When (DT11, DT10) is K25600, R900B turns on and external output relay Y11 goes on. When (DT11, DT10) is K68000, R900A turns on and external output relay Y10 goes on. Description
Compares the 32-bit equivalent constant or 32-bit data specified by S1 with the data band specified by S2 and S3. This instruction checks whether S1 is in the data band between S2 (lower limit) and S3 (upper limit), larger than S3, or smaller than S2. The comparison result is output to the special internal relays R9009, R900A, R900B, and R900C. The following table lists the states of the R9009, R900A, R900B and R900C.
Comparison between (S1+1, S1), (S2+1, S2) and (S3+1, S3) (S1+1, S1) < (S2+1, S2) (S2+1, S2) (S1+1, S1) (S3+1, S3) (S3+1, S3) < (S1+1, S1) Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off on off on off on off off

Precaution during programming


Set it so that the value of the lower limit (S2 + 1, S2) is less than the value of the upper limit (S3 + 1, S3) (S3+1, S3)]. [(S2+1, S2)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. (S2+1, S2) > (S3+1, S3).

3 138
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F64 (BCMP) P64 (PBCMP)


Outline

Block data comparison

Compares one specified data block with another in byte units. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P64 (PBCMP) is not available.
Boolean Address 10 Instruction ST F 64 DT DT DT 18 ST AN OT R R R 0 0 10 20 0 1 R 900B

Program example
Ladder Diagram

Trigger S1 10 R0 F64 BCMP , DT 0 , DT 10 , DT 20 S2 S3

11

(BCMP)

18

R0

R900B

R1

19 20

S1 S2 S3

16-bit equivalent constant or 16-bit area (specifies starting byte positions and number of bytes to be compared) Starting 16-bit area to be compared Starting 16-bit area to be compared

Operands
Relay Operand WL WX WY WR (*1) A A A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A N/A N/A IY (*4) A N/A N/A Constant K A N/A N/A H A N/A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 S3 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 139
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Compares the data block of data register DT10 (4 bytes from DT10 lower order byte) with data register DT20 (4 bytes from DT20 higher order byte) according to the comparison condition in data register DT0 when trigger R0 turns on. When the contents of the two data blocks are the same, internal relay R1 turns on. If H1004 is entered in DT0, the two blocks are as follows.
Higher byte Data block specified by S2 DT10 DT11 2 4 Lower byte 1 3 Compares 4 bytes (32 bits) Data block specified by S2: Starting from lower byte DT20 DT21 DT22 1 3 2 4 Area compared Comparison Data block specified by S3: Starting from higher byte

DT0 = H 1 0 0 4

Data block specified by S3

Description
Compares the contents of the data block specified by S2 with the contents of the data block specified by S3 according to content specified by S1. When the comparison result is S2 = S3, special internal relay R900B (=flag) turns on. S1 is the control data that determines factors such as the size of the comparison.

How to specify control data S1


S1 specifies the starting byte position and the number of bytes to be compared using 4-digit BCD data as follows:

S1 = H

Number of bytes to be compared range: H01 to H99 (BCD) Starting byte position for data block specified by S2 1: Starting from higher order byte 0: Starting from lower order byte Starting byte position for data block specified by S3 1: Starting from higher order byte 0: Starting from lower order byte

Setting example:
To specify the 4 bytes beginning with the lower byte of the data block specified by S2 and the 4 bytes beginning with the upper byte of the data block specified by S3, set S1 to H1004.

3 140
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S1 is not BCD data. The specified data block area exceeds the limit. * For FP2SH and EP10SH, the error flag (R9007) turns on only when these operation errors occurs.

Precautions during programming


The flag R900B used for the compare instruction is renewed each time a compare instruction is executed. Accordingly: The program that uses R900B should be just after the F64 (BCMP) instruction. Output to an output relay or internal relay and save the result.
R0 R0 F64 BCMP, R900B DT 0, DT 1, WR 5 Y30

Result of F64 R1 R1

F60 CMP, R900B

DT 2,

K 100 R2

Result of F60

Note
As shown in the above program, be sure to have the comparison internal relay before flag R900B. However, if you are using R9010 (on all the time), then it is unnecessary to have the comparison internal relay before R900B.

3 141
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 142
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F65 (WAN) P65 (PWAN)


Outline

16-bit data AND

Performs bit-wise AND operation on two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel ainstruction P65 (PWAN) is not available.
Boolean Address 10 11 Instruction ST F 65 DT DT DT R 0 (WAN) 10 20 30

Program example
Ladder Diagram

Trigger R0 F65 WAN , DT10 , DT 20, DT30 S1


S1 S2 D

10

S2

16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing AND operation result

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Performs AND operation on each bit in data registers DT10 and DT20 when trigger R0 turns on. The AND operation result is stored in data register DT30.
Bit position 15 12 11 8 7 4 3 0

[S1] [S2]

DT10

0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 12 11 8 7 4 3 0

Bit position 15 DT20

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on

Bit position 15

12 11

8 7

4 3

[D]

DT30

0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1

3 143
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs AND operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The AND operation result is stored in the 16-bit area specified by D. (S1) (S2) (D) You can use this instruction to turn off certain bits of the 16-bit data.

AND operation
The AND operation is shown below.
S1 0 0 1 1 S2 0 1 0 1 D 0 0 0 1

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 144
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F66 (WOR) P66 (PWOR)


Outline

16-bit data OR

Performs bit-wise OR operation on two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P66 (PWOR) is not available.
Boolean Address 10 11 Instruction ST F 66 DT DT DT R 0 (WOR) 10 20 30

Program example
Ladder Diagram

Trigger R0 F66 WOR , DT10 , DT20 , DT30 S1


S1 S2 D

10

S2

16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing OR operation result

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Performs OR operation on each bit in data registers DT10 and DT20 when trigger R0 turns on. The OR operation result is stored in data register DT30.
Bit position 15 12 11 8 7 4 3 0

[S1] [S2]

DT10

0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 12 11 8 7 4 3 0

Bit position 15 DT20

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on

Bit position 15

12 11

8 7

4 3

[D]

DT30

0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1

3 145
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The OR operation result is stored in the 16-bit area specified by D. (S1) (S2) (D) You can use this instruction to turn on certain bits of the 16-bit data.

OR operation
The OR operation is shown below.
S1 0 0 1 1 S2 0 1 0 1 D 0 1 1 1

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 146
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F67 (XOR) P67 (PXOR)


Outline

16-bit data exclusive OR

Performs bit-wise exclusive OR operation on two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P67 (PXOR) is not available.
Boolean Address 10 11 Instruction ST F 67 DT DT DT R 0 (XOR) 10 20 30

Program example
Ladder Diagram

Trigger R0 F67 XOR , DT10 , DT20, DT30 S1


S1 S2 D

10

S2

16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing exclusive OR operation result

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Performs exclusive OR operation on each bit in data registers DT10 and DT20 when trigger R0 turns on. The exclusive OR operation result is stored in data register DT30.
Bit position 15 12 11 8 7 4 3 0

[S1] [S2]

DT10

0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 12 11 8 7 4 3 0

Bit position 15 DT20

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on

Bit position 15

12 11

8 7

4 3

[D]

DT30

0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0

3 147
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs exclusive OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The exclusive OR operation result is stored in the 16-bit area specified by D. {(S1) (S2)} {(S1) (S2)} (D) Detects the bits whose on and off states do not match. If the values of S1 and S2 are equal, all the bits of the data specified by D become 0.

Exclusive OR operation
The exclusive OR operation is shown below.
S1 0 0 1 1 S2 0 1 0 1 D 0 1 1 0

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 148
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F68 (XNR) P68 (PXNR)


Outline

16-bit data exclusive NOR

Performs bit-wise exclusive NOR operation on two 16-bit data items. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P68 (PXNR) is not available.
Boolean Address 10 11 Instruction ST F 68 DT DT DT R 0 (XNR) 10 20 30

Program example
Ladder Diagram

Trigger R0 F68 XNR , DT10 , DT 20, DT30 S1


S1 S2 D

10

S2

16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing exclusive NOR operation result

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
When the trigger R0 is on, if the values of the bits for the same positions with regard to the contents of data registers DT10 and DT20 are equal, the bit for that position is turned on (1) for data register DT30. If the values are not equal, the bit is turned off (0).
Bit position 15 12 11 8 7 4 3 0

[S1] [S2]

DT10

0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 12 11 8 7 4 3 0

Bit position 15 DT20

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on

Bit position 15

12 11

8 7

4 3

[D]

DT30

1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1

3 149
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs exclusive NOR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The exclusive NOR operation result is stored in the 16-bit area specified by D. {(S1) (S2)} {(S1) (S2)} (D) Detects the bits whose on and off states match. If the values of S1 and S2 are equal, all the bits of the data specified by D become 1.

Exclusive NOR operation


The exclusive NOR operation is shown below.
S1 0 0 1 1 S2 0 1 0 1 D 1 0 0 1

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 150
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F69 (WUNI) P69 (PWUNI)


Outline

16-bit data unite

Unites two 16-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P69 (PWUNI) is not available.
Boolean Address 10 11 Instruction ST F69 DT DT DT DT R 10 (WUNI) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F69 WUNI, DT 10, D 20, DT 30, DT 40 S1


S1 S2 S3 D

S2

S3

16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area which stores mask data for combination or 16-bit equivalent constant data. 16-bit area for storing calculated result

Operands
Relay Operand WX WY WR WL S1 S2 S3 D A A A N/A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A Timer/Counter Register FL LD (*1) A A A A A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

Explanation of example
[S1:]
DT10

1010 1010 1010 1010


AND DT30

[S2:]

DT20

0101 0101 0101 0101


AND Bit inverted of DT30

[S3:]

1111 0000 0000 1111


DT10 AND DT30

[Inverted S3]

0000 1111 1111 0000


DT20 AND NOT (DT30)

1010 0000 0000 1010 OR [D:]


DT40

0000 0101 0101 0000

1010 0101 0101 1010 3 151

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The two groups of word data specified by S1 and S2 are combined by bit unit processing using the mask data specified by S3 and stored in the area specified by D.

(S1

S3)

(S2

S3) (D)

When S3 is H0, the contents of S2 stored in the D. When S3 is HFFFF, the contents of S1 stored in the D.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 152
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F70 (BCC) P70 (PBCC)


Outline

Block check code calculation

Calculates Block Check Code (BCC). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P70 (PBCC) is not available.
Boolean Address 10 11 Instruction ST F 70 K DT K DT R 0 (BCC) 2 0 12 6

Program example
Ladder Diagram

Trigger 10 R0 F70 BCC , K 2 , DT 0 , K 12 , DT 6 S1


S1 S2 S3 D

S2

S3

16-bit equivalent constant or 16-bit area (specifies BCC calculation method) Starting 16-bit area to calculate BCC 16-bit equivalent constant or 16-bit area (specifies number of bytes for BCC calculation) 16-bit area for storing BCC

Operands
Relay Operand WL WX WY WR (*1) A A A N/A A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register LD FL DT (*1) (*2) A A A A A A A A A A A A Index register IX (*3) A N/A A N/A IY (*4) A N/A A N/A Constant K A N/A A N/A H A N/A A N/A Index modifier A A A A A: Available N/A: Not Available

S1 S2 S3 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Calculates the Block Check Code (BCC) of 12 bytes of ASCII data starting from data register DT0, via an exclusive OR operation, when trigger R0 turns on. The Block Check Code (BCC) is stored in the lower byte of data register DT6.

3 153
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Creates Block Check Code (BCC) from the starting position for the calculation specified by S1 and S2 using the calculation method specified by S1, and stores the result at the position specified by D and S1 according to the conversion method specified by S1.
H BCC calculation method 0: Addition 1: Subtraction 2: Exclusive OR operation A: CRC16 Note 2) Starting byte position for calculation (No. of bytes from S2) 0 to F Note 2) Starting byte position for storing results (No. of bytes from D) 0 to F Note 2) Conversion data 0: Binary data (CRC : 2 bytes / Not CRC : 1 bytes) 1: ASCII code (2 bytes)

Note 1) If CRC16 is specified as the calculation method, ASCII code cannot be specified for the conversion data. How to specify control data S1 Note 2) This can be used with the FP0R, FPX (V2.00 or more) and FP (V3.10 or more).

How to calculate the Block Check Code (BCC)


If BCC calculation method specified by S1 is CRC, The following generation polynomial is used and calculated (The same as MODBUSRTU). The generation polynomial : X^15+X^13+1 (H A001)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: BCC calculation method specified by S1 is outside the specification range Conversion data specified by S1 is outside the specification range

3 154
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Application example 1
In this example, the block check code of the message being sent, %01#RCSX0000, is calculated and is added after the message. Transmission is done using ASCII codes. BCC is calculated as an exclusive logical OR. The message should be stored in the memory area as shown below.
Data register
ASCII HEX code ASCII character

DT6

DT5 0 0

DT4 0 0

DT3 X S

DT2 C R

DT1 # 1

DT0 0 %

3 0 3 0 3 0 3 0 5 8 5 3 4 3 5 2 2 3 3 1 3 0 2 5

Block Check Code (BCC) The F70 (BCC) instruction is as shown below.

12 bytes

F70 BCC, K 2 , DT 0 , K 12 , DT 6
S1: Exclusive logical OR S2: Start of target data S3: Length of target data D: Calculation results When this is executed, BCC (H 1D) is stored in the last byte of DT6 of D.

3 155
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

How to calculate the Block Check Code (BCC)


Exclusive ORing calculates the Block Check Code (BCC) with each ASCII character.

% 0 1 # R C S X 0 0 0 0

ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code

0 0 1 0 0 1 0 1 3 0

Exclusive ORing Exclusive ORing Exclusive ORing Exclusive ORing Exclusive ORing

Exclusive OR operation
S1 0 0 1 1 S2 0 1 0 1 D 0 1 1 0

0 0 1 1 0 0 0 0 3 1

0 0 1 1 0 0 0 1 2 3

0 0 1 0 0 0 1 1 5 2

0 1 0 1 0 0 1 0 4 3

0 1 0 0 0 0 1 1 5 3

Exclusive ORing Exclusive ORing Exclusive ORing Exclusive ORing Exclusive ORing

0 1 0 1 0 0 1 1 5 8

0 1 0 1 1 0 0 0 3 0

0 0 1 1 0 0 0 0 3 0

0 0 1 1 0 0 0 0 3 0

0 0 1 1 0 0 0 0 3 calculation 0

Exclusive ORing

0 0 1 1 0 0 0 0

Block Check Code (BCC)


ASCII HEX code

This calculation result (H1D) is stored in the lower byte of DT6.

ASCII BIN code 0 0 0 1 1 1 0 1

3 156
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Application example 2
In this example, the block check code of the message being sent, %01#RCSX0000, is calculated and is added at the end of the message.
Calculation method: Addition, conversion data: Binary data

Calculation method: Addition, conversion data: ASCII codes

Calculation method: Addition, conversion data: ASCII codes

Calculation method: CRC, conversion data: Binary data

3 157
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F71 (HEXA) P71 (PHEXA)


Outline

Hexadecimal data ASCII code

Converts 16-bit data to ASCII code that expresses the equivalent hexadecimals. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P71 (PHEXA) is not available.
Boolean Address 10 11 Instruction ST F 71 DT K DT R 0 0 2 10

Program example
Ladder Diagram

Trigger 10 R0 F71 HEXA , DT 0 , K 2 , DT 10 S1


S1 S2 D

(HEXA)

S2

Starting 16-bit area for hexadecimal number (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted Starting 16-bit area for storing ASCII code (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A N/A IY (*4) N/A A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 158
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts 2 bytes of data stored in data register DT0 to ASCII codes that express the equivalent hexadecimals when trigger R0 turns on. The converted data is stored in data registers DT11 and DT10.
DT0 Bit position 15 1211 8 7 4 3 0 Binary data 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1
Hexadecimal

DT11
ASCII HEX code ASCII character

DT10 4 A 1 4 D 4 4 C 3

4 B

Description
Converts the data starting from the 16-bit area specified by S1 to ASCII codes that express the equivalent hexadecimals. The converted result is stored in the area starting from the 16-bit area specified by D. S2 specifies the number of source data bytes to be converted. Since ASCII code requires eight bits (one byte) to express one hexadecimal character, the data length when converted to ASCII code becomes double the source data.

Precautions during programming


The two characters that make up one byte are interchanged when stored. Two bytes are converted as one segment of data.
Hexadecimal data A B C D

Converted result

4 B

4 A

4 D

4 C D

D+1 S1 S1+1
1 2 5 6 3 4 7 8 6 2 1 4

D+3
5 8

D+2
7

Hexadecimal data

Converted result

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by S2 exceeds the area specified by S1. The converted result exceeds the area specified by D. The data specified by S2 is recognized as 0.

3 159
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Conversion example
The following shows conversion of hexadecimal data to ASCII codes. Conversion of four bytes of data (S2 = K4)
Hexadecimal data S1+1 EF 12 S1 AB CD

4 bytes F71 (HEXA) instruction execution Converted result F D+3 46 45 E 2 D+2 32 31 1 D+1 42 B 41 A 44 D D 43 C

Result of S1 + 1 conversion

Result of S1 conversion

Conversion of three bytes of data (S2 = K3) Since byte is specified as the unit, it is possible to convert only the last byte of the data for one word if desired.
Hexadecimal data S1+1 12 S1 AB 3 bytes F71 (HEXA) instruction execution Converted result D+2 32 2 31 1 B D+1 42 41 A 44 D D 43 C CD

ASCII HEX codes to express hexadecimal characters


Hexadecimal number 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII HEX code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 H41 H42 H43 H44 H45 H46

3 160
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F72 (AHEX) P72 (PAHEX)


Outline

ASCII code Hexadecimal data

Converts ASCII code that expresses hexadecimal characters to hexadecimal data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P72 (PAHEX) is not available.
Boolean Address 10 11 Instruction ST F 72 DT K DT R 0 0 4 40

Program example
Ladder Diagram

Trigger 10 R0 F72 AHEX , DT 0 , K 4 , DT 40 S1


S1 S2 D

(AHEX)

S2

Starting 16-bit area for ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted Starting 16-bit area for storing converted data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A N/A IY (*4) N/A A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 161
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts 4 ASCII codes stored in data registers DT0 and DT1 to hexadecimal numbers when trigger R0 turns on. The converted data is stored in data register DT40.
DT1
ASCII HEX code ASCII character

DT0 4 C 3 4 B 2 4 A 1

4 D

DT40 Bit position 15 1211 8 7 4 3 0 Binary data 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1


Hexadecimal

Description
Converts ASCII code that expresses hexadecimal characters, starting from the 16-bit area specified by S1, to hexadecimal numbers as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D. The volume of the results (hexadecimal numeric data) is half that of the converted ASCII code.

Precautions during programming


The data for two ASCII code characters is converted to two numeric digits for one word. When this takes place, the characters of the upper and lower bytes are interchanged. Four characters are converted as one segment of data.
ASCII code character 4 4 4 3 4 2 4 1

Converted result

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by S2 exceeds the area specified by S1. The converted result exceeds the area specified by D. The data specified by S2 is recognized as 0. ASCII code, not a hexadecimal number (0 to F), is specified.

3 162
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Conversion Example
The following shows conversion of ASCII codes to hexadecimal data. Conversion of eight characters (S2 = K8)
ASCII code S1+3 32 2 31 1 S1+2 46 F 45 E S1+1 44 D 43 C 42 B S1 41 A

8 characters (8 bytes) F72 (AHEX) instruction execution Converted result 12 D+1 EF CD D AB

Result of S1 + 3, S1 + 2 conversion

Result of S1 + 1, S1 conversion

Conversion of 7 characters (S2 = K7)


ASCII code S1+3 31 1 S1+2 46 F 45 E S1+1 44 D 43 C 42 B S1 41 A

7 characters (7 bytes) This position is filled with 0. Converted result D+1 10 EF CD F72 (AHEX) instruction execution D AB

Conversion of 6 characters (S2 = K6)


ASCII code S1+2 46 F 45 E S1+1 44 D 43 C 42 B S1 41 A

6 characters (6 bytes) F72 (AHEX) instruction execution Converted result D+1 EF D CD AB

Result of S1+2 Result of S1+1, conversion S1 conversion

Note
In the conversion results, only the data for the lower byte is stored in D + 1 word. The data for the higher byte is left as it is, and does not change.
3 163
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

The converted results are stored in byte units. If an odd number of characters is being converted, 0 will be entered for bit position 0 to 3 of the final data (byte) of the converted results.
ASCII code 44 n n1 Converted result n2

Converted result

n1 n2

This position is filled with 0.

n = S2, (odd number)

ASCII HEX code/Hexadecimal characters


ASCII HEX code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 H41 H42 H43 H44 H45 H46 Hexadecimal characters 0 1 2 3 4 5 6 7 8 9 A B C D E F

3 164
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F73 (BCDA) P73 (PBCDA)


Outline

BCD data ASCII code

Converts BCD code to ASCII code that expresses the equivalent decimals. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P73 (PBCDA) is not available.
Boolean Address 10 11 Instruction ST F 73 DT H DT R 0 0 4 10

Program example
Ladder Diagram

Trigger 10 R0 F73 BCDA , DT 0 , S1


S1 S2 D

(BCDA)

H4 , S2

DT 10 D

Starting 16-bit area for BCD data (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted and to arrange the converted data Starting 16-bit area for storing conversion result (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A N/A IY (*4) N/A A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 165
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts BCD code that express a 4-digit decimal number (4-digit BCD H code) stored in data register DT0 to ASCII code when trigger R0 turns on. The converted data is stored in data registers DT10 and DT11. When S2 = H2 (normal direction, 2 bytes convertion)
DT0 BCD H code 1 2 3 4

DT11
ASCII HEX code ASCII character

DT10 1 1 3 4 4 3 3 3

3 2

When S2 = H1002 (reverse direction, 2 bytes convertion)


DT0 BCD data 1 2 3 4

DT11
ASCII HEX code ASCII character

DT10 3 3 3 2 2 3 1 1

3 4

Description
Converts the BCD code starting from the 16-bit area specified by S1 to ASCII code that expresses the equivalent decimals as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D. A maximum of four bytes (8figure of data) can be converted. S2 specifies the number of source data bytes and the direction of converted data (normal/reverse). The data length when converted to ASCII code becomes double the BCD source data.

3 166
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

How to specify S2
S2 = H 00

Number of bytes for BCD data H1: 1 byte (BCD code that expresses a 2-digit decimal) H2: 2 bytes (BCD code that expresses a 4-digit decimal) H3: 3 bytes (BCD code that expresses a 6-digit decimal) H4: 4 bytes (BCD code that expresses a 8-digit decimal)

Direction of converted data H0: Normal direction H1: Reverse direction Since you can specify source data in byte units, it is possible to convert only the lower byte of S1 to ASCII code.

Precautions during programming


The two characters that make up one byte are interchanged when stored. Two bytes are converted as one segment of data.
Normal direction S1
1 2 3 4

Reverse direction S1
1 2 3 4

D+1

Converted result

D+1

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S1 is not BCD data. The number of bytes specified by S2 exceeds the area specified by S1. The converted result exceeds the area specified by D. The data specified by S2 is recognized as 0. The number of bytes specified by S2 is more than H4.

3 167
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Conversion Example
The following shows conversion from BCD data to ASCII codes. Normal direction convertion of 4 bytes (S2 = H0004)
BCD data S1+1 BCD H code 12 34 S1 56 78

4 bytes F73 (BCDA) instruction execution Converted result D+3 D+2 ASCII HEX 32 31 34 33 code ASCII 2 1 4 3 character Result of S1 + 1 conversion D+1 36 6 35 5 38 8 D 37 7

Result of S1 conversion

Reverse direction convertion of 4 bytes (S2 = H1004)


BCD data S1+1 BCD H code 12 34 56 S1 78

4 bytes F73 (BCDA) instruction execution Converted result D+3 D+2 ASCII HEX 38 37 36 35 code ASCII 8 7 6 5 character Result of S1 conversion D+1 34 4 33 3 32 2 D 31 1

Result of S1 + 1 conversion

ASCII HEX code to express BCD character


BCD character 0 1 2 3 4 5 6 7 8 9 ASCII HEX code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39

3 168
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F74 (ABCD) P74 (PABCD)


Outline

ASCII code BCD data

Converts ASCII code that expresses decimal characters to BCD code. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P74 (PABCD) is not available.
Boolean Address 10 11 Instruction ST F 74 DT H DT R 0 0 8 40

Program example
Ladder Diagram

Trigger 10 R0 F74 ABCD , DT 0 , S1


S1 S2 D

(ABCD)

H8 , S2

DT 40 D

Starting 16-bit area for storing ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted and to arrange converted data Starting 16-bit area for storing converted data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A N/A IY (*4) N/A A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 169
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts ASCII codes stored in data registers DT1 and DT0 to BCD data when trigger R0 turns on. The converted data is stored in data register DT40. When S2 = H4 (normal direction, 4 bytes)
DT1
ASCII HEX code ASCII character

DT0 3 3 3 2 2 3 1 1

3 4

DT40 BCD H code 3 4 1 2

When S2 = H1004 (reverse direction, 4 bytes)


DT1
ASCII HEX code ASCII character

DT0 3 3 3 2 2 3 1 1

3 4

DT40 BCD H code 1 2 3 4

Description
Converts ASCII codes that express decimal characters, starting from the 16-bit area specified by S1, to BCD data as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D. A maximum of eight characters of data can be converted. S2 specifies the number of source data bytes and the direction of converted data (normal/reverse). The data length when converted to a BCD number becomes half the ASCII code source data.

3 170
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

How to specify S2
S2 = H 00

Number of bytes for ASCII character H1: 1 byte (1 ASCII character) H2: 2 bytes (2 ASCII characters) H3: 3 bytes (3 ASCII characters) H4: 4 bytes (4 ASCII characters) H5: 5 bytes (5 ASCII characters) H6: 6 bytes (6 ASCII characters) H7: 7 bytes (7 ASCII characters) H8: 8 bytes (8 ASCII characters) Direction converted data H0: Normal direction H1: Reverse direction

Precautions during programming


The data for two ASCII code characters is converted to two numeric digits for one byte. When this takes place, the characters of the upper and lower bytes are interchanged. Four characters are converted as one segment of data. The converted results are stored in byte units. If an odd number of characters is being converted, 0 will be entered for bit position 0 to 3 of the final data (byte) of the converted results if data is sequenced in the normal direction, and 0 will be entered for bit position 4 to 7 if data is being sequenced in the reverse direction.
Normal direction
2 1 4 3

Reverse direction ASCII code


4 3 2 1

1 2

3 4

BCD data

1 2

3 4

Conversion Example
The following shows conversion from ASCII codes to BCD data. 8 ASCII characters convertion (S2=H0008)
ASCII code ASCII HEX code ASCII character S1+3 38 8 37 7 S1+2 36 6 35 5 S1+1 34 4 33 3 S1 32 2 31 1

8 ASCII characters (8 bytes) F74 (ABCD) instruction execution

Converted result BCD H code

D+1 78 56 34

D 12

3 171
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

7 ASCII characters (S2=H1007)


ASCII code ASCII HEX code ASCII character S1+3 37 7 6 S1+2 36 35 5 4 S1+1 34 33 3 32 2 S1 31 1

7 ASCII characters (7 bytes) This position is filled with 0. Converted result BCD H code D+1 01 23 45 F74 (ABCD) instruction execution D 67

BCD character to express ASCII HEX code


ASCII HEX code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 BCD character 0 1 2 3 4 5 6 7 8 9

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. ASCII code not corresponding to decimal numbers (0 to 9) is specified. The number of bytes specified by S2 exceeds the area specified by S1. The converted result exceeds the area specified by D. The data specified by S2 is recognized as 0. The number of bytes for ASCII characters in S2 is more than H8.

3 172
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F75 (BINA) P75 (PBINA)


Outline

16-bit binary data ASCII code

Converts 16-bit data to ASCII code that expresses the equivalent decimals. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P75 (PBINA) is not available.
Boolean Address 10 11 Instruction ST F 75 DT K DT R 0 (BINA) 0 6 50

Program example
Ladder Diagram

Trigger 10 R0 F75 BINA , DT 0 , K 6 , DT 50 S1


S1 S2 D

S2

16-bit equivalent constant or 16-bit area to be converted (source) 16-bit equivalent constant or 16-bit area to specify number of bytes used to express destination data (ASCII codes) Starting 16-bit area for storing ASCII codes (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A N/A IY (*4) A A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 173
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts the 16-bit data stored in data register DT0 to ASCII codes that express the equivalent decimals when trigger R0 turns on. The converted data is stored in data registers DT52 to DT50.
Source DT0 Bit position 15 1211 8 7 4 3 0 K100 Decimal data

Destination
ASCII HEX code ASCII character 3 0 0

DT52 3 0 0 3 1 1

DT51 2 D 2 0

DT50 2 0

6 bytes SPACE

Description
Converts the 16-bit data specified by S1 to ASCII codes that express the equivalent decimals. The converted result is stored in the area starting from the 16-bit area specified by D as specified by S2. Specify the number of bytes in decimal number in the S2. (This specification cannot be made with BCD data.)

Precautions during programming


If a positive number is converted, the + sign is not converted. When a negative number is converted, the sign is also converted to ASCII code (ASCII HEX code: H2D). If the area specified by S2 is more than that required by the converted data, the ASCII code for SPACE (ASCII HEX code: H20) is stored in the extra area. Data is stored in the direction towards the final address, so the position of the ASCII code may change, depending on the size of the data storage area. When S2=K8 (8 bytes)
D+3 30 0 30 0 1 D+2 31 2D D+1 20 20 20 D 20

(Space) (Space) (Space) (Space)

ASCII code

Extra bytes

Range specified by S2

If the number of bytes of ASCII codes following conversion (including the minus sign) is larger than the number of bytes specified by the S2, an operation error occurs. Make sure the sign is taken into consideration when specifying the object of conversion for the S2.

3 174
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Conversion Example
The following shows conversion from 16bit decimal data to ASCII codes. When a negative number is converted
16bit data FF S1 9C K100 F75 (BINA) instruction execution Converted result 0 D+2 30 30 0 1 D+1 31 2D 20 D 20
(Space) (Space)

ASCII code

Extra bytes

Range specified by S2 (6 bytes)

When a positive number is converted


16bit data 04 S1 D2 K1234 F75 (BINA) instruction execution D+2 34 4 33 3 2 D+1 32 21 1 20 D 20
(Space) (Space)

Converted result

ASCII code

Extra bytes

Range specified by S2 (6 bytes)

Decimal characters to express ASCII HEX code


Decimal characters SPACE 0 1 2 3 4 5 6 7 8 9 ASCII HEX code H20 H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39

3 175
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by S2 exceeds the area specified by D. The data specified by S2 is recognized as 0. The converted result exceeds the area specified by D. The number of bytes of converted result exceeds the number of bytes specified by S2.

3 176
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F76 (ABIN) P76 (PABIN)


Outline

ASCII code 16-bit binary data

Converts ASCII code that expresses decimal digits to 16-bit data that expresses the equivalent number. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P76 (PABIN) is not available.
Boolean Address 10 11 Instruction ST F 76 DT K DT R 0 (ABIN) 0 6 50

Program example
Ladder Diagram

Trigger R0 10 F76 ABIN , DT 0 , K 6 , DT 50 S1


S1 S2 D

S2

Starting 16-bit area for ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted 16-bit area for storing converted data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A N/A IY (*4) N/A A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Converts ASCII codes (6 bytes) that express decimal digits in data registers DT2 to DT0 to 16-bit data when trigger R0 turns on. The converted data is stored in data register DT50.
Source
ASCII HEX code ASCII character 3 0 0 DT2 3 0 0 3 1 1 DT1 2 D 3 0 DT0 3 0

6 bytes In this case, this position should be set to SPACE or 0.

Destination

DT50 Bit position 15 12 11 8 7 4 3 0 K100

Decimal data

3 177
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts the ASCII codes that express the decimal digits, starting from the 16-bit area specified by S1 to 16-bit data as specified by S2. The converted result is stored in the area specified by D. S2 specifies the number of source data bytes to be converted using decimal number. (This specification cannot be made with BCD data.)

Precautions during programming


The ASCII codes being converted should be stored in the direction of the last address in the specified area. If the area specified by S1 and S2 is more than that required for the data you want to convert, place 0 (ASCII HEX code: H30) or SPACE (ASCII HEX code: H20) into the extra bytes. ASCII codes with signs (such as +: H2B and : H2D) are also converted. The + codes can be omitted.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by S2 exceeds the area specified by S1. The data specified by S2 is recognized as 0. The converted result exceeds the 16-bit area specified by D. The converted result exceeds the 16-bit data. ASCII code not corresponding to decimal numbers (0 to 9) or ASCII characters (+, , and SPACE) is specified.

Conversion Example
The following shows conversion from ASCII codes to decimal data in a 16bit configuration. Example of converting an ASCII code indicating a negative number
ASCII code S1+2 30 0 30 0 S1+1 31 1 2D 30 (0) S1 30 (0)

ASCII code

Extra bytes

Range specified by S2 F76 (ABIN) instruction execution Converted result FF D 9C K100

3 178
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example of converting an ASCII code indicating a positive number

Example 1:
ASCII code S1+2 30 0 30 0 S1+1 31 1 2B + 20 S1 20
(Space) (Space)

ASCII code

Extra bytes

Range specified by S2

Example 2:
ASCII code S1+2 30 0 30 0 S1+1 31 1 20 20 S1 20

(Space) (Space) (Space)

ASCII code

Extra bytes

Range specified by S2 F76 (ABIN) instruction execution Converted result of example 1 or 2 00 D 64 K100

ASCII HEX code to express decimal characters


ASCII HEX code H20 H2B H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 Decimal characters SPACE + 0 1 2 3 4 5 6 7 8 9

3 179
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F77 (DBIA) P77 (PDBIA)


Outline

32-bit binary data ASCII code

Converts 32-bit data to ASCII code that expresses the equivalent decimals. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P77 (PDBIA) is not available.
Boolean Address 10 11 Instruction ST F K DT 77 DT R 0 (DBIA) 0 10 50

Program example
Ladder Diagram

Trigger 10 R0 F77 DBIA , DT 0 , K 10 , DT 50 S1


S1 S2 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data to be converted (source) 16-bit equivalent constant or 16-bit area to specify number of bytes used to express destination data (ASCII codes) Starting 16-bit area for storing ASCII codes (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A N/A IY N/A N/A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 180
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts the 32-bit data stored in data registers DT1 and DT0 to ASCII code that expresses the equivalent decimals when trigger R0 turns on. The converted data is stored in data registers DT54 to DT50 (10 bytes).
Source
Decimal

DT1 DT0 Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0 K12345678

Destination
ASCII HEX code ASCII character

DT54

DT53

DT52

3 8

3 7

3 6

3 5

3 4

3 3

3 2

DT51 2 3 1

DT50

Number of bytes specified by S2 (10 bytes)

SPACE

Description
Converts the 32-bit data specified by S1 to ASCII code that expresses the equivalent decimals. The converted result is stored in the area starting from the 16-bit area specified by D as specified by S2. S2 specifies the number of bytes used to express the destination data using decimal.

Precautions during programming


When a positive number is converted, the + sign is not converted. When a negative number is converted, the sign is also converted to ASCII code (ASCII HEX code: H2D). If the area specified by S2 is more than that required by the converted data, the ASCII code for SPACE (ASCII HEX code: H20) is stored in the extra area. Data is stored in the direction of the last address, so the position of the ASCII code may change depending on the size of the data storage area. If the number of bytes of ASCII codes following conversion (including the minus sign) is larger than the number of bytes specified by the S2, an operation error occurs. Make sure the sign is taken into consideration when specifying the object of conversion for the S2.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by S2 exceeds the area specified by D. The data specified by S2 is recognized as 0. The converted result exceeds the area specified by D. The number of bytes of converted result exceeds the number of bytes specified by S2. For FP2SH and FP10SH, the error flag (R9007) turns on only when these operation errors occurs.

3 181
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Conversion Example
The following shows conversion from 32bit decimal format data to ASCII codes. Example of converting a negative number
32bit data S1+1 FF 43 9E S1 B2

K12345678 Converted result D+4 38 8 37 7 6 F77 (DBIA) instruction execution D+3 36 35 5 4 D+2 34 33 3 2 D+1 32 31 1 2D D 20
(Space)

ASCII code Range specified by S2 (10 bytes)

Extra byte

Example of converting a positive number


32bit data S1+1 00 BC 61 S1 4E

K12345678 F77 (DBIA) instruction execution Converted result 8 D+3 38 37 7 6 D+2 36 35 5 4 D+1 34 33 3 32 2 D 31 1

ASCII code Range specified by S2 (8 bytes)

Decimal characters to express ASCII HEX code


Decimal characters SPACE + 0 1 2 3 4 5 6 7 8 9 ASCII HEX code H20 H2B H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39

3 182
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F78 (DABI) P78 (PDABI)


Outline

ASCII code 32-bit binary data

Converts ASCII code that expresses decimal digits to 32-bit data that expresses the equivalent number. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P78 (PDABI) is not available.
Boolean Address 10 11 Instruction ST F 78 DT K DT R 0 (DABI) 0 10 50

Program example
Ladder Diagram

Trigger 10 R0 F78 DABI , DT 0 , K 10 , DT 50 S1


S1 S2 D

S2

Starting 16-bit area for ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A N/A IY N/A N/A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Converts ASCII codes (10 bytes) that express decimal digits in data registers DT4, DT3, DT2, DT1 and DT0 to 32-bit data when trigger R0 turns on. The converted data is stored in data registers DT51 and DT50.
Source
ASCII HEX code ASCII character

DT4

DT3

DT2

3 8

3 7

3 6

3 5

3 4

3 3

3 2

DT1 2 3 1

DT0

ASCII codes (10 bytes) specified by S2

SPACE

Destination

DT51 DT50 Bit position 15 12 11 8 7 4 3 0 15 12 11 8 7 4 3 0 Decimal K12345678

3 183
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts ASCII code that expresses the decimal digits, starting from the 16-bit area specified by S1 to 32-bit data as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D. S2 specifies the number of bytes used to express the destination data using decimals.

Precautions during programming


The ASCII codes being converted should be stored in the direction of the last address in the specified area. If the area specified by S1 and S2 is more than that required by the data you want to convert, place 0 (ASCII HEX code: H30) or SPACE (ASCII HEX code: H20) in the extra bytes. ASCII codes with signs (such as +: H2B and : H2D) are also converted. The + codes can be omitted.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by S2 exceeds the area specified by S1. The data specified by S2 is recognized as 0. The converted result exceeds the area specified by D. The converted result exceeds the 32-bit data. ASCII code not corresponding to decimal numbers (0 to 9) or ASCII characters (+, , and SPACE) is specified.

Conversion Example
The following shows conversion from ASCII codes to decimal data in a 32bit configuration. Example of converting an ASCII code indicating a negative number
ASCII code S1+4 38 8 37 7 S1+3 36 6 35 5 S1+2 34 4 33 3 S1+1 32 2 31 1 2D S1 20
(Space)

ASCII code Range specified by S2 (10 bytes)

Extra byte

F78 (DABI) instruction execution Converted result D+1 FF 43 9E D B2

K12345678

3 184
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example of converting an ASCII code indicating a positive number

Example 1:
ASCII code S1+3 38 7 37 8 S1+2 36 6 35 5 S1+1 34 4 33 3 32 2 S1 31 1

ASCII code Range specified by S2 (8 bytes)

Example 2:
ASCII code S1+4 38 8 37 7 S1+3 36 6 35 5 S1+2 34 4 33 3 S1+1 32 2 31 1 2B + S1 20
(Space)

ASCII code Range specified by S2 (10 bytes)

Extra byte

F78 (DABI) instruction execution Converted result of example 1 or 2 D+1 00 BC 61 D 4E

K12345678

ASCII HEX code to express decimal characters


ASCII HEX code H20 H2B H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 Decimal characters SPACE + 0 1 2 3 4 5 6 7 8 9

3 185
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F80 (BCD) P80 (PBCD)


Outline

16-bit binary data 4-digit BCD data

Converts 16-bit binary data to BCD code the expresses a 4-digit decimal. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P80 (PBCD) is not available.
Boolean Address 10 11 Instruction ST F 80 DT DT R 0 (BCD) 10 20

Program example
Ladder Diagram

Trigger 10 R0 F80 BCD , DT10 , DT20 S


S D

16-bit equivalent constant or 16-bit area for storing 16bit binary data (source) 16-bit area for 4-digit BCD data (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 186
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts the contents of data register DT10 to BCD code that expresses a 4-digit decimal when trigger R0 turns on. The converted data is stored in data register DT20. If DT10 is 16 using decimal number conversion, the following will be stored in DT20. Source [S]: K16
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 DT10 Decimal K16 Conversion (to BCD code)

Destination [D]: H16 (BCD)


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 DT20 0 0 1 6 BCD H code

Description
Converts the 16-bit binary data specified by S to BCD code that expresses a 4-digit decimal. The converted data is stored in D.

Precautions during programming


The maximum value of 16bit binary data that can be converted to BCD code is K9999 (H270F).

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The range that binary data can be BCD converted is exceeded. (When minus or when K9999 is exceeded)

3 187
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F81 (BIN) P81 (PBIN)


Outline

4-digit BCD data 16-bit binary data

Converts BCD code that expresses a 4-digit decimal to 16-bit binary data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P81 (PBIN) is not available.
Boolean Address 10 Instruction ST F 81 DT DT R 0 (BIN) 10 20

Program example
Ladder Diagram

Trigger 10 R0 F81 BIN , DT10 , DT20 S


S D

11

4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (source) 16-bit area for storing 16-bit binary data (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K K N/A H A N/A Index modifier A A A: Available N/A: Not Available K: K0 to K9

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 188
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Converts the contents of data register DT10 to 16-bit binary data when trigger R0 turns on. The converted data is stored in data register DT20. If DT10 is BCD data consisting of H15, the following will be stored in DT20. Source [S]: H15 (BCD)
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 DT10 BCD H code 0 0 1 5

Conversion (to binary data)

Destination [D]: K15


Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 DT20 Decimal K15

Description
Converts BCD code that expresses a 4-digit decimal specified by S to 16-bit binary data. The converted data is stored in D.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S is not BCD data.

3 189
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F82 (DBCD) P82 (PDBCD)


Outline

32-bit binary data 8-digit BCD data

Converts 32-bit binary data to BCD code that expresses an 8-digit decimal. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P82 (PDBCD) is not available.
Boolean Address 10 11 Instruction ST F 82 DT DT R 20 10 20

Program example
Ladder Diagram

Trigger 10 R20 F82 DBCD, DT10 , DT20 S


S D

(DBCD)

32-bit equivalent constant or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 8-digit BCD code (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Converts the contents of data registers DT11 and DT10 to BCD code that expresses an 8-digit decimal when trigger R20 turns on. The converted data is stored in data registers DT21 and DT20.

Description
Converts the 32-bit data specified by S to BCD code that expresses an 8-digit decimal. The converted data is stored in D+1 and D.

Precaution during programming


The maximum value of binary data that can be converted to BCD code is K99999999 (H5F5E0FF).

3 190
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. When the range that binary data can be BCD converted is exceeded. (When minus or when K99999999 is exceeded)

3 191
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F83 (DBIN) P83 (PDBIN)


Outline

8-digit BCD data 32-bit binary data

Converts BCD code that expresses an 8-digit decimal to 32-bit binary data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P83 (PDBIN) is not available.
Boolean Address 10 11 Instruction ST F 83 DT DT R 20 (DBIN) 10 20

Program example
Ladder Diagram

Trigger 10 R20 F83 DBIN, DT10 , DT20 S


S D

8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD code (source) Lower 16-bit area for 32-bit data (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K K N/A H A N/A Index modifier A A A: Available N/A: Not Available K: K0 to K9

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Converts BCD code that expresses an 8digit decimal of data registers DT11 and DT10 to 32-bit binary data when trigger R20 turns on. The converted data is stored in data registers DT21 and DT20.

Description
Converts BCD code that expresses an 8-digit decimal specified by S to 32-bit binary data. The converted data is stored in D+1 and D.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S is not BCD data.

3 192
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F84 (INV) P84 (PINV)


Outline

16-bit data invert

Inverts all bits in the 16-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P84 (PINV) is not available.
Boolean Address 10 11 Instruction ST F 84 DT R 20 (INV) 0

Program example
Ladder Diagram

Trigger 10 R20 F84 INV , DT 0 D


D 16-bit area to be inverted

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Inverts the contents of data register DT0 when trigger R20 turns on. Destination
Bit position 15 1211 8 7 4 3 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 DT0 R20: on (inversion)

Destination

Bit position 15 1211 8 7 4 3 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 DT0

Description
Inverts each bit (0 or 1) of the 16-bit data specified by D. This instruction is useful for controlling an external device (7segment display) that uses negative logic operation.

Flag conditions

Error flag (R9008): Error flag (R9007):

Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on and stays on when the area specified using the index modifier exceeds the limit. 3 193

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F85 (NEG) P85 (PNEG)


Outline

16-bit data complement of 2

Takes complement of 2 in 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P85 (PNEG) is not available.
Boolean Address 10 11 Instruction ST F 85 DT R 20 (NEG) 0

Program example
Ladder Diagram

Trigger 10 R20 F85 NEG , DT 0 D


D

16-bit area for storing original data and its twos complement

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Takes twos complement of data register DT0 when trigger R20 turns on. Destination
Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 DT0
Decimal data

K3 R20: on

Destination

Bit position 15 1211 8 7 4 3 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 DT0


Decimal data

K3

3 194
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Takes twos complement of 16-bit data specified by D. The twos complement is obtained by inverting all bits and adding 1 to the inverted result. This instruction is useful for changing the sign of 16-bit data from positive to negative or from negative to positive.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 195
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F86 (DNEG) P86 (PDNEG)


Outline

32-bit data complement of 2

Takes complement of 2 in 32-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P86 (PDNEG) is not available.
Boolean Address 10 11 Instruction ST F 86 DT R 20 0

Program example
Ladder Diagram

Trigger 10 R20 F86 DNEG , DT 0 D


D

(DNEG)

Lower 16-bit area of 32-bit data for storing original data and its twos complement

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Takes twos complement of data registers DT1 and DT0 when trigger R20 turns on. Destination
DT1 DT0 Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1
Decimal data

K3

Higher 16-bit area

Lower 16-bit area


R20: on

Destination

DT1 DT0 Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0 Binary data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1


Decimal data

K3

Higher 16-bit area

Lower 16-bit area

3 196
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Takes twos complement of 32-bit data specified by D. The twos complement is obtained by inverting all bits and adding 1 to the inverted result. This instruction is useful for changing the sign of 32-bit data from positive to negative or from negative to positive.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 197
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F87 (ABS) P87 (PABS)


Outline

16-bit data absolute value

Takes absolute value of signed 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P87 (PABS) is not available.
Boolean Address 10 11 Instruction ST F 87 DT R 20 (ABS) 0

Program example
Ladder Diagram

Trigger 10 R20 F87 ABS , DT 0 D


D

16-bit area for storing original data and its absolute value

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Takes absolute value of data register DT0 when trigger R20 turns on. For instance, regardless of whether the value of DT0 is K1 or K1, it will be K1 when the instruction is executed.

Description
Takes absolute value of signed 16-bit data specified by D. The absolute value of the signed 16-bit data is stored in D. This is effective for processing data in which the polarity (+ or ) changes.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The 16-bit data is the negative minimum value K-32768 (H8000).

Carry flag (R9009): Turns on for an instant when 16-bit data is the negative value range: K-1 to K-32767 (HFFFF to H8001).

3 198
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F88 (DABS) P88 (PDABS)


Outline

32-bit data absolute value

Takes absolute value of signed 32-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P88 (PDABS) is not available.
Boolean Address 10 11 Instruction ST F 88 DT R 20 0

Program example
Ladder Diagram

Trigger 10 R20 F88 DABS , DT 0 D


D

(DABS)

Lower 16-bit area of 32-bit data for storing original data and its absolute value

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Takes absolute value of data registers DT1 and DT0 when trigger R20 turns on. The absolute value of DT1 and DT0 is stored in data registers DT1 and DT0.

Description
Takes the absolute value of signed 32-bit data specified by D. The absolute value of the 32-bit data is stored in D+1 and D. This is effective for processing data in which the polarity (+ or ) changes.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The area specified using the index modifier exceeds the limit. The 32-bit data is the negative minimum value K-2147483648 (H80000000). Carry flag (R9009): Turns on for an instant when 32-bit data is negative value range K-1 to K-2147483647 (HFFFFFFFF to H80000001).

3 199
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F89 (EXT) P89 (PEXT)


Outline

16-bit data sign extension

Copies the sign bit of the specified 16-bit data to all the bits of the higher 16-bit area (extended 16-bit area). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P89 (PEXT) is not available.
Boolean Address 10 11 Instruction ST F 89 DT R 20 (EXT) 0

Program example
Ladder Diagram

Trigger 10 R20 F89 EXT , DT 0 D


D 16-bit area for storing original 16-bit binary data

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 200
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Copies the sign bit of data register DT0 to all the bits of data register DT1 when trigger R20 turns on. If K2 is stored in DT0, the data will be as follows.
Sign bit (0: positive, 1: negative) DT0 Bit position 15 1211 8 7 4 3 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Decimal data

K2

16-bit data
R20: on DT1 DT0 Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Decimal data

K2

Higher 16-bit area (extended 16-bit area) 32-bit data

Lower 16-bit area

Description
16bit data is converted to 32bit data, without signs and values being changed. If the sign bit (bit position 15) of the 16bit data specified by D is 0, all 16 bits of the next area of D will be set to 0. If the sign bit is 1, all 16 bits will be set to 1. By doing this, the 16bit data is converted to 32bit data, without the sign or the values changing. Double word data with D as the first data can be used as the operand of 32bit operation instructions following execution of the F89 (EXT) instruction.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 201
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F90 (DECO) P90 (PDECO)


Outline

Decode

Decodes the specified data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P90 (PDECO) is not available.
Boolean Address 10 11 Instruction ST F 90 DT H DT R 20 10 404 20

Program example
Ladder Diagram

Trigger R20 F90 DECO, DT10, H404, DT20 S


S n D

(DECO)

10

16-bit equivalent constant or 16-bit area to be decoded (source) 16-bit area equivalent constant or 16-bit area to specify starting bit position and number of bits to be decoded Starting 16-bit area for storing decoded data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A A IY (*4) A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S n D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Decodes data register DT10 according to the n = H404 when trigger R20 turns on. The decoded result is stored in data register DT20.

Example:

When n: H404
Source Bit position 4 Bit position 15 1211 8 7 4 3 0 4 bits from bit position 4 to 7 of 0 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1 DT10 are decoded. DT10 [Binary: 0111 (decimal: K7)] 4 bits Destination The decoded data 1 (on) is stored in bit position 7 of DT20. Bit position 15 1211 8 7 4 3 0 The bits except bit position 7 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 DT20 become 0. R20: on

3 202
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Decodes the contents of 16-bit data specified by S according to the contents of n. The decoded result is stored in the area starting from 16-bit area specified by D. The length of the area required to store decoding results changes depending on the length of the data being decoded.

How to specify control data n


n specifies the starting bit position and the number of bits to be decoded using hexadecimal data. 16-bit data
Bit position 15 n 12 11 8 7 4 3 0 0 0 0 0 0 0 0 0

The bits of mark are invalid.

Starting bit position to be decoded (set range: H0 to HF) Set value H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF Starting bit position 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Number of bits to be decoded (set range: H0 to H8) Set value H0 H1 H2 H3 H4 H5 H6 H7 H8 Number of bits 0 1 2 3 4 5 6 7 8

3 203
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Relationship between number of bits and occupied data area for decoded result Number of bits to be decoded
1 2 3 4 5 6 7 8

Data area required for the result


1-word 1-word 1-word 1-word 2-word 4-word 8-word 16-word

Valid bits in the area for the result


2-bit* 4-bit* 8-bit* 16-bit 32-bit 64-bit 128-bit 256-bit

* Invalid bits in the data area required for the result are set to 0.

Decoded example
When decoding 4-bit data, 16-bit data for the decoded result is shown below. Decoding conditions (n) Starting bit position: H0 (bit position 0) Number of bits to be decoded: H4 (4 bits) Data to be decoded [Binary (decimal)]
0000 (K0) 0001 (K1) 0010 (K2) 0011 (K3) 0100 (K4) 0101 (K5) 0110 (K6) 0111 (K7) 1000 (K8) 1001 (K9) 1010 (K10) 1011 (K11) 1100 (K12) 1101 (K13) 1110 (K14) 1111 (K15)

Decoded result
15 E E 12 11 E 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 E 4 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 E E0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

3 204
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bits to be decoded is outside the range of 1 to 8. The sum of the number of bits to be decoded and the starting bit position to be decoded is outside the range of 1 to 16. The last data area for the decoded result exceeds the limit.

3 205
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F91 (SEGT) P91 (PSEGT)


Outline

7-segment decode

Converts 16-bit data to 4-digit data for 7-segment indication. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P91 (PSEGT) is not available.
Boolean Address 10 11 Instruction ST F 91 DT DT R 20 0 10

Program example
Ladder Diagram

Trigger 10 R20 F91 SEGT , DT 0 , DT10 S


S D

(SEGT)

16-bit equivalent constant or 16-bit area to be converted to the 7-segment indication (source) Starting 16-bit area for storing 4-digit data for 7-segment indication (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Converts the contents of data register DT0 to 4-digit data for 7-segment indication when trigger R20 turns on. The converted data is stored in word internal relays DT11 and DT10. For example, to display ABCD, the following would be entered.
Source
Bit position 15 12 11 8 7 4 3 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 DT0 Hexadecimal A B C D

Destination
Bit position 15 1211 8 7 4 3 0 DT11 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 7-segment A B indication Bit position 15 1211 8 7 4 3 0 DT10 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 7-segment C D indication

3 206
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts the 16-bit equivalent constant or 16-bit data specified by S to 4-digit data for 7-segment indication. The converted data is stored in the area starting from the 16-bit area specified by D. The relationship between the displayed contents and the contents specified for S, and the data of the 7segment display is shown below.
One digit data to be converted Hexadecimal H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF Binary 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 8-bit data for 7-segment indication g f e d c b a 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1
MSB LSB a b c d e f g

7-segment indication

Organization of 7-segment indication

0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1

a f e d g b c

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The last data area for the converted result exceeds the limit.

3 207
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F92 (ENCO) P92 (PENCO)


Outline

Encode

Encodes the specified data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P92 (PENCO) is not available.
Boolean Address 10 11 Instruction ST F 92 DT H DT R 20 10 5 20

Program example
Ladder Diagram

Trigger R20 F92 ENCO, DT10, H5 , DT20 S


S n D

(ENCO)

10

Starting 16-bit area to be encoded (source) 16-bit equivalent constant or 16-bit area to specify starting bit position and number of bits to be encoded 16-bit area for storing encoded data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A A IY (*4) N/A A A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S n D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 208
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Encodes contens of data register DT11 and DT10 according to the n: H5 when trigger R20 turns on. The encoded result is stored in 8 bits of data register DT20 starting from bit position 0. When n: H0005 Number of bits to be encoded: 25 = 32 bits Starting bit position to be encoded for destination data: bit position 0
Source 32 bits specified by H5 The 8th bit of 32-bit data is in the on state.

Bit position 15 1211 8 7 4 3 0 Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 DT11 DT10 [S] Starting bit position Destination Bit position 15 1211 8 7 4 3 0 DT20 [D] 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 The encoded result K8 Decimal K8 (decimal) is stored in DT20. Bit position 8 to 15 are filled with 0. Encoded result:K8

Description
Encodes the contents of data specified by S according to the contents of n. The encoded result is stored in the 16-bit area specified by D starting from the specified bit position. If more than one bit is on in a segment being decoded, the uppermost bit is effective. The contents of the 2nL segment at the beginning of the area specified by the S are encoded. The encoded results are stored as decimal data, in the eight bits starting from the bit specified as the nH bit. Invalid bits in the specified area for the result are set to 0.

3 209
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

How to specify control data n


n specifies the starting bit position of destination data and the number of bits to be decoded using hexadecimal data. 16-bit data
Bit position 15 n 12 11 8 7 4 3 0 0 0 0 0 0 0 0 0

The bits of mark are invalid.


Number of bits to be encoded (set range: H1 to H8) Set value H1 H2 H3 H4 H5 H6 H7 H8 Number of bits 2 4 8 (1 byte) 16 (1 word) 32 (2 words) 64 (4 words) 128 (8 words) 256 (16 words)

Starting bit position of destination data to be encoded (set range: H0 to HF) Set value H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF Starting bit position 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

3 210
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Encoded example
When encoding 16-bit data (nL=4), the encoded results are shown below.
Data to be encoded 15 E 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 11 E 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 7 E E4 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 E E0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Encoded result [Binary (decimal)] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 (K0) (K1) (K2) (K3) (K4) (K5) (K6) (K7) (K8) (K9) (K10) (K11) (K12) (K13) (K14) (K15)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bits to be encoded is outside the range of 1 to 8. The sum of the number of bits to be encoded and the starting bit position to be encoded is outside the range of 1 to 16. The data to be encoded is 0.

3 211
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F93 (UNIT) P93 (PUNIT)


Outline

16-bit data combine

Extracts the lower 4 bits (bit positions 0 to 3) of the specified 16-bit areas and combines them into one word. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P93 (PUNIT) is not available.
Boolean Address 10 11 Instruction ST F 93 DT K DT R 20 (UNIT) 10 3 20

Program example
Ladder Diagram

Trigger R20 F93 UNIT, DT10, K 3 , DT 20 S


S n D

10

Starting 16-bit area to be extracted (source) 16-bit equivalent constant or 16-bit area to specify number of data to be extracted 16-bit area for storing combined data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) N/A A A IY (*4) N/A A A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

S n D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 212
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Extracts lower 4 bits of data registers DT12 to DT10, combines the extracted data, and stores it in data register DT20 when trigger R20 turns on.
Bit position 15 DT10 DT11 DT12 12 11 8 7 4 3 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Bit position 15 DT20

12 11

8 7

4 3

0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 When the n < K4, 0 is set to bit position 12 to 15.

Description
Extracts the lower 4 bits (bit positions 0 to 3) of each specified area, starting from the 16-bit area specified by S and combines the extracted data into one word. The result is stored in the 16-bit area specified by D. n specifies the number of data areas to be extracted. (range of n: K0 to K4) When K0 is specified for n, this instruction is not executed. When n < K4, 0 is automatically set to positions at D where the corresponding 16-bit source data does not exist.
Source Bit position 15 1211 8 7 4 3 0 Digit 1 S n S+1 S+2 S+3 Bit positions 4 to 15 of each data area are invalid.

Digit 2 Digit 3 Digit 4

Destination Bit position 15 1211 8 7 4 3 0 Digit 4 Digit 3 Digit 2 Digit 1 D

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of data areas to be combined n is K5 or more.

3 213
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F94 (DIST) P94 (PDIST)


Outline

16-bit data distribute

Divides the specified 16-bit data into four 4-bit units and distributes the divided data into the lower 4 bits of the specified 16-bit areas. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P94 (PDIST) is not available.
Boolean Address 10 11 Instruction ST F K DT 94 DT R 20 (DIST) 10 4 20

Program example
Ladder Diagram

Trigger R20 F94 DIST, DT10, K 4 , DT20 S


S n D

10

16-bit equivalent constant or 16-bit area to be divided (source) 16-bit equivalent constant or 16-bit area to specify number of data to be divided Starting 16-bit area for storing divided data (destination)

Operands
Relay Operand WL WX WY WR (*1) A A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A A N/A IY (*4) A A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available

S n D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 214
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Divides the 16-bit data of data register DT10 into 4-bit units and the divided data is stored in the lower 4 bits (bit positions 0 to 3) of data registers DT20 to DT23 when trigger R20 turns on.
Bit position 15 DT10 12 11 8 7 4 3 0

0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0

Bit position 15 DT20 DT21 DT22 DT23

12 11

8 7

4 3

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

Description
Divides the 16-bit data specified by S into 4-bit units and distributes the divided data into the lower 4 bits (bit positions 0 to 3) of 16-bit areas starting from D. n specifies the number of data divisions.(range of n: K0 to K4) When K0 is specified for n, this instruction is not executed.
Source Bit position 15 S 12 11 Digit 4 Digit 3

n
8 7 4 3 0

Digit 2

Digit 1

Destination Bit position 15 D D+1 D+2 D+3 Bit positions 4 to 15 are filled with 0s. 12 11 8 7 4 3 0 Digit 1 Digit 2 Digit 3 Digit 4

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number n is 5 or more. Transferring address specified by D to n data, and when area is exceeded.

3 215
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F95 (ASC) P95 (PASC)


Outline

Character ASCII code

Converts character constants to ASCII code. 4 For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P95 (PASC) is not available.
Boolean Address 10 11 Instruction ST F 95 R 20 (ASC) 2

Program example
Ladder Diagram

Trigger R20 F95 ASC, M ABC1230_DEF, DT 2 S


S D

10

M ABC1230_DEF DT

_ indicates a space. In actuality, this will be blank.


Character constants (max. 12 letters) (source) Starting 16-bit area for storing 6-word ASCII code (destination)

Operands
Relay Operand WL WX WY WR (*1) N/A N/A N/A N/A N/A A A A Timer/Counter SV N/A A EV N/A A Register LD FL DT (*1) (*2) N/A N/A N/A A A A Index register IX (*3) N/A A IY N/A N/A K N/A N/A Constant H N/A N/A M A N/A Index modifier N/A N/A

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

A: Available N/A: Not Available

Explanation of example
Converts the character constants ABC1230_DEF to ASCII code when trigger R20 turns on. The ASCII code is stored in data registers DT2 to DT7.
Character constant [S] Character constants M ABC1230 DEF

R20: on
Data register [D] ASCII character SPACE DT7 F DT6 E D DT5 0 3 DT4 2 1 DT3 C DT2 B A

ASCII HEX code 2 0 4 6 4 5 4 4 2 0 3 0 3 3 3 2 3 1 4 3 4 2 4 1

When the number of character constants specified by S is less than 12, the ASCII code H20 (SPACE) is stored in the extra destination area. 3 216
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts the character constants specified by S to ASCII code. The converted ASCII code is stored in 6 words starting from the 16-bit area specified by D.

Precautions during programming


The character constant M can be input with the programming tool software. Convertion example of one character constant A
S: MA ] ] ] ] ] ] ] ] ] ] ]

11 spaces
R20 F95 ASC, MA , DT 2

R20: on DT2: DT3: DT4: DT5: DT6: DT7: H20 H20 H20 H20 H20 H20 ( ( ( ( ( ( ) ) ) ) ) ) H41 H20 H20 H20 H20 H20 ( ( ( ( ( (A) ) ) ) ) ) [ [ [ [ [ [ [ [ [ [ [

Higher byte
S: M

Lower byte
A S: M A

R20

DT2: DT3: DT4: DT5: DT6: DT7:

H20 H20 H20 H20 H41

( ( ( (

) ) ) )

H20 H20 H20 H20 H20

( ( ( ( (

) ) ) ) )

DT3: DT4: DT5: DT6: DT7:

H20 H20 H20 H20 H20

( ( ( ( (

) ) ) ) )

H20 H20 H41 H20 H20

( ( ( (

[ [ [ [ [

(A)

Higher byte

Lower byte

Higher byte

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

] ] ] ] ] ] ] ] ] ] ]

] ] ] ] ] ]

] ] ] ] ]

11 spaces
F95 ASC, M A , DT 2

R20

6 spaces
F95 ASC, M

5 spaces
A , DT 2

R20: on H20 ( ) H20 ( ) DT2: H20 ( )

R20: on H20 ( ) ) ) ) )

(A)

Lower byte

3 217

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the last area for ASCII code exceeds the limit (6 words: six 16-bit areas). Turns on for an instant when the last area for ASCII code exceeds the limit (6 words: six 16-bit areas).

ASCII HEX code


b7 b6 b5 b4 b7 b6 b5 b4 b3 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 b2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 b1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 b0 0 1 0 1 0 1 Least significant digit 0 1 0 1 0 1 0 1 0 1 ASCII HEX code 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

Most significant digit 0 1 2


SPACE

3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?

4 @ A B C D E F G H I J K L M N O

5 P Q R S T U V W X Y Z [ \ ] ^ _

7 p

NUL DLE SOH DC1 STX DC2 ETX DC3 EOT DC4 ENQ NAK ACK SYN BEL ETB BS CAN HT EM

! # $ % & ( ) * + , . /

a b c d e f g h i j k l m n o

q r s t u v w x y z { I } ~ DEL

LF SUB VT ESC FF CR SO SI FS GS RS US

3 218
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 219
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F96 (SRC) P96 (PSRC)


Outline

16bit data search

Searches for a specified value in a block of 16-bit areas. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P96 (PSRC) is not available.
Boolean Address 10 11 Instruction ST F 96 DT DT DT R 0 (SRC) 10 20 40

Program example
Ladder Diagram

Trigger R0 F96 SRC , DT10 , DT20 , DT 40 S1


S1 S2 S3

10

S2

S3

16-bit equivalent constant or 16-bit area to store the searched value Starting 16-bit area of the block Ending 16-bit area of the block

Operands
Relay Operand WL WX WY WR (*1) A N/A N/A A A A A A A A A A Timer/Counter SV A A A EV A A A Register LD FL DT (*1) (*2) A A A A A A A A A Index register IX (*3) A N/A N/A IY (*4) A N/A N/A Constant K A N/A N/A H A N/A N/A Index modifier A A A A: Available N/A: Not Available

S1 S2 S3 (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 220
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Searches for the value given in data register DT10 in the block of data register DT20 through DT40 when trigger R0 turns on. For example, to search the area of the value called H1234, H1234 would be written to DT10.
Searched data DT10: 1 2 3 4 [S1] Block of 16bit areas DT20: 1 2 1 1 0 [S2] DT21: 1 2 F F 1 DT22 1 2 3 4 2 : DT23: 7 F F F 3

DT39: 1 2 3 4 19 DT40: 1 2 3 4 20 [S3] Relative position number

If DT22, DT39, and DT40 match the searched data, the following occurs. If the number of registers matching the searched data = 3 K3 is stored in DT9037 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH and FP10SH: DT90037). If the position of the first matching data (the relative position number) = 2 K2 is stored in DT9038 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH, and FP10SH: DT90038).

Description
Searches for values matching S1 in the block of 16-bit areas specified by S2 (starting area) through S3 (ending area). When the search operation is performed, the search results are stored as follows. The number of data items that match S1 is stored in special data register DT9037 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH and FP10SH: DT90037). The position of the first matching data item, counting from the starting 16-bit area S2, is stored in special data register DT9038 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH and FP10SH: DT90038). Starting area S2 and ending area S3 should: Be the same type of operand. Satisfy S2 S3. Data is searched from S2 to S3.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S2 > S3.

3 221
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F97 (DSRC) P97 (PDSRC)


Outline

32-bit data search

Searches for a specified value in a block of 32-bit areas. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P97 (PDSRC) is not available.
Boolean Address 10 11 Instruction ST F97 DT DT DT R 0 10 20 40

Program example
Ladder Diagram

Trigger R0 10 F97 DSRC, DT10, S1


S1 S2 S3

(DSRC)

DT20, S2

DT 40 S3

32-bit equivalent constant or 32-bit area to store the searched value in Starting 32-bit area of the block Ending 32-bit area of the block

Operands
Relay Operand WX WY WR WL S1 S2 S3 A N/A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index Constant register I A N/A N/A K A H A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

3 222
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Searches for the value given in data registers DT10 and DT11 in the block of data register DT20 through DT40 when trigger R0 turns on. For example, to search the area of the value called H01234567, H01234567 would be written to DT10 and DT11. Searched data
DT11, DT10: 0 1 2 3 4 5 6 7 [S1]

Block of 32-bit area


DT21,DT20: 0 1 2 3 5 7 6 4 DT23,DT22: 1 2 F F 1 2 F F DT25, DT24: 0 1 2 3 4 5 6 7 DT27, DT26: 7 F F F 7 F F F 0 [S2] 1 2 3

DT39, DT38: DT41, DT40:

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

9 10 [S3]

Relative position number

If DT24 and DT25, DT38 and DT39, and DT40 and DT41 match the searched data, the following occurs. The number K3 of data items that match the searched data (DT10 and DT11) is stored in special data register DT90037. The position K2 of the first matching data item, counting from data register DT20, is stored in special data register DT90038.

Description
Searches for values matching S1 in the block of 32-bit areas specified by S2 (starting area) through S3 (ending area) when the trigger turns on. When the search operation is performed, the search results are stored as follows. The number of data items that match S1 is stored in special data register DT90037. The position of the first matching data item, counting from the starting 32-bit area S2, is stored in special data register DT90038. The starting area S2 and ending area S3 should: Be the same type of operand. Satisfy S2 S3. Data S1 is searched from S2 to S3.

Precautions during programming


If 0 or an even number is specified in S2, specify an even number in S3 as well. If an odd number is specified in S2, specify an odd number in S3 as well.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S2 > S3.

3 223
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F98 (CMPR) P98 (PCMPR)


Outline

Data table shiftout and compress

Shifts out non-zero data stored at the highest address of the table to the specified area and compresses the data in the table to the higher address. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P98 (PCMPR) is not available.
Boolean Address 10 11 Instruction ST F 98 DT DT DT R 0 0 5 10

Program example
Ladder Diagram

Trigger 10 R0 F98 CMPR , DT 0 , DT 5 , DT 10 D1


D1 D2 D3

(CMPR)

D2

D3

Starting 16-bit area of the data table Ending 16bit area of the data table 16-bit area for storing the shiftout data

Operands
Relay Operand WX WY WR WL D1 D2 D3 N/A N/A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I N/A N/A N/A Constant K N/A N/A N/A H N/A N/A N/A Index modifier A A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0R, FP and FPX.

3 224
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
If the execution condition (trigger) R0 is on, the contents of data register DT5 are sent to data register DT10. Also, in the range from DT0 to DT5, nonzero contents are stored in sequential order, starting from DT5. The 0 (zero) is set in the other areas of the data table.
[D1]
DT0 DT1

F98 (CMPR) execution 555 444 0 11 0 10 0 0 0 555 444 11


DT5 DT0

Specified data range

DT2 DT3 DT4 DT5

[D2] 10 [D3]
DT10

Description
The data in the table specified by D1 and D2 is rearranged as follows: Contents of D2 (highest address) is shifted out to the area specified by D3. Nonzero data is shifted (compressed) in sequential order, in the direction of the higher address in the specified range. D1 K3 0 K2 0 D2 K1 D2 D3 D1 0 0 0 K3 K2 K1

Starting area D1 and ending area D2 should be the same type of operand. Be sure to specify D1 and D2 with D1 D2. If all data in the data table specified by D1 and D2 is 0, 0 is set in D3.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2 D1 and D2 are not in the same memory area.

3 225
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Application example
In combination with the F99 (CMPW)/P99 (PCMPW) instruction, this can be used to construct an optional buffer. (1) Executing the F99 (CMPW)/P99 (PCMPW) instruction When data items are written to the first address of the buffer (the area of the specified range), they are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the last address of the buffer.
31 F98 (CMPR) execution 0 0 0 0 31 44 555 11 Specified data range

(2) Executing the F98 (CMPR)/P98 (PCMPR) instruction When the data in the last address of the buffer (the area of the specified range) has been read, data can be extracted in sequential order, starting from the oldest data. The rest of the data in the buffer is shifted in the direction of the first address, so normally, the oldest data at that point is stored in the last address of the buffer.
0 0 0 31 44 555 (11) 11 0 0 0 0 31 44 (555) 555

F98 (CMPR) execution

This can be used to extract valid nonzero data from the data written in random order.
0 112 Specified data range 0 0 131 0 12
1 2 3

Each time the F98 (CMPR) instruction is executed, data is extracted in sequential order, from

to

3 226
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F99 (CMPW) P99 (PCMPW)


Outline

Data table shiftin and compress

Shifts in data to the smallest address of the specified data table and compresses the data in the table toward the higher address. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P99 (PCMPW) is not available.
Boolean Address 10 11 Instruction ST F 99 DT DT DT R 0 10 0 5

Program example
Ladder Diagram

Trigger 10 R0 F99 CMPW, DT10 , DT 0 , DT 5 S


S D1 D2

(CMPW)

D1

D2

16-bit equivalent constant or 16-bit area for storing shiftin data Starting 16-bit area of the data table Ending 16-bit area of the data table

Operands
Relay Operand WX WY WR WL S D1 D2 A N/A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register IX (*2) A N/A N/A IY (*3) A N/A N/A Constant K A N/A N/A H A N/A N/A Index modifier A A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0R, FP and FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 227
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
If the execution condition (trigger) R0 is on, the contents of data register DT10 are sent to data register DT0. Also, in the range from DT0 to DT5, nonzero contents are stored in sequential order, starting from DT5. The 0 (zero) is set in the other areas of the data table.
[S] DT10 32 [D1]
DT0 DT1 DT2 DT3 DT4 DT5

F99 (CMPW) execution 555 444 0 11 0 10 0 0 32 444 11 10 Specified data range

[D2]

Note
Because the contents of S are written to DT0, the original contents of DT0 (for example, 555) are overwritten. Description
The data in the table specified by D1 and D2 is rearranged as follows: Data specified by S is shifted in to the area specified by D1 (starting address). Nonzero data is shifted (compressed) in sequential order, in the direction of the higher address in the specified range. D3 D1 K4 K3 K0 K2 K0 D2 K1 D2 D1 K0 K0 K4 K2 K1

Starting area D1 and ending area D2 should be the same type of operand. Be sure to specify D1 and D2 with D1 D2. If the content of S is 0, only a compressed shift is carried out.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2 Starting area D1 and ending area D2 are not in the same memory area.

3 228
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Application example
In combination with the F98 (CMPR)/P98 (PCMPR) instruction, this can be used to construct an optional buffer. (1) Executing the F99 (CMPW)/P99 (PCMPW) instruction When data items are written to the first address of the buffer (the area of the specified range), they are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the last address of the buffer.
31 F99 (CMPW) execution 0 0 0 0 31 44 555 11 Specified data range

(2) Executing the F98 (CMPR)/P98 (PCMPR) instruction When the data in the last address of the buffer (the area of the specified range) has been read, data can be extracted in sequential order, starting from the oldest data. The rest of the data in the buffer is shifted in the direction of the first address, so normally, the oldest data at that point is stored in the last address of the buffer.
0 0 0 31 44 555 (11) 11 F99 (CMPW) execution 0 0 0 0 31 44 (555) 555

This can be used to extract valid nonzero data from the data written in random order.
12 0 0 131 112 0 31

D1

0 0 0 0 112 131

Effective data

D2

12

Executing the F99 (CMPW) instruction causes only the valid data to be stored.

3 229
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F100 (SHR) P100 (PSHR)


Outline

Right shift of multiple bits (n bits) in a 16bit data

Shifts a specified number of bits to the right in bit units. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P100 (PSHR) is not available.
Boolean Address 10 11 Instruction ST F100 DT K R 0 (SHR) 0 4

Program example
Ladder Diagram

Trigger R0 F100 SHR , DT 0 , K 4 D


D n

10

16-bit area to be shifted to the right 16-bit equivalent constant or 16-bit area (specifies number of shifted bits)

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Shifts 4 bits in data register DT0 to the right when trigger R0 turns on. The data in bit position 3 is transferred to special internal relay R9009 (carry flag).
Bit position 15 1211 8 7 4 3 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1 DT0 R0: on Bit position 15 1211 8 7 4 3 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 DT0 In this case, the higher 4 bits of DT0 are filled with 0s. The data in bit position 3 is transferred to R9009 (carry flag).

3 230
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts n bits of the 16-bit data area specified by D to the right (to the lower bit position).
n Bit position 15 1211 8 7 4 3 0 D The data in the n th bit is transferred to R9009 (carry flag). Bit position 15 1211 8 7 4 3 0 0 0 0 0 D The higher n bits of D are filled with 0s.

When n bits are shifted to the right, The higher n bits of the 16-bit data area are filled with 0s. The data in the n th bit is transferred to special internal relay R9009 (carry flag). The n is effective only for the lower 8 bits of the 16bit data. The amount of the shift can be specified within a range of 1 bit to 255 bits.
15 1211 8 7 4 3 0 n

0 0 0 0 0 0 0 0 K0 to K255 (H00 to HFF)

Upper 8 bits are invalid

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Carry flag (R9009): Turns on for an instant when the content of bit transferred to R9009 (n th bit) is recognized as 1.

3 231
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F101 (SHL) P101 (PSHL)


Outline

Left shift of multiple bits (n bits) in a 16bit data

Shifts a specified number of bits to the left in bit units. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P101 (PSHL) is not available.
Boolean Address 10 11 Instruction ST F101 DT K R 0 (SHL) 0 4

Program example
Ladder Diagram

Trigger R0 F101 SHL , DT 0 , D


D n

10

K4 n

16-bit area to be shifted to the left 16-bit equivalent constant or 16-bit area (specifies number of shifted bits)

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Shifts 4 bits in data register DT0 to the left when trigger R0 turns on. The data in bit position 12 is transferred to special internal relay R9009 (carry flag).
Bit position 15 1211 8 7 4 3 0 DT0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1

The data in bit position 12 is transferred to R9009 Bit position 15 1211 8 7 4 3 0 (carry flag).
DT0 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0

In this case, the lower 4 bits of DT0 are filled with 0s.

3 232
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts n bits of the 16-bit area specified by D to the left (to the higher bit position). n
Bit position 15 1211 8 7 4 3 0 D The data in the n th bit is transferred to R9009 (carry flag). Bit position 15 1211 8 7 4 3 0 0 0 0 0 D n bits starting from bit position 0 are filled with 0s.

When the n bits are shifted to the left, The n bits starting from bit position 0 are filled with 0s. The data in the n th bit is transferred to special internal relay R9009 (carry flag). The n is effective only for the lower 8 bits of the 16bit data. The amount of the shift can be specified within a range of 1 bit to 255 bits.
15 1211 8 7 4 3 0 n

0 0 0 0 0 0 0 0 K0 to K255 (H00 to HFF)

Upper 8 bits are invalid

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Carry flag (R9009): Turns on for an instant when the content of bit transferred to R9009 (n th bit) is recognized as 1.

3 233
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F102 (DSHR) Right shift of n bits in a 32-bit data P102 (PDSHR)


Outline Shifts a specified number of bits to the right in bit units. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P102 (PDSHR) is not available.
Boolean Address 10 11 Instruction ST F102 DT DT R 0 10 2

Program example
Ladder Diagram

Trigger R0 10 F102 DSHR, DT10, D


D n

(DSHR)

DT 2 n

Lower 16-bit area of 32-bit data area to be shifted to the right 16-bit equivalent constant or 16-bit area (specifies number of shifted bits) Range of n: K0 to K255 (H0 to HFF)

Operands
Relay Operand WX WY WR WL D n N/A A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

3 234
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts n bits of the 32-bit data area specified by D to the right (to the lower bit position) when the trigger turns on.
[D+1] [D] [n bits] 15 0 15 0

CY
00000000

The [n bits] are filled with 0s.

The data in the nth bit is transferred to R9009 (carry flag).

When n bits are shifted to the right, The higher n bits of the 16-bit data area specified by D are filled with 0s. The data in the nth bit is transferred to special internal relay R9009 (carry flag). Only the lower eight bits of the 16-bit data [n] are effective. Select the amount of the shift within the range 1 to 255 bits.
15 0 0 0 0 0 0 0 0 0

[n] Upper 8 bits are invalid

K0 to K255(H00 to HFF)

When [n] is specified using K0, the contents of D and D+1 and the special internal relay R9009 (carry flag) do not change. When [n] is specified using K32 or higher, the contents of D and D+1 change to 0.

Flag conditions
Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Content in the nth bit from LBS (least significant bit) turns on for an instant when the bit transferred to R9009 is recognized as 1.

3 235
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F103 (DSHL) P103 (PDSHL)


Outline

Left shift of n bits in a 32-bit data

Shifts a specified number of bits to the left in bit units. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P103 (PDSHL) is not available.
Boolean Address 10 11 Instruction ST F103 DT DT R 0 10 2

Program example
Ladder Diagram

Trigger R0 10 F103 DSHL, DT10, D


D n

(DSHL)

DT 2 n

Lower 16-bit area of 32-bit data to be shifted to the left 16-bit equivalent constant or 16-bit area (specifies number of shifted bits) Range of n: K0 to K255 (H0 to HFF)

Operands
Relay Operand WX WY WR WL D n N/A A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

Description
Shifts n bits of the 32-bit area specified by D to the left (to the higher bit position) when the trigger turns on.
[D+1] [n bits] 15 CY 0 15 0 [D]

The data in the nth bit is transferred to R9009 (carry flag).

00000000

[n bits] starting from bit position 0 are filled with 0s.

When the n bits are shifted to the left, The n bits starting from bit position 0 are filled with 0s. The data in the nth bit is transferred to special internal relay R9009 (carry flag).

3 236
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Only the lower eight bits of the 16-bit data [n] are effective. Select the amount of the shift within the range 1 to 255 bits.
15 0 0 0 0 0 0 0 0 0

[n]

Upper 8 bits are invalid

K0 to K255(H00 to HFF)

When [n] is specified using K0, the contents of D and D+1 and the carry flag do not change. When [n] is specified using K32 or higher, the contents of D and D+1 change to 0.

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Content in the nth from LSB (least significant bit) turns on for an instant when the bit transferred to R9009 is recognized as 1.

3 237
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F105 (BSR) P105 (PBSR)


Outline

Right shift of one hexadecimal digit (4 bits)

Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the right. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P105 (PBSR) is not available.
Boolean Address 10 11 Instruction ST F105 DT R 0 (BSR) 0

Program example
Ladder Diagram

Trigger R0 F105 BSR , DT 0 D


D 16-bit area to be shifted to the right

10

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Shifts one hexadecimal digit (4 bits) in data register DT0 to the right when trigger R0 turns on. The data in hexadecimal digit position 1 (bit positions 0 to 3) is shifted out and transferred to the lower digit position (bit positions 0 to 3) of special data register DT9014 (with the FP0 T32, FP, FPX, FP2, FP2SH and FP10SH: DT90014).
Bit position 15 1211 8 7 4 3 0 Binary 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 Hexadecimal R0: on Bit position 15 1211 8 7 4 3 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 Binary DT0 (H999) Hexadecimal 9 0 9 9 Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 Binary DT9014/ 0 0 0 9 (H9) DT90014 Hexadecimal 9 9 9 9 (H9999)

DT0

3 238
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the right (to the lower digit position).
D Bit position 15 1211 8 7 4 3 0 Hexadecimal Digit 4 Digit 3 Digit 2 Digit 1

Bit position 15 1211 8 7 4 3 0 0 Hexadecimal Digit 4 Digit 3 Digit 2

This hexadecimal digit position becomes 0.


Bit position 15 1211 8 7 4 3 0
DT9014/ Hexadecimal DT90014

Digit 1

When one hexadecimal digit (4 bits) is shifted to the right, The data in hexadecimal digit position 1 (bit positions 0 to 3) of the 16bit area specified by D is shifted out and is transferred to the lower digit (bit positions 0 to 3) of special data register DT9014 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH and FP10SH: DT90014). The hexadecimal digit 4 (bit positions 12 to 15) of the 16-bit area specified by D becomes 0.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 239
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F106 (BSL) P106 (PBSL)


Outline

Left shift of one hexadecimal digit (4 bits)

Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the left. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P106 (PBSL) is not available.
Boolean Address 10 11 Instruction ST F106 DT R 0 (BSL) 0

Program example
Ladder Diagram

Trigger R0 F106 BSL, DT 0 D


D 16-bit area to be shifted to the left

10

Operands
Relay Operand WL WX WY WR (*1) N/A A A A Timer/Counter SV A EV A Register LD FL DT (*1) (*2) A A A Index register IX (*3) A IY (*4) A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available

D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Shifts one hexadecimal digit (4 bits) in data register DT0 to the left when trigger R0 turns on. The data in hexadecimal digit position 4 (bit positions 12 to 15) is shifted out and transferred to the lower digit position (bit positions 0 to 3) of special data register DT9014 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH and FP10SH: DT90014).
Bit position 15 1211 8 7 4 3 0 Binary 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 DT0 Hexadecimal 8 1 0 0 (H8100) R0: on Bit position 15 1211 8 7 4 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 Binary DT0 Hexadecimal 1 0 0 0 (H1000) Bit position 15 1211 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT9014/ Binary DT90014 Hexadecimal 0 0 0 8 (H8)

3 240
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the left (to the higher digit position).
D Bit position 15 1211 8 7 4 3 0 Digit 3 Digit 2 Digit 1 Hexadecimal Digit 4

Bit position 15 1211 8 7 4 3 0 0 Digit 2 Digit 1 Hexadecimal Digit 3 This hexadecimal digit position becomes 0. Bit position 15 1211 8 7 4 3 0

DT9014/ Hexadecimal DT90014

Digit 4

When one hexadecimal digit (4 bits) is shifted to the left, The data in hexadecimal digit position 4 (bit positions 12 to 15) of the 16bit data specified by D is shifted out and is transferred to the lower digit (bit positions 0 to 3) of special data register DT9014 (with the FP0 T32, FP0R, FP, FPX, FP2, FP2SH and FP10SH: DT90014). The hexadecimal digit position 1 (bit positions 0 to 3) of the 16-bit data specified by D becomes 0.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 241
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F108 (BITR) P108 (PBITR)


Outline

Right shift of multiple bits of 16-bit data range

Shifts multiple bits of a specified 16-bit data range to the right. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P108 (PBITR) is not available.
Boolean Address 10 11 Instruction ST F108 DT DT K R 0 (BITR) 10 12 4

Program example
Ladder Diagram

Trigger R0 F108 BITR, DT10, D1


D1 D2 n

10

DT12, D2

K4 n

Starting 16-bit area Ending 16-bit area 16-bit equivalent constant or 16-bit area to specify number of shifted bits

Operands
Relay Operand WX WY WR WL D1 D2 n N/A N/A A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

Explanation of example
3 words
DT12 H0212 DT11 H0030 DT10 H0232

A: Available N/A: Not Available

Shifts 4 bits in data range (3 words) from DT10 through DT12 to the right when trigger R0 turns on.

4 bits becomes 0.
H0010 H9001 H8011

4 bits are shifted out.

3 242
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts n bits of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower bit position) when the trigger turns on. Specified data range
D2 D1 The n bits are shifted out.

Trigger: on

n bits

D1 and D2 should be: The same type of operand. D1 D2. When n bits are shifted to the right, The n bits of starting 16-bit area D1 are shifted out. The n bits in the ending 16-bit area D2 becomes 0. 0 to 15 can be specified for n. When 0 is specified, no operation takes place.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2. The number n is 16 or more.

3 243
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F109 (BITL) P109 (PBITL)


Outline

Left shift of multiple bits of 16-bit data range

Shifts multiple bits of a specified 16-bit data range to the left. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P109 (PBITL) is not available.
Boolean Address 10 11 Instruction ST F109 DT DT K R 10 (BITL) 10 12 4

Program example
Ladder Diagram

Trigger R0 10 F109 BITL, DT10, D1


D1 D2 n

DT12, D2

K4 n

Starting 16-bit area Ending 16-bit area 16-bit equivalent constant or 16-bit area to specify number of shifted bits

Operands
Relay Operand WX WY WR WL D1 D2 n N/A N/A A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

Explanation of example
3 words
DT12 H0212 The 4 bits in DT12 are shifted out. H2120 H0300 H2320 DT11 H0030 DT10 H0232

A: Available N/A: Not Available

Shifts 4 bits in the data range (3 words) from DT10 through DT12 to the left when trigger R0 turns on.

The 4 bits in data becomes 0.

3 244
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts n bits of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher bit position) when the trigger turns on. Specified data range
D2 The ending n bits are shifted out. D1

Trigger: on

n bits

D1 and D2 should be: The same type of operand. D1 D2. When n bits are shifted to the left, The n bits of ending 16-bit area D2 is shifted out. The n bits in the starting 16-bit area D1 becomes 0. 0 to 15 can be specified for n. When 0 is specified, no operation takes place.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2. The number n is 16 or more.

3 245
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F110 (WSHR) Right shift of one word (16 bits) of 16-bit data range P110 (PWSHR)
Outline Shifts one word (16 bits) of a specified 16-bit data range to the right. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P110 (PWSHR) is not available.
Boolean Address 10 11 Instruction ST F110 DT DT R 0 0 2

Program example
Ladder Diagram

Trigger R0 F110 WSHR , DT 0 , DT 2 D1


D1 D2

(WSHR)

10

D2

Starting 16-bit area Ending 16-bit area

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register I N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

D1 D2

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

Explanation of example
Shifts one word (16 bits) of the data range (3 words) from DT0 through DT2 to the right when trigger R0 turns on. Specified data range (3 words)
Data register Hexadecimal DT2 0 2 1 2 DT1 0 0 3 0 DT0 0 2 3 2

The data in DT0 is shifted out.


Data register Hexadecimal DT2 0 0 0 0 DT1 0 2 1 2 DT0 0 0 3 0

3 246
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower word address). Specified data range
D2 D1 The starting word is shifted out.

D2 0 The data in the ending word becomes 0.

D1

Starting area D1 and ending area D2 should be: The same type of operand. D2. D1 When one word (16 bits) is shifted to the right, The starting word (D1) is shifted out. The data in the ending word (D2) becomes 0.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2.

3 247
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F111 (WSHL) P111 (PWSHL)


Outline

Left shift of one word (16 bits) of 16-bit data range

Shifts one word (16 bits) of a specified 16-bit data range to the left. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction (PWSHL) is not available.
Boolean Address 10 11 Instruction ST F111 DT DT R 0 0 2

Program example
Ladder Diagram

Trigger R0 F111 WSHL , DT 0 , DT 2 D1


D1 D2

(WSHL)

10

D2

Starting 16-bit area Ending 16-bit area

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register I N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

D1 D2

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

Explanation of example
Shifts one word (16 bits) of the data range (3 words) from DT0 through DT2 to the left when trigger R0 turns on.
Specified data range (3 words) Data register Hexadecimal The data in DT2 is shifted out. Data register Hexadecimal DT2 0 0 3 0 DT1 0 2 3 2 DT0 0 0 0 0 DT2 0 2 1 2 DT1 0 0 3 0 DT0 0 2 3 2

3 248
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher word address).
Specified data range D2 The ending word is shifted out. D2 D1 0 The data in the starting word becomes 0. D1

Starting area D1 and ending area D2 should be: The same type of operand. D1 D2. When one word (16 bits) is shifted to the left, The ending word (D2) is shifted out. The data in the starting word (D1) becomes 0.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2.

3 249
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F112 (WBSR) Right shift of one hexadecimal digit (4bit) P112 (PWBSR) of 16-bit data range
Outline Shifts one hexadecimal digit (4 bits) of a specified 16-bit data range to the right. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available.
Boolean Address 10 11 Instruction ST F112 DT DT R 0 0 9

Program example
Ladder Diagram

Trigger R0 F112 WBSR , DT 0 , DT 9 D1


D1 D2

(WBSR)

10

D2

Starting 16-bit area Ending 16-bit area

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register I N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

D1 D2

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

Explanation of example
Shifts one hexadecimal digit (4 bits) of the data range (10 words) from DT0 through DT9 to the right when trigger R0 turns on. Specified data range (10 words = 40 digits)
DT0 DT9 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0 0 2 1 2 0 0 2 3 2

R0: on DT9 DT0 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0 0 2 1 2 0 0 2 3 0 The higher hexdecimal digit (bit position 12 to 15) becomes 0.

The data 2 in the lower hexadecimal digit (bit positions 0 to 3) is shifted out.

3 250
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower digit position).
Specified data range D2 D1 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0

D2 D1 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0 0 The higher hexadecimal digit (bit position 12 to 15) becomes 0.

The data in the lower hexadecimal digit (bit position 0 to 3) is shifted out.

Starting area D1 and ending area D2 should be: The same type of operand. D1 D2. When the hexadecimal digit (4 bits) is shifted to the right, The data at the lower hexadecimal digit (bit positions 0 to 3) of the 16-bit data specified by D1 is shifted out. The data at the higher hexadecimal digit (bit positions 12 to 15) in the 16-bit data specified by D2 becomes 0.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2.

3 251
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F113 (WBSL) P113 (PWBSL)


Outline

Left shift of one hexadecimal digit (4bit) of 16-bit data range

Shifts one hexadecimal digit (4 bits) of a specified 16-bit data range to the left. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P113 (PWBSL) is not available.
Boolean Address 10 11 Instruction ST F113 DT DT R 0 0 9

Program example
Ladder Diagram

Trigger R0 F113 WBSL , DT 0 , DT 9 D1


D1 D2

(WBSL)

10

D2

Starting 16-bit area Ending 16-bit area

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register I N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

D1 D2

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

Explanation of example
Shifts one hexadecimal digit (4 bits) of the data range (10 words) from DT0 through DT9 to the left when trigger R0 turns on. Specified data range (10 words = 40 digits)
DT0 DT9 1211 8 7 4 3 0 15 1211 8 7 4 3 0 15 0 15 0 2 1 2 1 0 2 3 2

The data 0 in the higher hexadecimal digit (bit positions 12 to 15) is shifted out.

R0: on

DT9 DT0 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0 1 2 2 1 0 2 3 2 0

The lower hexadecimal digit (bit position 0 to 3) becomes 0.

3 252
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher digit position).
Specified data range D2 D1 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0

The data in the higher hexadecimal digit (bit position 12 to 15) is shifted out.

D2 D1 15 1211 8 7 4 3 0 15 0 15 1211 8 7 4 3 0 0 The lower hexadecimal digit (bit positions 0 to 3) becomes 0.

Starting area D1 and ending area D2 should be: The same type of operand. D1 D2. When the hexadecimal digit (4 bits) is shifted to the left, The data at the higher hexadecimal digit (bit positions 12 to 15) of the 16-bit data specified by D2 is shifted out. The data at the lower hexadecimal digit (bit positions 0 to 3) in the 16-bit data specified by D1 becomes 0.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. D1 > D2.

3 253
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F115 (FIFT) P115 (PFIFT)


Outline

FIFO buffer definition

Defines the FIFO buffer conditions. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P115 (PFIFT) is not available.
Boolean Address 10 11 12 Instruction ST DF F115 K DT (FIFT) 256 0 R 0

Program example
Ladder Diagram

Trigger R0 10 DF F115 FIFT, K 256, n


n D

DT 0 D

16-bit equivalent constant or 16bit area for specifying the memory size of FIFO buffer Starting 16-bit area of FIFO buffer

Operands
Relay Operand WX WY WR WL n D A N/A A A A A A A SV A A EV A A DT A A Timer/Counter Register LD FL (*1) A A A A Index register IX (*2) A N/A IY (*3) A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0R, FP and FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
When the execution condition (trigger) R0 is on, the area headed by DT0 is defined in the FIFO buffer area. The size of the FIFO buffer (K256) is stored in DT0, the number of data items stored is stored in DT1 (with a default value of K0), and the FIFO pointer (with a default value of H0000) is stored in DT2. When n = K256, the 256 words from DT3 to DT258 are defined as the data storage area.
15 DT0 DT1 DT2 DT3 Data storage area (256 words) 0 K256 K0 0 0 Memory size of FIFO buffer (n) FIFO pointer Transmission is enabled by the F0 (MV) Number of stored data items (words) instruction (overwriting is possible).

DT257 DT258

3 254
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
This defines the area used as the FIFO buffer. A data storage area of n words (n = K1 to K256) is defined for the area specified by D. Definition of the area using the F115 (FIFT) instruction should be carried out only once, before writing to or reading from the FIFO buffer. Normally, reading and writing are disabled while this instruction is being executed. When the F115 (FIFT) instruction is executed, the FIFO buffer area is defined as follows.
15 D D+1 D+2 D+3 0 Kn K0 0 0 Memory size of FIFO buffer (n) Number of stored data items (words) FIFO pointer 0 1 Data storage area (n words) n2
D+2+n

15

Writing pointer (0 to 255/H00 to HFF)

n1

Reading pointer (0 to 255/H00 to HFF)

When the F115 (FIFT) instruction is executed, the following are stored as default values: D = n (the value specified by the F115 (FIFT) instruction), D+1 = K0, and D+2 = H0000.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. n = 0. n > 256. The area specified by n exceeds the limit.

3 255
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F116 (FIFR) P116 (PFIFR)


Outline

Data read from FIFO buffer

Reads data from the FIFO buffer. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P116 (PFIFR) is not available.
Boolean Address 10 11 12 Instruction ST DF F116 DT DT (FIFR) 0 100 R 10

Program example
Ladder Diagram

Trigger R10 10 DF F116 FIFR, DT 0, DT 100 S


S D

Starting 16-bit area of FIFO buffer 16-bit area for storing data read from FIFO buffer

Operands
Relay Operand WX WY WR WL S D N/A N/A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register IX (*2) N/A A IY (*3) N/A A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0R, FP and FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 256
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When the execution condition (trigger) R10 is on, data is read from the FIFO buffer area headed by DT0, and is stored in DT100. When the reading pointer is 2
15 Reading DT0 pointer DT1 DT2 DT3 DT4 DT5 DT6 DT7 2 K100 K101 K102 K103 K 5 K 2 4 (H0204) 0 1 2 3 4Writing pointer F116 (FIFR) execution 15 DT0 DT1 DT2 Reading DT3 pointer DT4 moved DT5 DT6 DT7 3 K100 K101 K102 K103 K 5 K 1 4 0 1 2 3 4 DT100 K102 Read out Number of stored data items (H0304) 0 DT100 0

The contents of DT5, which is indicated by the reading pointer 2 are sent to DT100. After the data has been read, 1 is subtracted to the contents of DT1 (the number of stored data items), and the reading pointer moves to 3. (The next time that reading is carried out, the contents of DT100 are sent to DT6, indicated by the 3.)

Description
These instructions read data from the FIFO buffer headed by the area specified by S, and store it in the area specified by D. S should specify the beginning of the FIFO buffer defined by the F115 (FIFT) instruction. Reading of data is done starting from the address specified by the reading pointer when the instruction is executed.
15 S S+1 S+2 (0) Reading pointer (n2) (n1) Data storage area (n words) [D] 0 Memory size of FIFO buffer Number of stored data items (words) Upper address of reading pointer

(0), (n2) and (n1) are addresses assigned to the data storage area. n is the value specified by the F115 (FIFT) instruction. 3 257

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

The reading pointer is stored in the upper eight bits of the third word of the FIFO buffer area, and is indicated by an address in the data storage area. The actual address is the value of the leading address in the FIFO buffer area specified by S, plus 3, plus the value of reading pointer (the value of which only the first byte is a decimal value). When the reading is executed, 1 is subtracted from the number of stored data items, and the reading pointer is incremented by 1.

Notes
An error occurs if this is executed when the number of stored data items is 0. No data is set for D. Reading is only carried out when the reading pointer is not equal to the writing pointer. If this is executed when the reading pointer is indicating the final address in the FIFO buffer (the n defined by the FIFO instruction minus 1), the reading pointer is set to 0. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The size (n) of the FIFO specified by S is n = 0, or when n > 256. The number of stored data items of the FIFO = 0. The number of stored data items of the FIFO >FIFO size (n). The final address of the FIFO based on the FIFO size (n) exceeds the area. The FIFO reading pointer > FIFO size (n). The FIFO reading pointer is K256 (H100) or higher after the data has been read.

3 258
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


An error occurs if the F116 (FIFR) instruction is executed when the number of stored data items (S+1) is 0. In the program noted below, the F116 (FIFR) instruction is not executed if the number of stored data items is 0.
X0
DF R9010 F60 CMP, DT1, K0 X2 DF R900B F116 FIFR, DT0, WY4 F115 FIFT, K256, DT0

FIFO definition

Check the number of stored data items FIFO Read out

How the FIFO buffer is used


The FIFO buffer is a buffer area in which data is stored in the order in which it is written to the buffer, and from which it is then read out in the stored order, starting from the first data item stored. It is convenient for storing objects on carrier lines and buffer lines in sequential order.

Usage procedure
The area to be used is defined as the FIFO buffer using the F115 (FIFT) instruction. (This should be done only once, before reading or writing is done.) Data should be written using the F117 (FIFW) instruction, and read using the F116 (FIFR) instruction.

Writing data
When data is written, the data items are stored in sequential order, starting from the first data storage area. The writing pointer indicates the next area to which data is to be written. If the data storage area becomes full, further data writing is inhibited.

Reading data
When data is read, data is transferred starting from the first data item stored. The reading pointer indicates the next area from which data is to be read. An error occurs if an attempt is made to read data when no data has been written to the data storage area. Example of data storage area
Reading 15 pointer 0 K100 K101 K102 0 1 2 3 Writing pointer 4

If data is written in the status shown above, the data will be stored in the area indicated by 3. The writing pointer moves to 4 (the next data item will be written to 4). If data is read, it will be read from the area indicated by 0. The reading pointer moves to 1 (the next data item will be read from 1).

3 259
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F117 (FIFW) P117 (PFIFW)


Outline

Data write to FIFO buffer

Writes data to the FIFO buffer. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P117 (PFIFW) is not available.
Boolean Address 10 11 12 Instruction ST DF F117 DT DT (FIFW) 110 0 R 10

Program example
Ladder Diagram

Trigger R10 10 DF F117 FIFW, DT 110, DT 0 S


S D

16-bit equivalent constant or 16bit area for storing data to write in FIFO buffer Starting 16-bit area of FIFO buffer

Operands
Relay Operand WX WY WR WL S D A N/A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register IX (*2) A N/A IY (*3) A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0R, FP and FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

3 260
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When the execution condition (trigger) R10 is on, the contents of DT110 are written to the FIFO buffer area headed by DT0. When the writing pointer is 3
15 DT0 DT1 Read pointer DT2 DT3 DT4 DT5 DT6 DT7 0 K100 K101 K102 K500 K 5 K 3 3 0 1 2 3 4 DT110 K103 Writing Writing pointer Writing pointer (H0003) 0

F117 (FIFW) execution 15 DT0 DT1 DT2 DT3 DT4 DT5 DT6 DT7 0 K100 K101 K102 K103 K 5 K 4 4 0 1 2 3 4 Writing pointer moved DT110 K103 Number of stored data items (H0004) 0

The contents 103 of DT110 are sent to DT6, which is indicated by the pointer 3. After the data has been written, 1 is added to the contents of DT1 (the number of stored data items), and the writing pointer moves to 4. (The next time that writing is carried out, the contents of DT110 are written to DT7, indicated by the 4.)

3 261
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The 16bit data specified by S will be stored in the FIFO buffer headed by the area specified by D. D should specify the beginning of the FIFO buffer defined by the F115 (FIFT) instruction. The specified data is written to the address indicated by the writing pointer when the instruction is executed.
15 D D+1 D+2 (0) Writing pointer (n2) (n1) [S] Data storage area 0 Memory size of FIFO buffer Number of stored data items (words) Writing pointer (lower)

(0), (n2) and (n1) are addresses assigned to the data storage areas. n is the value specified by the F115 (FIFT) instruction.

The writing pointer is stored in the lower eight bits of the third word of the FIFO buffer area, and is indicated by a relative position in the data storage area. The actual address is the value of the leading address in the FIFO buffer area specified by D, plus 3, plus the value of writing pointer (the value of which only the lower byte is a decimal value). When the writing is executed, 1 is added to the number of stored data items, and the writing pointer is incremented by 1.

Notes
An error occurs if this is executed when the FIFO buffer is full (the number of stored data items = the size n of the FIFO defined by the FIFT instruction). Writing is inhibited. If this is executed when the writing pointer is indicating the final address in the FIFO buffer (the n value defined by the FIFT instruction), the writing pointer will be set to 0.

3 262
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The size (n) of the FIFO specified by D is n = 0, or when n > 256. The number of stored data items of the FIFO > FIFO size (n). The final address of the FIFO based on the FIFO size (n) exceeds the area. The writing pointer of the FIFO > FIFO size (n). The FIFO writing pointer is K256 (H100) or higher after the data has been written.

How the FIFO buffer is used


The FIFO buffer is a buffer area in which data is stored in the order in which it is written to the buffer, and from which it is then read out in the stored order, starting from the first data item stored. It is convenient for storing objects on carrier lines and buffer lines in sequential order.

Usage procedure
The area to be used is defined as the FIFO buffer using the F115 (FIFT) instruction. (This should be done only once, before reading or writing is done.) Data should be written using the F117 (FIFW) instruction, and read using the F116 (FIFR) instruction.

Writing data
When data is written, the data items are stored in sequential order, starting from the first data storage area. The writing pointer indicates the next area to which data is to be written. If the data storage area becomes full, further data writing is inhibited.

Reading data
When data is read, data is transferred starting from the first data item stored. The reading pointer indicates the next area from which data is to be read. An error occurs if an attempt is made to read data when no data has been written to the data storage area.
Example of data storage area Reading 15 pointer 0 K100 K101 K102 0 1 2 3 Writing pointer 4

If data is written in the status shown above, the data will be stored in the area indicated by 3. The writing pointer moves to 4 (the next data item will be written to 4). If data is read, it will be read from the area indicated by 0. The reading pointer moves to 1 (the next data item will be read from 1).

3 263
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when using this instruction


If data is received which exceeds the capacity of the buffer, an operation error will occur.

Example:

If the writing pointer is at the end of the FIFO buffer


DT0 DT1 Reading pointer DT3 DT2 0 K100 K101 K102 K103 K 5 K 4 4 0 1 2 3 4 WR0 K104 Writing

DT4 DT5 DT6 DT7

Execution of F117 (FIFW) instruction DT0 DT1 DT2 DT3 DT4 DT5 DT6 DT7 0 K100 K101 K102 K103 K104 K 5 K 5 0 0 1 2 3 4 Number of stored data Writing pointer Writing pointer shifts

When the F117 (FIFW) instruction is executed, after data is written to the final address (4) in the buffer, the writing pointer becomes the first address (0).

3 264
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example:

When the writing pointer has made one complete cycle


DT0 DT1 DT2 Reading pointer DT3 DT4 DT5 DT6 DT7 0 K100 K101 K102 K103 K104 K 5 K 5 0 0 1 2 3 4 Execution of F117 (FIFW) instruction DT0 DT1 DT2 DT3 DT4 DT5 DT6 DT7 0 K100 K101 K102 K103 K104 K 5 K 5 0 0 Writing pointer 1 cycle 1 2 3 4 Writing WR0 K105

An error occurs, and processing is not carried out.

Because the number of data items stored in the FIFO buffer (DT1=5) exceeds the size of the FIFO buffer (DT0=5), the operation is not executed, and an operation error occurs.

3 265
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Measures to avoid operation errors


Do not execute the F117 (FIFW) instruction using the comparison instruction. Avoid executing the F117 (FIFW) instruction when the size of the FIFO buffer (DT0) is equal to the number of data items stored in the buffer (DT1).
X0
DF F115 FIFT, K 5, DT0

R9010 F60, DT0, DT1 R900B R0

X1 DF

R0 F117 FIFW, WR0, DT0

Execute the F117 (FIFW) instruction after executing the F116 (FIFR) instruction.
X0
DF F115 FIFT, K 5, DT0

R9010 F60, DT0, DT1 R900B R0

X1 DF

R0 F117 FIFW, WR0, DT0

R9010 F60, DT1, K 0 R900B R1

X2 DF R0

R1 F116 FIFR, DT0, WY4

3 266
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F118 (UDC)
Outline Program example

UP/DOWN counter

Sets the UP/DOWN counter.


Boolean Address 50 Instruction ST ST ST F118 DT DT 58 ST= DT K OT S D Y 0 0 50 R R R 0 1 2 (UDC) 10 0

Ladder Diagram

50 51 52

R0 UP/DOWN input R1 Count input R2 =, Reset input DT 0, K 0 S D

F118 UDC DT 10 DT 0 Y50

51 52 53

63

16-bit equivalent constant or 16-bit area for counter preset value 16-bit area for counter elapsed value

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register I N/A N/A Constant K A N/A H A N/A Index modifier N/A N/A A: Available N/A: Not Available

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

3 267
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The program on the preceding page shows an example in which initial values are set, and when the target value is 0, external output Y50 goes on. This can be used, for example, in programs such as those that cause a display lamp to light when the work being added or subtracted has reached a certain quantity. 1) 2) When the trailing edge of rest input X2 is detected (on off), data (target value) in data register DT10 is transferred to DT0. One is subtracted from value of DT0 when the count input R1 turns on while R0 is in the off state. (DOWN counter operation) One is added to DT0 when the count input R1 turns off while the UP/DOWN input R0 is in the on state. (Up counter operation) If the counter elapsed value area DT0 = K0, external output Y50 turns on.

3)

on R2 off on R0 off on R1 off on Y50 off Value of DT0

Reset

Preset

Time

Description
The counter is switched between an incremental count (addition) or decremental count (subtraction) by turning the relay specified for up/down input on or off. When the up/down input is on, the incremental counter (+1) is effective, and when it is off, the decremental counter (1) is effective. The elapsed value is stored in the area specified by the D. The preset value in S is transferred to D when the trailing edge of the reset input is detected (on off). Set value range K-32768 to K32767 (H8000 to H7FFF) When the count input is switched from off to on (the reset input is in off state), the value specified for the D is initialized, and the counting operation begins. The elapsed value area of D is cleared when the reset input turns on. The results of the counting operation can be determined by comparing the elapsed value of D with the specified value, using the data comparison instruction. The data comparison instruction should be executed immediately following execution of F118 (UDC) instruction. 3 268
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


If the elapsed value area has been specified as a hold type memory area, the elapsed value acts in accordance with the contents being retained. Be aware that, when an operation is begun, the set values are not automatically preset to the elapsed value area. To preset these values, the reset input must be switched from the on to the off state. When combining the F118 (UDC) instruction with an AND stack instruction or POP stack instruction, be careful that the programming is correct.

Cautions on count input detection


In a F118 (UDC) instruction, the increment or decrement takes place when the rise of the count input from off to on is detected. If the count input remains continuously on, since counting will only take place at the rise, no further counting will take place. In cases where the count input is initially on such as when the mode is changed to RUN or the power is turned on with the mode set to RUN, increment or decrement operation will not take place at the first scan.
RUN (Power: on) Count intput Operation of instruction

No count done

Count done

When you use the F118 (UDC) instruction with one of the following instructions that changes the order of the execution of instructions, be aware that the operation of the instructions will differ depending on the timing of their execution and their count input. MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instructions

3 269
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F119 (LRSR)
Outline Program example

Left/right shift register

Shifts one bit of the 16-bit data range to the left or right.
Boolean Address 50 Instruction ST ST ST ST F119 DT DT R R R R 0 1 2 3 0 9

Ladder Diagram

50 51 52 53

Left/right input R0 (on: left, off: right) R1 Data input R2 R3 Shift input Reset input D1 D2

F119 LRSR DT 0 DT 9

51 52 53 54

(LRSR)

D1 D2

Starting 16-bit area whose one bit is shifted to the left or to the right Ending 16-bit area whose one bit is shifted to the left or to the right

Operands
Relay Operand WL WX WY WR (*1) N/A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A Index modifier N/A N/A A: Available N/A: Not Available

D1 D2

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

3 270
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Left shift operation
DT9 DT0

Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 Data 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1


Shifted-out bit is transferred to R9009 (carry flag).

15 . . 12 11 . . 8 7 . . 4 3 . . 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0
R0: on R2: off on

Bit position 15 . . 1211 . . 8 7 . . 4 3 . . 0 Data 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0


DT9

15 . . 12 11 . . 8 7 . . 4 3 . . 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0
DT0

When data input R1 turns on, 1 is shifted into bit position 0. When data input R1 turns off, 0 is shifted into bit position 0. Right shift operation
DT9 DT0

Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0 Data 0001 0001 0001 0001

15 . .12 11 . . 8 7 . . 4 3 . . 0 1000 1000 1000 1100


R0: off R2: off on

Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 1000 1000 1000 1000 Data


DT9

15 . .12 11 . . 8 7 . . 4 3 . . 0 0100 0100 0100 0110


DT0 Shifted-out bit is transferred to R9009 (carry flag).

When data input R1 turns on, 1 is shifted into bit position 15. When data input R1 turns off, 0 is shifted into bit position 15.

Description
This shift register changes direction, either left (direction of MSB) or right (direction of LSB), in which a shift of one bit is made, based on the on/off status of the relay specified by the left/right shift input. The shift operation is made to the left when the left/right shift input is on, and to the right when off. Specify D1 and D2 so they are in the same type data area and be sure to set the data area addresses so that D1 D2. When the shift input changes from off to on (the reset input is off), the contents of the area specified by D1 and D2 are shifted one bit to the left or right. When the data is shifted, 1 will be set in the empty bit left by the shift (the uppermost or lowermost bit) if the data input is on, and 0 if the data input is off. Also, the bit extracted by the shift (the uppermost bit for a shift to the left, and the lowermost bit for a shift to the right) will be set in the special internal relay R9009 (carry flag). If the reset input is on, the contents of the specified area are cleared to 0.

3 271
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the starting 16-bit area (D1) is larger than the area specified by the ending 16-bit area (D2) (when D1 > D2). Turns on for an instant when the area specified using the starting 16-bit area (D1) is larger than the area specified by the ending 16-bit area (D2) (when D1 > D2).

Error flag (R9008):

Carry flag (R9009): Turns on for an instant when the bit shifted-out is 1.

Cautions on shift input detection


In a F119 (LRSR) instruction, shift takes place when the offon rise of the shift input is detected. If the shift input remains continuously on, a shift will only take place at the rise. No further shifts will take place. In cases where the shift input is initially on such as when the mode is changed to RUN or when the power is turned on with the mode set to RUN, a shift will not take place at the first scan.
RUN (Power: on) Shift input Operation of instruction No shift made Shift made

When you use the F119 (LRSR) instruction with one of the following instructions that changes the order of the execution of instructions, be aware that the operation of the instructions will differ depending on the timing of their execution and their shift input. MC to MCE instructions JP to LBL instructions F19 (SJP) to LBL instructions LOOP to LBL instructions CNDE instruction Step ladder instructions Subroutine instructions

Precautions during programming


When combining the F119 (LRSR) instruction with an AND stack instruction or POP stack instruction, be careful that the programming is correct.

3 272
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 273
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F120 (ROR) P120 (PROR)


Outline

16-bit data right rotation

Rotates a specified number of bits in specified 16-bit data to the right. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P120 (PROR) is not available.
Boolean Address 10 11 Instruction ST F120 DT K R 0 (ROR) 0 4

Program example
Ladder Diagram

Trigger R0 F120 ROR , DT 0 , K 4 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify number of bits to be rotated

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Rotates 4 bits in data register DT0 to the right when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0 DT0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 R0: on Bit position 15 12 11 8 7 4 3 0 DT0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1

Special internal relay R9009 (carry flag)

0
Data in bit position 3

3 274
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 16-bit data specified by D to the right.

Example:

Rotates 1 bit to the right


Bit position 15 1211 8 7 4 3 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D

Bit position 15 1211 8 7 4 3 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 D

Special internal relay R9009 (carry flag)

Data in bit position 0

When n bits are rotated to the right, The data in bit position n-1 (n th bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 0 are shifted out to the right and then shifted into the higher bit positions of the 16-bit data specified by D. For n, only the lower 8 bits in the 16 bit data are valid.
15 n

0 0 0 0 0 0 0 0 0 Range of n: K0 to K255 (H00 to HFF)

Upper 8 bits are invalid

Precaution during programming


If the specified n is a multiple of 16 bits, the data will be the same as that before the operation. e.g., n = K16: same operation as n = K0 (The carry flag does not change, either.) n = K17: same operation as n = K1 n = K32: same operation as n = K0 (The carry flag does not change, either.) n = K33: same operation as n = K1

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Carry flag (R9009): Turns on for an instant when the data in bit position n-1 is recognized as 1.

3 275
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F121 (ROL) P121 (PROL)


Outline

16-bit data left rotation

Rotates a specified number of bits in specified 16-bit data to the left. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P121 (PROL) is not available.
Boolean Address 10 11 Instruction ST F121 DT K R 0 (ROL) 0 4

Program example
Ladder Diagram

Trigger R0 F121 ROL , DT 0 , K 4 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify number of bits to be rotated

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. (*4) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Rotates 4 bits in data register DT0 to the left when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0 DT0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 R0: on Bit position 15 12 11 8 7 4 3 0 DT0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1

Special internal relay R9009 (carry flag)

Data in bit position 12

3 276
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 16-bit data specified by D to the left.

Example:

Rotates 1 bit to the left


Bit position 15 12 11 8 7 4 3 0 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Bit position 15 12 11 8 7 4 3 0 D 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10

Special internal relay R9009 (carry flag)

Data in bit position 15

When n bits are rotated to the left, The data in bit position 16-n (n th bit starting from bit position 15) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 15 are shifted out to the left and then shifted into the lower bit positions of the 16-bit data specified by D. For n, only the lower 8 bits in the 16 bit data are valid.
15 n

0 0 0 0 0 0 0 0 0 Range of n: K0 to K255 (H00 to HFF)

Upper 8 bits are invalid

Precaution during programming


If the specified n is a multiple of 16 bits, the data will be the same as that before the operation. e.g., n = K16: same operation as n = K0 (The carry flag does not change, either.) n = K17: same operation as n = K1 n = K32: same operation as n = K0 (The carry flag does not change, either.) n = K33: same operation as n = K1

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Carry flag (R9009): Turns on for an instant when the data in bit position 16-n is recognized as 1.

3 277
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F122 (RCR) P122 (PRCR)


Outline

16-bit data right rotation with carry flag data

Rotates a specified number of bits in the specified 16-bit data to the right together with carry flag data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P122 (PRCR) is not available.
Boolean Address 10 11 Instruction ST F122 DT K R 0 (RCR) 0 4

Program example
Ladder Diagram

Trigger R0 F122 RCR , DT 0 , K 4 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify number of bits to be rotated

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Rotates 4 bits in data register DT0 together with carry flag data 1 to the right when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 DT0 R0: on n-1: 3 bits Bit position 15 12 11 8 7 4 3 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 DT0 Carry flag data 1 Special internal relay R9009 (carry flag)

0
Data in bit position 3

3 278
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 16-bit data specified by D, including carry flag data, to the right.

Example:

Rotates 1 bit to the right


Bit position 15 1211 8 7 4 3 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D

Bit position 15 1211 8 7 4 3 0 D 0 0 1 0 1 0 1 0 1 0 1 0 1 0 10 Carry flag data 0 Special internal relay R9009 (carry flag)

When n bits with carry flag data are rotated to the right, The data in bit position n-1 (n th bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 0 are shifted out to the right and then carry flag data and the n-1 bits starting from bit position 0 are shifted into the higher bit positions of the 16-bit data specified by D. For n, only the lower 8 bits in the 16 bit data are valid.
15 n

0 0 0 0 0 0 0 0 0 Range of n: K0 to K255 (H00 to HFF)

Upper 8 bits are invalid

Precaution during programming


If the specified n is a multiple of 17 bits, the data will be the same as that before the operation. e.g.,n = K17: same operation as n = K0 n = K18: same operation as n = K1 n = K34: same operation as n = K0 n = K35: same operation as n = K1

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Carry flag (R9009): Turns on for an instant when the data in bit position n-1 is recognized as 1.

3 279
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F123 (RCL) P123 (PRCL)


Outline

16-bit data left rotation with carry flag data

Rotates a specified number of bits in the specified 16-bit data to the left together with carry flag data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P123 (PRCL) is not available.
Boolean Address 10 11 Instruction ST F123 DT K R 0 (RCL) 0 4

Program example
Ladder Diagram

Trigger R0 F123 RCL , DT 0 , K 4 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify number of bits to be rotated

Operands
Relay Operand WX WY WR D n (*1) (*2) (*3) (*4) N/A A A A A A WL (*1) A A Timer/Counter SV A A EV A A Register DT A A LD FL (*1) (*2) A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Rotates 4 bits in data register DT0 together with carry flag data 1 to the left when trigger R0 turns on.
Bit position 15 12 11 8 7 4 3 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 DT0 R0: on Bit position 15 12 11 8 7 4 3 0 DT0 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 Carry flag data 1 Special internal relay R9009 (carry flag) Data in bit position 12

3 280
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 16-bit data specified by D, including carry flag data, to the left.

Example:

Rotates 1 bit to the left


Bit position 15 12 11 8 7 4 3 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D

Bit position 15 12 11 8 7 4 3 0 D 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 Carry flag data 0 Special internal relay R9009 (carry flag)

When n bits with carry flag data are rotated to the left, The data in bit position 16-n (n th bit starting from bit position 15) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 15 are shifted out to the left and then carry flag data and the n-1 bits starting from bit position 15 are shifted into the lower bit positions of the 16-bit data specified by D. For n, only the lower 8 bits in the 16 bit data are valid.
15 n

0 0 0 0 0 0 0 0 0 Range of n: K0 to K255 (H00 to HFF)

Upper 8 bits are invalid

Precaution during programming


If the specified n is a multiple of 17 bits, the data will be the same as that before the operation. e.g.,n = K17: same operation as n = K0 n = K18: same operation as n = K1 n = K34: same operation as n = K0 n = K35: same operation as n = K1

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

Carry flag (R9009): Turns on for an instant when the data in bit position 16-n is recognized as 1.

3 281
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F125 (DROR) 32-bit data right rotation P125 (PDROR)


Outline Rotates a specified number of bits in specified 32-bit data to the right. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P125 (PDROR) is not available.
Boolean Address 10 11 Instruction ST F125 DT K R 0 10 4

Program example
Ladder Diagram

Trigger R0 10 F125 DROR, DT10, D


D n

(DROR)

K4 n

Lower 16-bit area of 32-bit data 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Range of n: K0 to K255 (H0 to HFF)

Operands
Relay Operand WX WY WR WL D n N/A A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

Explanation of example
Rotates 4 bits in data registers DT11 and DT10 to the right when trigger R0 turns on. When 4 bits are rotated to the right, the data in bit position 3 is transferred to special internal relay R9009 (carry flag). 31 [DT11, DT10]
R0: on
28 27

8 7
1100

43
1011

0
CY

1010

[DT11,DT10]

1011

1010

1100

3 282
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 32-bit data specified by D to the right when the trigger turns on. [D+1]
15 0 15

[D]
0

Trigger: on

CY

Data in bit position 0 of D

When n bits are rotated to the right, The data in bit position n-1 (nth bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 0 are shifted out to the right and then shifted into the higher bit positions of the 32-bit data specified by D. Only the lower eight bits of the 16-bit data n are effective.
15 0 0 0 0 0 0 0 0 0

Upper 8 bits K0 to K255(H00 to HFF) are invalid When n is specified using K0, the contents of D+1, D and the special internal relay R9009 (carry flag) do not change.

Precautions during programming


If the specified n is a multiple of 32 bits, the data will be the same as that before the operation. e.g.,n = K32: same operation as n = K0

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Content in the nth bit from LSB (least significant bit) turns on for an instant when the data in bit position n-1 is recognized as 1.

3 283
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F126 (DROL) 32-bit data left rotation P126 (PDROL)


Outline Rotates a specified number of bits in specified 32-bit data to the left. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P126 (PDROL) is not available.
Boolean Address 10 11 Instruction ST F126 DT K R 0 10 4

Program example
Ladder Diagram

Trigger R0 10 F126 DROL, DT10, D


D n

(DROL)

K4 n

Lower 16-bit area of 32-bit data 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Range of n: K0 to K255 (H0 to HFF)

Operands
Relay Operand WX WY WR WL D n N/A A A A A A A A SV A A EV A A DT A A Timer/Counter Register FL LD (*1) A A A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

Explanation of example
Rotates 4 bits in data registers DT11 and DT10 to the left when trigger R0 turns on. The data in bit position 28 is transferred to special internal relay R9009 (carry flag).
31 28 27 24 23 4 3 0

[DT11, DT10] 1 0 1 0 1 1 0 0
R0: on
CY

1 0 1 1

[DT11, DT10]

1100

1011

1010

3 284
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 32-bit data specified by D to the left when the trigger turns on. [D+1]
15 0 15

[D]
0

CY

Trigger: on

Content of MSB When n bits are rotated to the left, The data in bit position 32-n (nth bit starting from bit position 31) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 31 are shifted out to the left and then shifted into the lower bit positions of the 16-bit data specified by D. Only the lower eight bits of the 16-bit data n are effective.
15 0 0 0 0 0 0 0 0 0

Upper 8 bits K0 to K255(H00 to HFF) are invalid When n is specified using K0, the contents of D+1, D and the special internal relay R9009 (carry flag) do not change.

Precautions during programming


If the specified n is a multiple of 32 bits, the data will be the same as that before the operation. e.g.,n = K32: same operation as n = K0

Flag conditions
Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Content in the nth bit from MBS (most significant bit) turns on for an instant when the data in bit position 32-n is recognized as 1.

3 285
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F127 (DRCR) 32-bit data right rotation with carry flag data P127 (PDRCR)
Outline Rotates a specified number of bits in the specified 32-bit data to the right together with carry flag data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P127 (PDRCR) is not available.
Boolean Address 10 11 Instruction ST F127 DT K R 0 10 4

Program example
Ladder Diagram

Trigger R0 10 F127 DRCR, DT10, D


D n

(DRCR)

K4 n

Lower 16-bit area of 32-bit data 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Range of n: K0 to K255 (H0 to HFF)

Operands
Relay Operand WX WY WR WL D n N/A A A A A A A A SV A A EV A A DT A A Timer/Counter Register FL LD (*1) A A A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

Explanation of example
Rotates 4 bits in data registers DT11 and DT10 together with carry flag data to the right when trigger R0 turns on. The data in bit position 3 is transferred to the carry flag (special internal relay R9009). The data of the carry flag (special internal relay R9009) is transferred to the bit position 28.
31 28 27 8 7 43 0

[DT11, DT10] 1 0 1 0
Carry flag

1100 0

011
Carry flag

1 @ 0111 1010 1100

@ 0

R0: on

[DT11, DT10]

3 286
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 32-bit data specified by D, including carry flag data, to the right when the trigger turns on. [D+1]
15 0 15

[D]
0
Carry flag

Trigger: on Data in bit position 0 of D

When n bits with carry flag data are rotated to the right, The data in bit position n-1 (nth bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 0 are shifted out to the right and then carry flag data and the n-1 bits starting from bit position 0 are shifted into the higher bit positions of the 32-bit data specified by D. Only the lower eight bits of the 16-bit data n are effective.
15 0 0 0 0 0 0 0 0 0

n Upper 8 bits are invalid

K0 to K255(H00 to HFF)

When n is specified using K0, the contents of D+1 and D and the carry flag do not change.

Precautions during programming


If the specified n is a multiple of 33 bits, the data will be the same as that before the operation. e.g.,n = K33: same operation as n = K0

Flag conditions
Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Content in the nth bit from LSB (least significant bit) turns on for an instant when the data in bit position n-1 (nth bit starting from bit position 0) is recognized as 1.

3 287
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F128 (DRCL) 32-bit data left rotation with carry flag data P128 (PDRCL)
Outline Rotates a specified number of bits in the specified 32-bit data to the left together with carry flag data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P128 (PDRCL) is not available.
Boolean Address 10 11 Instruction ST F128 DT K R 0 10 4

Program example
Ladder Diagram

Trigger R0 10 F128 DRCL, DT10, D


D n

(DRCL)

K4 n

Lower 16-bit area of 32-bit data 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Range of n: K0 to K255 (H0 to HFF)

Operands
Relay Operand WX WY WR WL D n N/A A A A A A A A SV A A EV A A DT A A Timer/Counter Register FL LD (*1) A A A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A A A N/A

(*1) This cannot be used with the FP0R, FP and FPX.

A: Available N/A: Not Available

Explanation of example
Rotates 4 bits in data registers DT11 and DT10 together with carry flag data to the left when trigger R0 turns on. The data in bit position 28 is transferred to carry flag (special internal relay R9009). The data of the carry flag is transferred to the bit position 3.
31 28 27 24 23 4 3 0

[DT11, DT10]
@
Carry flag

101 0

1100

1011

Carry flag

1 @ 1100 1011 1101

R0: on

[DT11, DT10]

3 288
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Rotates n bits of the 32-bit data specified by D, including carry flag data, to the left when the trigger turns on. [D+1]
Carry flag

[D]
0 15 0

15

Content of MSB

Trigger: on

When n bits with carry flag data are rotated to the left, The data in bit position 32-n (nth bit starting from bit position 31) is transferred to special internal relay R9009 (carry flag). n bits starting from bit position 31 are shifted out to the left and then carry flag data and the n-1 bits starting from bit position 31 are shifted into the lower bit positions of the 32-bit data specified by D. Only the lower eight bits of the 16-bit data n are effective.
15 0 0 0 0 0 0 0 0 0

Upper 8 bits K0 to K255(H00 to HFF) are invalid When n is specified using K0, the contents of D+1 and D and the carry flag do not change.

Precautions during programming


If the specified n is a multiple of 33 bits, the data will be the same as that before the operation. e.g.,n = K33: same operation as n = K0

Flag conditions
Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Content in the nth bit from MSB (most significant bit) turns on for an instant when the data in bit position 31-n is recognized as 1.

3 289
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F130 (BTS) P130 (PBTS)


Outline

16-bit data bit set

Turns on a specified bit of 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P130 (PBTS) is not available.
Boolean Address 10 11 Instruction ST F130 DT DT R 0 (BTS) 0 2

Program example
Ladder Diagram

Trigger R0 F130 BTS , DT 0 , DT 2 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify bit position

Operands
Relay Operand WX WY WR D n (*1) (*2) (*3) (*4) N/A A A A A A WL (*1) A A Timer/Counter SV A A EV A A Register DT A A LD FL (*1) (*2) A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Turns on bit position specified by DT2 in data register DT0 when trigger R0 turns on. When the DT2 = K7, as shown below.
[n] DT2: K7 [D] Bit position 15 12 11 8 7 4 3 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 DT0 R0: on Bit position 15 12 11 8 7 4 3 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 DT0 [D] Bit position 7 is turned on (1) when R0 turns on. (Bits other than the specified bit do not change.)

3 290
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Turns on the bit of 16-bit data specified by D and n. Bits other than the specified bit do not change. The n is decimal data specifying the bit position to be turned on. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0 n The data in bit positions 4 through 15 are invalid.

Range of n: K0 to K15 (H0 to HF)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 291
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F131 (BTR) P131 (PBTR)


Outline

16-bit data bit reset

Turns off a specified bit of 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P131 (PBTR) is not available.
Boolean Address 10 11 Instruction ST F131 DT DT R 0 (BTR) 0 2

Program example
Ladder Diagram

Trigger R0 F131 BTR , DT 0 , DT 2 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify bit position

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Turns off the bit specified by DT2 of data register DT0 when trigger R0 turns on. When the DT2 = K7, as shown below.
[n] DT2: K7 Bit position 15 [D] DT0 12 11 8 7 4 3 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 R0: on Bit position 15 12 11 8 7 4 3 0 1 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 [D] DT0 Bit position 7 is turned off (0) when R0 turns on. (Bits other than the specified bit do not change.)

3 292
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Turns off the bit of 16-bit data specified by D and n. Bits other than the specified bit do not change. The n is decimal data specifying the bit position to be turned off. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0 n The data in bit positions 4 through 15 are invalid.

Range of n: K0 to K15 (H0 to HF)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 293
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F132 (BTI) P132 (PBTI)


Outline

16-bit data bit invert

Inverts a specified bit in 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P132 (PBTI) is are not available.
Boolean Address 10 11 Instruction ST F132 DT DT R 0 (BTI) 0 10

Program example
Ladder Diagram

Trigger R0 F132 BTI , DT 0 , DT 10 D


D n 16-bit area

10

16-bit equivalent constant or 16-bit area to specify bit position

Operands
Relay Operand WX WY WR D n (*1) (*2) (*3) (*4) N/A A A A A A WL (*1) A A Timer/Counter SV A A EV A A Register DT A A LD FL (*1) (*2) A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Inverts the state of bit specified by DT10 in data register DT0 when trigger R0 turns on. When the DT10 = K7, as shown below.
[n] DT10: K7 [D] Bit position 15 12 11 8 7 4 3 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 DT0 R0: on [D] Bit position 15 12 11 8 7 4 3 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 DT0 Condition of bit position 7 is inverted [off (0) on (1)] when R0 turns on.

(Bits other than the specified bit are not changed.)

3 294
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Inverts [off (0) on (1) or on (1) off (1)] the state at bit position specified by n in the 16-bit area specified by D. Bits other than the specified bit are not inverted. The n is decimal data specifying the bit position to be inverted. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0 n 0 0 0 0 The data in bit positions 4 through 15 are invalid.

Range of n: K0 to K15 (H0 to HF)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 295
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F133 (BTT) P133 (PBTT)


Outline

16-bit data bit test

Checks the state [on (1) or off (0)] of the specified bit in 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P133 (PBTT) is not available.
Boolean Address 10 Instruction ST F133 DT DT 16 17 18 D n 16-bit area 16-bit equivalent constant or 16-bit area to specify bit position ST AN OT R R R 0 (BTT) 0 2 0 10 R 900B

Program example
Ladder Diagram

Trigger 10 16 R0 R0 R900B D n

11

F133 BTT , DT 0 , DT 2 R10

Operands
Relay Operand WL WX WY WR (*1) N/A A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

D n (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Checks the state [on (1) or off (0)] of bit specified by DT2 in data register DT0 when trigger R0 turns on. If bit specified by DT2 is in the off (0) state, internal relay R10 goes on. When the DT2 = K7, as shown below. [n] DT2:K7 [D]
Bit position 15 12 11 8 7 4 3 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 DT0 The state of bit position 7 is checked.

If bit position 7 is in the off state (0), R900B turns on and internal relay R10 goes on.

3 296
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Checks the state [on (1) or off (0)] of bit position specified by n in the 16-bit data specified by D. The judgment result is output to special internal relay R900B (=flag). The specified bit is checked by special internal relay R900B. When the specified bit is on (1), special internal relay R900B (= flag) turns off. When the specified bit is off (0), special internal relay R900B (= flag) turns on. The n is decimal data specifying the bit position to be checked. Range of n: K0 to K15
Bit position 15 12 11 8 7 4 3 0 0 0 0 0 n The data in bit positions 4 through 15 are invalid.

Range of n: K0 to K15 (H0 to HF)

Precaution when the judgement flag R900B is used two or more times
The judgment flag R900B is updated each time an operation instruction or comparison instruction is executed. If the judgment flag is used two or more times, the program in which the judgment flag is used should be input immediately following the instruction which executes the judgment. the flag should be output to output relays or internal relays for each separate instruction.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the specified bit to be checked is in the off (0) state.

3 297
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F135 (BCU) P135 (PBCU)


Outline

Number of on (1) bits in 16-bit data

Counts the number of bits in the on (1) state in the specified 16-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P135 (PBCU) is not available.
Boolean Address 10 11 Instruction ST F135 DT DT R 0 (BCU) 10 20

Program example
Ladder Diagram

Trigger 10 R0 F135 BCU , DT10 , DT 20 S


S D

16-bit equivalent constant or 16-bit area (source) 16-bit area (destination) for storing the number of bits in the on (1) state

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY (*4) A A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
Counts the number of bits in the on (1) state in data register DT10 when trigger R0 turns on. The number of on (1) bits is stored in data register DT20. DT10
Bit position 15 12 11 8 7 4 3 0 Binary data 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 The number of on (1) bits is 5.

The K5 is stored in data register DT20 when R0 turns on.

3 298
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Counts the number of bits in the on (1) state in the 16-bit data specified by S. The counted result (number of on (1) bits) is stored in the 16-bit area specified by D. The results are stored in decimal number.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 299
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F136 (DBCU) Number of on (1) bits in 32-bit data P136 (PDBCU)


Outline Counts the number of bits in the on (1) state in specified 32-bit data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P136 (PDBCU) is not available.
Boolean Address 10 11 Instruction ST F136 DT DT R 0 10 20

Program example
Ladder Diagram

Trigger 10 R0 F136 DBCU , DT10 , DT20 S


S D

(DBCU)

32-bit equivalent constant or lower 16-bit area of 32-bit data (source) 16-bit area (destination) for storing the number of bits in the on (1) state

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Counts the number of bits in the on (1) state in data register DT11 and DT10 when trigger R0 turns on. The number of on (1) bits is stored in data register DT20. DT11 DT10
Bit position 15 12 11 8 7 4 3 0 15 12 11 8 7 4 3 0 Binary data 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 The number of on (1) bits is 9.

The K9 is stored in data register DT20 when R0 turns on.

3 300
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Counts the number of bits in the on (1) state in the 32-bit data specified by S. The counted result (number of on (1) bits) is stored in the 16-bit area specified by D. The results are stored in decimal number.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 301
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F137 (STMR)
Outline Program example

Auxiliary timer (16bit)

Sets the 16bit ondelay timer for 0.01 s units (0.01 to 327.67 s)
Boolean Address 10 Instruction ST F137 DT DT 16 OT R R 0 10 20 5

Ladder Diagram

Trigger 10 R0 F137 STMR , DT10 , DT20 S


S D

R5 D

11

(STMR)

16-bit equivalent constant or 16-bit area for timer set value 16-bit area for timer elapsed value

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A N/A IY (*4) A N/A Constant K A N/A H A N/A Index modifier N/A N/A A: Available N/A: Not Available

S D (*1) (*2) (*3) (*4)

This cannot be used with the FP0 and FPe. This cannot be used with the FP0, FPe, FP0R, FP, FPX. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC. With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is ID.

Explanation of example
When the execution condition (trigger) has been fulfilled, the auxiliary timer is activated, and when the value stored in DT10 x 0.01 seconds has elapsed, R5 goes on.

Description
This functions as a 0.01second unit on delay timer. When the execution condition (trigger) is on, subtraction is carried out for the specified time, and when the elapsed value D reaches 0, the special internal relay R900D turns on. (The special internal relay R900D turns off when the execution condition (trigger) is off, and while subtraction is being carried out.) With FP2/FP2SH/FP10SH, the OT instruction can be stated immediately following the auxiliary timer. When the execution condition (trigger) goes on, the set time is subtracted, and when the elapsed value D reaches 0, the relay being used with the OT instruction goes on at the same time that the special internal relay R900D goes on. When the execution condition (trigger) is off, the elapsed value area is cleared to 0, and relays being used are turned off by the OT instruction.

3 302
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

When the time set for the special internal relay R900D has elapsed, the relay is turned on. R900D can also be used as a timer contact. (The relay is off when the execution condition (trigger) is off, and while subtraction is being carried out.)
R0 R900D F137 STMR, DT10,DT20 R5

Operation is the same as that in the program example.

Timer set time


The timer setting is entered as a value of 0.01 x (timer set value). The timer set value is specified as a K constant within the range of K1 to K32767. STMR is set between 0.01 and 327.67 seconds, in units of 0.01 seconds. If the set value is K500, the set time will be 0.01 x 500 = 5 seconds.

Precautions during programming


The area in which the set value is stored must be set so that the area specified for the elapsed value does not overlap any areas reserved for other timer or counter instructions, or memory areas used for highlevel instruction operations. Because subtraction is carried out when operations are carried out, the program should be set up so that operations are carried out every scan. (In cases such as programs where interrupt operation is carried out, or for jump or loop instructions, where several operations are carried out during one scan, or where it was not possible to carry out any operation during the scan, correct results cannot be obtained.)

How the Auxiliary Timer Works


1

When the execution condition (trigger) R0 changes from off to on, the set value specified by the S is sent to the elapsed value area D.
R0 R5 F137 STMR, DT10, DT20 DT10 K500
1

S Sent to D.

R900D F0 MV, DT30, DT40

DT20 K500

If the execution condition (trigger) R0 stays on, every scan, the value in the elapsed value area D is subtracted.
R0 R5 F137 STMR, DT10, DT20 DT20 K500
2 Subtraction 499 498 497

R900D F0 MV, DT30, DT40

next page
3 303
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If the value in the elapsed value area D reaches 0, relay being used is turned on by the OT instruction which comes next in the program. The special internal relay R900D also goes on at this point.
R0 R5 F137 STMR, DT10, DT20 DT20 0

R900D F0 MV, DT30, DT40


3

Subtraction completed

Precautions When Using R900D


If R900D is used and multiple auxiliary timers are being used, always use R900D in the line following the auxiliary timer instruction. (a)
R0 R900D F137 STMR, DT10, DT20 Y10 Pair

R1

(b)
R900D

F137 STMR, DT30, DT40 Y11 Pair

When timer (a), which is activated by R0 turns on, expires, Y10 goes on. When timer (b), which is activated by R1 turns on, expires, Y11 goes on. Describe the program as shown below will result in incorrect operation.
X0 F137 STMR, DT10, DT20 X1 F137 STMR, DT30, DT40 R900D R900D Y10 Y11

3 304
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F138 (HMSS) Hours, minutes, and seconds data to seconds data P138 (PHMSS)
Outline Converts hour, minute, and second data to seconds data. For the FP0R/FP/FPX, the P type highlevel instruction P138 (PHMSS) is not available.
Boolean Address 10 11 Instruction ST F138 DT DT R 0 0 10

Program example
Ladder Diagram

Trigger 10 R0 F138 HMSS , DT 0 , DT10 S


S D

(HMSS)

Starting 16-bit area for storing hours, minutes, and seconds data (source) Starting 16-bit area for storing converted seconds data (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Converts the hour, minute, and second data stored in data registers DT1 and DT0 to seconds data when trigger R0 turns on. The converted seconds data is stored in data registers DT11 and DT10.

7: 45 30 [H00074530 (BCD) (DT1 = H7, DT0 = H4530)]


DT1 0 0 0 7 4 5 DT0 3 0

Hours data

Minutes data

Seconds data

F138 (HMSS) instruction execution

27930 [H00027930 (BCD) (DT11 = H2, DT10 = H7930)]


DT11 0 0 0 2 7 9 DT10 3 0

Seconds data

3 305
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts the hour, minute, and second data stored in the 32-bit area specified by S to seconds data. The converted seconds data is stored in the 32-bit area specified by D.

Composition of data
Format of S+1 and S
32 bits (2 words) S+1 and S are allocated to express hour, minute, and second data. The data is expressed in BCD format. The BCD H data should be used for setting the hour (4 digits), minute (2 digits), and second (2 digits) data as follows. (The max. time data that can be specified is 9,999 hours, 59 minutes and 59 seconds.) BCD 8 digits (2 words)


S+1 S
H

Minutes data: H00 to H59 (BCD) Hours data: H0000 to H9999 (BCD)

Example:

3:4519 (S+1: H0003, S: H4519)

Format of D+1 and D


32 bits (2 words) are allocated to express the converted seconds data. The converted seconds data is expressed in BCD format as follows: BCD 8 digits (2 words)

D+1

Flag conditions

Error flag (R9007): Error flag (R9008):

3 306
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net


Converted seconds data: H00000000 to H99999999 (BCD)

Example:

35,999,999 (D+1: 3599, D: H9999)

Note
The maximum time data that can be specified is 9,999 hours, 59 minutes and 59 seconds, so the maximum value of the time data

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S is not BCD data. The minutes and seconds data specified by S exceeds the set range (00 to 59).


Seconds data: H00 to H59 (BCD)

Highlevel Instructions

F139 (SHMS) Seconds data to hours, minutes, and seconds data P139 (PSHMS)
Outline Converts seconds data to hour, minute, and second data. For the FP0R/FP/FPX, the P type highlevel instruction P139 (PSHMS) is not available.
Boolean Address 10 11 Instruction ST F139 DT DT R 0 0 10

Program example
Ladder Diagram

Trigger 10 R0 F139 SHMS , DT 0 , DT10 S


S D

(SHMS)

Starting 16-bit area for storing seconds data (source) Starting 16-bit area for storing converted hours, minutes, and seconds data (destination)

Operands
Relay Operand WL WX WY WR (*1) A N/A A A A A A A Timer/Counter SV A A EV A A Register LD FL DT (*1) (*2) A A A A A A Index register IX (*3) A A IY N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

S D

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*3) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
Converts the seconds data stored in data registers DT1 and DT0 to hour, minute, and second data when trigger R0 turns on. The converted hour, minute, and second data is stored in data registers DT11 and DT10.

4000 [H00004000 (BCD) (DT1 = H0, DT0 = H4000)]


DT1 0 0 0 0 4 0 DT0 0 0

Seconds data F139 (SHMS) instruction execution

1: 6 40 [H00010640 (BCD) (DT11 = H0001, DT10 = H0640)]


DT11 0 0 0 1 0 6 DT10 4 0

Hours data

Minutes data

Seconds data

3 307
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts the seconds data stored in the 32-bit area specified by S to hour, minute, and second data. The converted hour, minute, and second data is stored in the 32-bit area specified by D.

Composition of data
Format of S+1 and S
32 bits (2 words) S+1 and S are allocated to express the seconds data. The data is expressed in BCD format. The BCD H data (8 digits) should be used for setting seconds data as follows: BCD 8 digits (2 words)


S+1 S
H

Format of D+1 and D


32 bits (2 words) D+1 and D are allocated to express the converted hours, minutes and seconds data. The converted hours (4 digits), minutes (2 digits) and seconds (2 digits) data is expressed in BCD format as follows: BCD 8 digits (2 words)


Converted seconds data: H00 to H59 (BCD) Converted minutes data: H00 to H59 (BCD)

3 308
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net


Seconds data: H00000000 to H35999999 (BCD)

Example:

35,999,999 (S+1: H3599, S: H9999)

Note
The maximum value that can be stored in D is 9,999 hours, 59 minutes and 59 seconds, so the maximum value that can be specified for the time data for the seconds unit is 35,999,999 seconds.


D+1 D
Converted hours data: H0000 to H9999 (BCD)

Example:

3:4519 (D+1: H0003, D: H4519)

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S is not BCD data. The data specified by S exceeds the set range (35,999,999).

3 309
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F140 (STC) P140 (PSTC)


Outline

Carry flag (R9009) set

Turns on special internal relay R9009 (carry flag). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P140 (PSTC) is not available.
Boolean Address 10 11 Instruction ST F140 R 0 (STC)

Program example
Ladder Diagram

Trigger 10 R0 F140 STC

Description
Special internal relay R9009 (carry flag) goes on.

Flag condition
Carry flag (R9009): Turns on when this instruction is executed.

3 310
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F141 (CLC) P141 (PCLC)


Outline

Carry flag (R9009) reset

Turns off special internal relay R9009 (carry flag). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P141 (PCLC) is not available.
Boolean Address 10 11 Instruction ST F141 R 0 (CLC)

Program example
Ladder Diagram

Trigger 10 R0 F141 CLC

Description
Special internal relay R9009 (carry flag) goes off.

Flag condition
Carry flag (R9009): Turns off when this instruction is executed.

3 311
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F142 (WDT) P142 (PWDT)


Outline Program example

Watching dog timer update

Updates the timeout time of watching dog timer.


Boolean Address 10 11 Instruction ST F142 K R 0 (WDT) 128

Ladder Diagram

Trigger 10 R0 F142 WDT , K 128 S


S

Constant for specifying the watching dog timer value

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register IX N/A IY N/A Constant K A H A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

Explanation of example
The watching dog timer value is changed to K128 (12.8 ms) when R0 turns on.

Description
This is a set value specified by S, and presets the timeout time for the operation delay watching dog timer. Operation processing blocks which occur after a preset specified by this instruction will be monitored at the timeout time specified here. S can be specified within the ranges given below. K4 to K6400 The timeout time is S 0.1(ms)

Example:

If S is K100, the timeout time is 10ms

The timeout time of operation delay watching dog timer is updated at the start of each scan by referring to system register 30. If you need to change the timeout time of watching dog timer for all scans, change the value in system register 30. Using the F142 (WDT)/P142 (PWDT) instruction, you can change the timeout time (watching dog timer value) only for that scan.

3 312
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


The F142 (WDT) instruction may be used any number of times. To change the timeout time through operation, use the process described below. 1) Execute the F142 (WDT) instruction immediately prior to the block to be processed, and specify the preset. 2) When the processing has been completed, execute the F142 (WDT) instruction again, and enter a preset with a new value. If the time required for one scan exceeds 640 ms, the system watching dog timer will be activated, regardless of the timeout time set with the F142 (WDT) instruction, and operation will be interrupted and output turned off. If you want to reset an erroneous condition caused by the system watching dog timer, clear that condition using one of the following methods: Using programming tool software. Turning the TEST/INITIALIZE switch to the INITIALIZE side.

3 313
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FP0R/FPe/FP/FPX

F143 (IORF)
Outline Program example

Availability

Partial I/O update

FP0/FP0R/FPe/ FP/FPX

Updates specified partial I/O points.

Ladder Diagram

Boolean Address 10 Instruction ST F143 WX WX 20 21 ST F143 WY WY R R 10 (IORF) 0 0 20 (IORF) 0 0

Input update Trigger 10 R10 D1 D2 F143 IORF , WX 0 , WX 0

11

Output update R20 F143 IORF , WY 0 , WY 0 20 D1


D1 D2

D2

Starting word address Ending word address

Operands
Operand D1 D2 A A Relay WX WY WR A A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT N/A N/A Index register I N/A N/A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

Explanation of example
Updates external input relays WX0 (X0 to XF) immediately when the execution condition (trigger) R10 turns on and updates external output relays WY0 (Y0 to YF) immediately when the execution condition (trigger) R20 turns on.

Description
Updates the external inputs X and external outputs Y specified by D1 and D2 immediately even in the program execution stage. Refreshing (Updating) initiated by the F143 (IORF) instruction is done only for the control unit. With input refreshing (updating), WX0 should be specified for [D1] and [D2]. With output refreshing (updating), WY0 should be specified for [D1] and [D2]. The allowable I/O range for the partial update varies depending on the models.

3 314
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP0R/FPe/FP/FPX

Highlevel Instructions

Availability of the partial I/O update for various models


Control unit
FP0 FP0R FPe FP 12k FP 32k FPX A A A A A A

FP0 Expansion
N/A A* N/A A*)

FP Expansion
A A

Addon cassette
A

FPX Expansion
N/A

FP0 Adapter
N/A

A: Available, N/A: Not Available *) For FP 32k type and FP0R, partial I/O update is possible with FP0 expansion units, however, it takes approx. 1 ms for 1 unit.

3 315
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH/FP10SH

F143 (IORF) P143 (PIORF)


Outline Program example

Partial I/O update

Availability FP2/FP2SH/FP10SH

Updates specified partial I/O points.


Boolean Address 10 11 Instruction ST F143 K K R 10 (IORF) 0 1

Ladder Diagram

Trigger 10 R10 F143 IORF , K0, D1


D1 D2

K1 D2

Starting word address Ending word address

Operands
Operand D1 D2 Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A EV N/A N/A Register DT LD FL Index register IX N/A N/A IY N/A N/A Constant K A A H A A Index modifier A A A: Available N/A: Not Available

N/A N/A N/A N/A N/A N/A

Explanation of example
When the configuration shown below is being used:

Updates the input and output relay of word no. 0 to 1 (2 words, 32 points) immediately when the trigger R10 turns on. When the instruction is executed, the WX0 (X0 to XF) input processing and the WY1 (Y10 to Y1F) output processing are carried out.

Outline
0 16point input unit Power supply unit 1

Updates specified partial I/O points.


2 3 4 (Slot no.) 16point output unit

3 316
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

CPU

FP2/FP2SH/FP10SH

Highlevel Instructions

Description
Updates the input and output relays (X and Y) specified by D1 and D2 immediately even in the program execution stage. Refreshing (updating) initiated by the F143 (IORF) instruction is done only for the unit on the master and expansion backplanes. No update is performed for the input/output relay of the MEWNET-F (remote I/O) system slave station. How to specify D1 and D2: Set the starting address D1 and the ending address D2 (D1 Specify the word address with K0 D1 D2 K255. D2).

Set the same word address in both D1 and D2 to update only one word.

3 317
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

F144(TRNS)
Outline Program example

Availability

Serial data communication

FP0/FPe

Communicates with an external device using the RS232C port.


Boolean Address 10 11 12 Instruction ST DF F144 DT K (TRNS) 100 8 R 0

Ladder Diagram

Trigger R0 10 1 DF F144 TRNS, DT 100, K 8 S


S n

Starting 16-bit area for storing data to be sent 16-bit equivalent constant or 16-bit area to specify number of bytes to be sent When the value is positive, an end code is added. When the value is negative, an end code is not added. When the value is H8000, the transmission mode of the RS232C port is changed.

Operands
Operand S n Relay WX WY WR N/A N/A N/A A A A Timer/Counter Register SV N/A A EV N/A A DT A A Index register I N/A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

3 318
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

Description
Use this instruction for communication (transmission and reception) of command and data when an external device (personal computer, measuring instrument, bar code reader, etc.) is connected to the RS232C port.

Transmission
The n bytes of the data stored in the data table with the starting area specified by S are transmitted from the RS232C port to an external device by serial transmission. A start code and end code can be automatically added before transmission.

Reception
Reception is controlled by the reception completed flag (R9038) being turned on and off. When the reception completed flag (R9038) is off, the data sent to the RS232C port is stored in the reception buffer specified in system registers 417 and 418. When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off.

Switching the use of RS232C port


To switch between computer link communication and serial data communication (general purpose port), execute an F144 (TRNS) instruction. Set n (the number of transmission bytes) to H8000, and then execute the instruction. When executed when general purpose port is selected, the setting will change to computer link.
R0 DF R9032 1

F144 TRNS, DT100, H8000

When executed when computer link is selected, the setting will change to general purpose port.
R0 DF R9032 1

F144 TRNS, DT100, H8000

In this case, the parameter is disabled regardless of the number.

Set to H8000.

R9032: COM. (RS232C) port selection flag This flag turns on when General purpose port is selected.

Note
When the power is turned on, the port use will revert to the setting of system register 412. Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by n exceeds the source data area range.

3 319
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Program and operation during transmission


To transmit, write the transmission data to the data table, select it with an F144 (TRNS) instruction, and execute.

Data table for transmission


Data register areas beginning with the area selected by S are used as the data table for transmission. [S] [S+1] [S+2]
2 1

The number of bytes not yet transmitted is stored here.

[S+n]

2n

2n1

Storage area for transmission data (the circled numbers indicate the order of transmission).

Write the transmission data to the transmission data storage area selected with S (from the second word on) using an F0 (MV) or F95 (ASC) instruction. Do not include an end code in the transmission data as it will be added automatically. If the start code is set to Yes, do not include a start code in the transmission data as it will be added automatically. There is no restriction on the number of bytes [n] that can be transmitted. Following the initial area of the data [S], transmission is possible up to the data range that can be used by the data register. However, if the FP0R is used as the FP0 (FP0 compatibility mode), the maximum number is 2048 bytes. When the F144 (TRNS) instruction is executed, the number of data bytes not yet transmitted is stored in the starting area of the data table. *1

Note
Take care that the transmission data table and reception buffer areas (set in system registers 417 and 418) do not overlap. Example: Transmitting the eight characters A, B, C , D, E, F, G and H (8 bytes of data) In this example, the data table is DT100 to DT104.
DT100 DT101 DT102 DT103 DT104 H42(B) H44(D) H46(F) H48(H) K8 H41(A) H43(C) H45(E) H47(G) Data is transmitted in order from the lower byte. The number of bytes not yet transmitted is stored at each transmission. *1

Data table before transmission 3 320


CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

Program
Select the starting address of the transmission data table with S and the number of transmission data bytes with n.
R0 F1 DMV, H44434241, DT101 F1 DMV, H48474645, DT103 R1 DF F144 TRNS, DT100, K 8 1

Write the transmission data to the data table

Transmit the data in the data table

Operation
If the execution condition (trigger) for the F144 (TRNS) instruction is on when sending completed flag (R9039) goes on, operation will proceed as follows: 1) The n is preset in S (the number of bytes not yet transmitted). Furthermore, reception completed flag (R9038) is turned off and the reception data number is cleared to zero. 2) The data in the data table is transmitted in order from the lower byte in S+1. As each byte is transmitted, the value in S (the number of bytes not yet transmitted) decrements by 1. *1 During transmission, the sending completed flag (R9039) goes off. If the start code STX is set to Yes using system register 413, the start code will be automatically added to the beginning of the data. The end code selected is automatically added to the end of the data.
DT101 DT102 DT103 DT104

Sending data Number of bytes not 8 yet transmitted (DT100) R9039 Trigger R1 F144 (TRNS) execution

A 7

B 6

C 5

D 4

E 3

F 2

G 1

H (CR) 0 on off on off

During transmission (F144 (TRNS) instruction cannot be executed.)

3) When the specified quantity of data has been transmitted, the value in S (the number of bytes not yet transmitted) will be zero and the sending completed flag (R9039) will go on. *1 When the FP0R is used as the FP0 (FP0 compatiblity mode), the number of transmitted bytes will be set when the transmission starts, and it will not decrease until the completion. It will be cleared to 0 when the transmission completes.

Transmission without an end code


Specify the number of transmission bytes with a negative number. Set the end code to Note for transmission and reception.

Example: Program for transmitting 8 bytes of data without an end code


R0 DF F144 TRNS, DT100, K8 1

Set to K8. 3 321


CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Setting the reception buffer: System register 417 and 418


All areas of the data register are initially set for use as the reception buffer. To change the reception buffer, set the starting area number in system register 417 and the size (number of words, Max. 1,024 words) in system register 418. The reception buffer will be as follows: Starting area specified in system register 417 Number of bytes received

Area used for storing received data

Number of words specified in system register 418

Program and operation during reception


Data sent from the external device connected to the RS232C port will be stored in the data register areas set as the reception buffer.

Reception buffer
Word (address) 0 1 2
2 1

Area used for number of bytes received

Area used for storing received data (the circled numbers indicate the storing order) n 2n 2n1

Each time data is received, the amount of data received (number of bytes) is stored as a count in the leading address of the reception buffer. The initial value is zero. The data received is stored in order in the reception data storage area beginning from the lower byte of the second word of the area.

3 322
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

Example: Reception of the eight characters A, B, C, D, E, F, G, and H (8 bytes of data) from an external device The reception buffer is DT200 to DT204 in this example. System register settings are as follows: System register 417: K200 System register 418: K5
DT200 DT201 DT202 DT203 DT204 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) The reception data is stored in order from the lower byte. Each time data is received, the number of bytes received is stored.

Reception buffer when reception is completed

Program
When reception of data from an external device has been completed, the reception completed flag (R9038) goes on and further reception of data is not allowed. To receive more data, an F144 (TRNS) instruction must be executed to turn off the reception completed flag (R9038) and clear the byte number to zero.
R0 F144 TRNS, DT100, K 0

To repeat reception only, set to K0. R9038 will also go off when the number of transmission bytes is set and transmission is carried out.

3 323
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Operation
When the reception completed flag (9038) is off and data is sent from an external device, operation will proceed as follows. (After RUN, R9038 is off during the first scan.) 1) The data received is stored in order in the reception data storage area of reception buffer beginning from the lower byte of the second word of the area. Start and end codes will not be stored. With each one byte received, the value in the leading address of the reception buffer is incremented by 1. Reception operation Reopening start Received data Number of bytes 0 received on R9038 off Trigger R0
on off

A 1

B T (CR) 2 20 0

U 1

V 2

Reception Reception not possible possible 2) When an end code is received, the reception completed flag (R9038) goes on. After this, no further reception of data is allowed. 3) When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off and the number of received data bytes is cleared to zero. Further data received is stored in order in the reception data storage area beginning from the lower byte of the second word of the area.

F144 (TRNS) execution

Reception possible

Note
For repeated reception of data, refer to the following procedure 1) to 5). 1) Receive data 2) Reception completed (R9038: on, Reception: not allowed) 3) Process received data 4) Execute F144 (TRNS) instruction (R9038: off, Reception: enable) 5) Receive further data

3 324
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Highlevel Instructions

F144(TRNS)
Outline Program example

Availability

Serial data communication

FP2/FP2SH/FP10SH

Communicates with an external device using the COM. port of CPU.


Boolean Address 10 11 12 Instruction ST DF F144 DT K (TRNS) 100 8 R 0

Ladder Diagram

Trigger R0 10 1 DF F144 TRNS, DT 100, K 8 S


S n

Starting 16-bit area for storing data to be sent 16-bit equivalent constant or 16-bit area to specify number of bytes to be sent When the value is positive, an end code is added. When the value is negative, an end code is not added. When the value is H8000, the transmission mode of the RS232C port is changed.

Operands
Operand S n Relay WX WY WR N/A N/A N/A A A A Timer/Counter Register SV N/A A EV N/A A DT A A Index register I N/A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available

Explanation of example
When the trigger R0 turns on, 8 bytes of the data stored in data registers DT101 through DT104 are transmitted from the COM. port.

3 325
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH/FP10SH

Description
Use this instruction for communication (transmission and reception) of command and data when an external device (personal computer, measuring instrument, bar code reader, etc.) is connected to the COM. port of CPU.

Transmission
The n bytes of the data stored in the data table with the starting area specified by S are transmitted from the COM. port to an external device by serial transmission. A start code and end code can be automatically added before transmission. FP10SH Transmission

External device (Personal computer)

COM. port

Reception
Reception is controlled by the reception completed flag (R9038) being turned on and off. When reception completed flag (R9038) is off, the data sent to the COM. port stored in the reception buffer selected in system registers 417 and 418. When an F144 (TRNS) instruction is executed, reception completed flag (R9038) goes off. FP10SH Reception

External device (Bar code reader)

COM. port

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The number of bytes specified by n exceeds the source data area range.

3 326
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Highlevel Instructions

Preparation of transmission
1) Setting the transmission format
For FP10SH
The initial settings for the transmission format are as follows: Data length: 8 bits Parity check: Yes, odd Stop bits: 1 bit End code: CR Start code: No STX To change the transmission format to match the external device connected to the COM. port, set the parameters with the upper row of operation mode switches.

Operation mode switches (using upper dip switch)


off on off on

Upper dip switches Lower dip switches


Settings SW1 SW2
Disabled Enabled STX (H02) invalid STX (H02) valid None CR (H0D) and LF (H0A) CR (H0D) EXT (H03) off on off on off on off on off off on on off on off on on off off on off on

Functions
MODEM control t l Start code

SW3

SW4

SW5

SW6

SW7

SW8

End code

Stop bit p Parity check y

2 bits 1 bit Invalid Even parity Odd parity

Data length (character bit)

7 bits 8 bits

For FP2/FP2SH
Set the transmission format parameter so that the Transmission Format Setting of system register 413 matches the external device connected to the COM. port. The default setting is the same as that of the FP10SH. The selected end code is automatically added during transmission. To disable the end code, set the number of transmission bytes using a negative value before the F144 (TRNS) instruction. If the start code is set to STX valid, STX will be automatically added.

3 327
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH/FP10SH

2) Setting the baud rate


For FP10SH
The baud rate (transmission speed) for serial transmission is initially set to 9600 bps. To change the baud rate to match the external device connected to the COM. port, set the lower row of operation mode switches as shown below.

Operation mode switches (using lower dip switch)


Functions
Transmission speed d 115,200 bps 57,600 bps 38,400 bps 19,200 bps 9,600 bps 4,800 bps 2,400 bps 1,200 bps

Settings SW1 SW2


SW3

SW4

SW5

SW6
off on off on off on off on

SW7
off off on on off off on on

SW8
off off off off on on on on

For FP2/FP2SH
Set the transmission speed so that the COM Port Baud Rate Setting of system register 414 matches the external device connected to the COM. port. The default setting is 19200 bps.

3) Setting the use of the COM. port


Set system register 412 for serial transmission (general purpose port). To switch between computer link communication and serial data communication (general purpose port), execute an F144 (TRNS) instruction. Set n (the number of transmission bytes) to H8000, and then execute the instruction. When executed when computer link is selected, the setting will change to general purpose port.
X0 DF R9032 1

F144 TRNS, DT100, H8000

In this case, the parameter is disabled regardless of the number.

Set to H8000.

When executed when general purpose port is selected, the setting will change to computer link.
X0 DF R9032 1

F144 TRNS, DT100, H8000

R9032: COM. port selection flag, this flag turns on when General purpose port is selected.

Note
When the power is turned on, the port use will revert to the setting of system register 412.

3 328
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Highlevel Instructions

Program and operation during transmission


To transmit, write the transmission data to the data table, select it with an F144 (TRNS) instruction, and execute.

Data table for transmission


Data register areas beginning with the area selected by S are used as the data table for transmission. [S] [S+1] [S+2]
2 1

The number of bytes not yet transmitted is stored here.

Storage area for transmission data (the circled numbers indicate the order of transmission). [S+n] 2n 2n1

Write the transmission data to the transmission data storage area selected with S (from the second word on) using an F0 (MV) or F95 (ASC) instruction. Do not include an end code in the transmission data as it will be added automatically. If the start code is set to Yes, do not include a start code in the transmission data as it will be added automatically. When the F144 (TRNS) instruction is executed, the number of data bytes not yet transmitted is stored in the starting area of the data table.

Note
Take care that the transmission data table and reception buffer areas (set in system registers 417 and 418) do not overlap. Example: Transmitting the eight characters A, B, C , D, E, F, G and H (8 bytes of data) In this example, the data table is DT100 to DT104.
DT100 DT101 DT102 DT103 DT104 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) Data is transmitted in order from the lower byte. The number of bytes not yet transmitted is stored at each transmission.

Data table before transmission 3 329


CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH/FP10SH

Program
Select the starting address of the transmission data table with S and the number of transmission data bytes with n.
R0 F1 DMV, H44434241, DT101 F1 DMV, H48474645, DT103 R1 F144 TRNS, DT100, K 8

Write the transmission data to the data table Transmit the data in the data table

Operation
If the execution condition (trigger) for the F144 (TRNS) instruction is on when sending completed flag (R9039) goes on, operation will proceed as follows: 1) The n is preset in S (the number of bytes not yet transmitted). Furthermore, reception completed flag (R9038) is turned off and the reception data number is cleared to zero. 2) The data in the data table is transmitted in order from the lower byte in S+1. As each byte is transmitted, the value in S (the number of bytes not yet transmitted) decrements by 1. During transmission, the sending completed flag (R9039) goes off. If the start code STX is set to Yes using system register 413, the start code will be automatically added to the beginning of the data. The end code selected is automatically added to the end of the data.
DT101 DT102 DT103 DT104

Sending data Number of bytes not 8 yet transmitted (DT100) R9039 Trigger R1 F144 (TRNS) execution

A 7

B 6

C 5

D 4

E 3

F 2

G 1

H (CR) 0 on off on off

During transmission (F144 (TRNS) instruction cannot be executed.)

3) When the specified quantity of data has been transmitted, the value in S (the number of bytes not yet transmitted) will be zero and the sending completed flag (R9039) will go on. The F144 (TRNS) instruction cannot be executed and the R9039 is not turned on unless pin number 5 of RS232C port is turned on.

Transmission without an end code


Specify the number of transmission bytes with a negative number. Set the end code to Note for transmission and reception.

Example: Program for transmitting 8 bytes of data without an end code


X0

DF F144 TRNS, DT100, K8

Set to K8. 3 330


CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Highlevel Instructions

Preparation of reception
1) Setting the transmission format
For FP10SH
The initial settings for the transmission format are as follows: Data length: 8 bits Parity check: Yes, odd Stop bits: 1 bit End code: CR Start code: No STX To change the transmission format to match the external device connected to the COM. port, set the parameters with the upper row of operation mode switches.

Operation mode switches (using upper dip switch)


off on off on

Upper dip switches Lower dip switches


Settings SW1 SW2
Disabled Enabled STX (H02) invalid STX (H02) valid None CR (H0D) and LF (H0A) CR (H0D) EXT (H03) off on off on off on off on off off on on off on off on on off off on off on

Functions
MODEM control t l Start code

SW3

SW4

SW5

SW6

SW7

SW8

End code

Stop bit p Parity check y

2 bits 1 bit Invalid Even parity Odd parity

Data length (character bit)

7 bits 8 bits

For FP2/FP2SH
Set the transmission format parameter so that the Transmission Format Setting of system register 413 matches the external device connected to the COM. port. The default setting is the same as that of the FP10SH. When the start code is vaild, the data from the reception of STX to the reception of the selected end code is considered to be one frame.

3 331
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH/FP10SH

2) Setting the baud rate


For FP10SH
The baud rate (transmission speed) for serial transmission is initially set to 9600 bps. To change the baud rate to match the external device connected to the COM. port, set the lower row of operation mode switches as shown below.

Operation mode switches (using lower dip switch)


Functions
Transmission speed d 115,200 bps 57,600 bps 38,400 bps 19,200 bps 9,600 bps 4,800 bps 2,400 bps 1,200 bps

Settings SW1 SW2


SW3

SW4

SW5

SW6
off on off on off on off on

SW7
off off on on off off on on

SW8
off off off off on on on on

For FP2/FP2SH
Set the transmission speed so that the COM Port Baud Rate Setting of system register 414 matches the external device connected to the COM. port. The default setting is 19200 bps.

3) Setting the use of the COM. port


Set system register 412 for serial transmission (general purpose port). The use of the COM. port can be changed by executing an F144 (TRNS) instruction.

4) Setting the reception buffer: System register 417 and 418


All areas of the data register are initially set for use as the reception buffer. To change the reception buffer, set the starting area number in system register 417 and the size (number of words, Max. 1,024 words) in system register 418. The reception buffer will be as follows: Starting area specified in system register 417 Number of bytes received

Area used for storing received data

Number of words specified in system register 418

3 332
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH

Highlevel Instructions

Program and operation during reception


Data sent from the external device connected to the COM port will be stored in the data register areas set as the reception buffer.

Reception buffer
Word (address) 0 1 2
2 1

Area used for number of bytes received

Area used for storing received data (the circled numbers indicate the storing order) n 2n 2n1

Each time data is received, the amount of data received (number of bytes) is stored as a count in the leading address of the reception buffer. The initial value is zero. The data received is stored in order in the reception data storage area beginning from the lower byte of the second word of the area.

Example: Reception of the eight characters A, B, C, D, E, F, G, and H (8 bytes of data) from an external device The reception buffer is DT200 to DT204 in this example. System register settings are as follows: System register 417: K200 System register 418: K5
DT200 DT201 DT202 DT203 DT204 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) The reception data is stored in order from the lower byte. Each time data is received, the number of bytes received is stored.

Reception buffer when reception is completed

3 333
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH/FP10SH

Program
When reception of data from an external device has been completed, the reception completed flag (R9038) goes on and further reception of data is not allowed.
To receive more data, an F144 (TRNS) instruction must be executed to turn off the reception completed flag (R9038) and clear the byte number to zero. R0 DF F144 TRNS, DT100, K 0

To repeat reception only, set to K0. R9038 will also go off when the number of transmission bytes is set and transmission is carried out.

Operation
When the reception completed flag (9038) is off and data is sent from an external device, operation will proceed as follows. (After RUN, R9038 is off during the first scan.) 1) The data received is stored in order in the reception data storage area of reception buffer beginning from the lower byte of the second word of the area. Start and end codes will not be stored. With each one byte received, the value in the leading address of the reception buffer is incremented by 1. Reception operation Reopening start Received data Number of bytes 0 received on R9038 off Trigger R0
on off

A 1

B T (CR) 2 20 0

U 1

V 2

Reception Reception not possible possible 2) When an end code is received, the reception completed flag (R9038) goes on. After this, no further reception of data is allowed. 3) When an F144 (TRNS) instruction is executed, the reception completed flag (R9038) goes off and the number of received data bytes is cleared to zero. Further data received is stored in order in the reception data storage area beginning from the lower byte of the second word of the area.

F144 (TRNS) execution

Reception possible

Note
For repeated reception of data, refer to the following procedure 1) to 5). 1) Receive data 2) Reception completed (R9038: on, Reception: not allowed) 3) Process received data 4) Execute F144 (TRNS) instruction (R9038: off, Reception: enable) 5) Receive further data

3 334
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

F145 (SEND) Data send P145 (PSEND) (For MEWTOCOL master mode)
Outline Program example
Ladder Diagram

Availability FP0R FPX: Ver 1.2 or more FP: 32k

Sends specified data to another PLC or computer from the serial port of the unit.
Boolean Address 10 11 Instruction ST F145 DT DT DT K R 0 10 20 0 100

Trigger R0 F145 SEND, DT10 , DT20 , DT 0 , K 100 S1


S1 S2 D N

(SEND)

10

S2

Starting 16bit area for storing control data Starting 16bit area for storing source data (data area at the local unit) 16bit area of destination to send (The device No. is fixed at 0). Starting 16bit address of the destination to send.

Operands
Operand S1 S2 D N A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A A (*2) EV A A A A (*2) Register DT A A A LD A A A Index register In (*1) N/A N/A N/A N/A A A N/A N/A A A N/A N/A SWR SDT Constant K N/A N/A N/A A H N/A N/A N/A A Index modifier A A N/A A

A A A N/A (*2) (*2) (*2)

A A (*2) (*2)

(*1) I0 to ID

A: Available N/A: Not Available

(*2) It can be specified only for the FP0R, FP V3.20 or later, FPX V2.50 or later, however, an operation error will occur not a syntac error if K or H constant is specified as S1 and D.

Operation
It is used to send commands to the serial port (COM1 or COM2) of the specified unit in the MEWTOCOLCOM mode connecting the unit that enables to receive the computer link command. Specify the computer link for the operation mode (system register setting) of the COM port to be used. The data of the local area specfied by [S2] is written in the area of the remote unit specified by [D] and [N], according to the specification for the 2word data stored in the control data with starting area specified by [S1].

3 335
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Specifications for each item


The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method
[S1]: H0 Word unit transmission Specifies No. of transmisson words H001 to H1FB (1 to 507): when transmitting to Group A H001 to H18 (1 to 24)*: when transmitting to Group B H1FB is 507 words. H18 is 24 words. Group A Group B FP, FPX, FP0R, FP2, FP2SH, FP10SH FP0, FPe

* However, if either SV or EV is specified for the remote units device No. of [D], up to H19 (25) words is available. [S1]: H8 H0 fixed Bit No. of local unit (H0 to HF)

Bit No. of remote Bit unit transmission unit (H0 to HF)

[S1+1]: Specifying the remote unit


[S1+1]: H0 fixed
Unit No. (H00 to H63)

Selects COM port (H1 or H2)

(0 to 99)

(1) Specifying the transmission unit and transmission method [S1] If data is to be sent in word units, specify the data volume, and if it is to be sent in bit units, specify the position of the target bit. (2) Specifying the remote unit [S1+1] Specify the remote unit with the unit number. When H00, it is global transmission. (No response) Specify either the COM1 or COM2 port from which data is transmitted to the remote unit. Specify H1 if only one COM port is available. (3) Specify the area of the local unit by [S2] in which the data to be transmitted is stored Specify the memory area of the local unit in which the data to be transmitted is stored. (4) Specify the area of the remote unit for storing by [D] and [N]. Specify 0 for the device No. of [D]. Specify the memory area of the remote unit in which the data to be transmitted is stored, specifying the type D and the address N in combination. [D]:DT0, [N]:K100 Example) DT100 For the FP0R, FP V3.20 or later, FPX V2.50 or later, transmission can be performed without checking when DT0 or LD0 is specified for D, and H constant is specified for N. (Example) In case of DT0 and HFFFF, it is possible to access DT63353. It is convenient to access the data registers of an ecopower meter KW8M.

The MEWTOCOLCOM command is created according to the operands specified by [S1],[S1+1], [S2], [D], and [N].

3 336
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Flag conditions

Error flag (R9007) : Error flag (R9008) :

Turns on and stays on when: Turns on for an instant when: The control data of [S1] and [S1+1] is a value outside of the specified range. The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used. [D]+[N] exceeds the area of [D]. The operation mode for the target COM port is other than compute link. Word unit If [D] is DT/LD, it turns on when [N] is not 0 to 32767. If [D] is WY/WR/WL/SV/EV, it turns on when [N] is not 0 to 9999. Bit unit It turns on when [D] is not WY/WR/WL. It turns on when [N] is not 0 to 999. The device No. of [D] is not 0. The communication cassette has not been installed for the target COM port.

Precautions during programming


Specify the computer link for the operation mode (system register setting) of the COM port to be used. It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution enabled flag (R9044: COM1/R904A: COM2) is on.
R9044 (COM1) R904A (COM2) 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled

The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed.
R9045 (COM1) DT90124 (COM1) R904B (COM2) DT90125 (COM2) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.) If the transmission has been completed with an error (R9045 is on), the contents of the error (error code) are stored. 0: Completed normally 1: Completed with error (The error code is stored in DT90125.) If the transmission has been completed with an error (R904B is on), the contents of the error (error code) are stored.

3 337
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

For information on the contents of error codes, refer to the manual. If the error code is H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 2.5 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX)
73

Description
Timeout: Waiting for response

For global transmission (the transmission performed by specifying H00 for the unit No.), the program should be set up so that the transmission is executed after a time of at least the maximum scan time elapsed. The F145 or F146 instruction cannot be executed if the target is a special internal relay (from R9000) or a special data register (from DT9000) or file register FL.

3 338
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

F145 (SEND) Data send P145 (PSEND) (For MODBUS master mode)
Outline Program example
Ladder Diagram

Availability FP0R/FPX FP: 32k

Sends specified data to another PLC or computer from the serial port of the unit.
Boolean Address 10 11 Instruction ST F145 DT DT DT K R 0 10 20 0 100

Trigger R0 F145 SEND, DT10 , DT20 , DT 0 , K 100 S1


S1 S2 D N

(SEND)

10

S2

Starting 16bit area for storing control data Starting 16bit area for storing source data (data area at the local unit) 16bit area of destination to send (The device No. is fixed at 0). Starting 16bit address of the destination to send.

Operands
Operand S1 S2 D N A A N/A Relay WX WY WR WL A A A A A A A A N/A Timer/Counter SV A A N/A A (*2) EV A A N/A A (*2) Register DT A A A LD A A N/A Index register In (*1) N/A N/A N/A N/A A A N/A N/A A A N/A N/A SWR SDT Constant K N/A N/A N/A A H N/A N/A N/A A Index modifier A A N/A A

A A A N/A (*2) (*2) (*2)

A A (*2) (*2)

(*1) I0 to ID

A: Available N/A: Not Available

(*2) It can be specified only for the FP0R, FP V3.20 or later, FPX V2.50 or later, however, an operation error will occur not a syntac error if K or H constant is specified as S1 and D.

Operation
It is used to send commands to the serial port (COM1 or COM2) of the specified unit in the MODBUS mode connecting the unit that enables to receive the MODBUS command. (MODBUS command 05, 06, 15 and 16) The data of the local area specfied by [S2] is written in the area of the remote unit specified by [D] and [N], according to the specification for the 2word data stored in the control data with starting area specified by [S1].

3 339
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Specifications for each item


The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method
[S1]: H0 Word unit transmission [S1]: H8 Specifies No. of transmisson words (H001 to H07F) *According to the restrictions on the MODBUS protocol. H0 fixed Bit No. of local unit (H0 to HF)

Bit unit transmis- Bit No. of remote unit (H0 to HF) sion

[S1+1]: Specifying the remote unit


[S1+1]: H0 fixed
Unit No. (H00 to H63)

Selects COM port (H1 or H2)

(0 to 99)

(1) Specifying the transmission unit and transmission method [S1] If data is to be sent in word units, specify the data volume, and if it is to be sent in bit units, specify the position of the target bit. *In word units, the maximum of 127 (7Fh) words can be transmitted as the transmission range is up to 254 bytes. (2) Specifying the remote unit [S1+1] Specify the remote unit with the unit number. When H00, it is global transmission. (No response) Specify either the COM1 or COM2 port from which data is transmitted to the remote unit. Specify H1 if only one COM port is available. (3) Specify the area of the local unit by [S2] in which the data to be transmitted is stored Specify the memory area of the local unit in which the data to be transmitted is stored. (4) Specify the area of the remote unit for storing by [D] and [N]. Specify 0 for the device No. of [D]. Specify the memory area of the remote unit in which the data to be transmitted is stored, specifying the type D and the address N in combination. [D]:DT0, [N]:K100 Example) DT100

The MODBUS command is created according to the operands specified by [S1],[S1+1], [S2], [D], and [N]. When being transmitted in word units: The command 06 (DT1 word write), command 15 (Y, R multipoints write) and command 16 (DT multiwords write) can be transmitted. When being transmitted in bit units: The command 05 (Y, R single point write) can be transmitted. The transmission is executed adding the 2 bytes of CRC at the end after the MODBUS command has been created.

3 340
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Explanation of command Command 05 (Y, R single write) send


Example) When the value of the bit 0 of WR3 is transmitted to the 1st bit of WY1 of the unit No. 7 in the remote unit from the COM1. [ F145 (SEND), DT10, WR3, WY0, K1 ]
[S1]: H8 H1 H0 fixed H0 DT10

Bit unit Bit No. of remote unit Bit No. of local unit transmission (H0 to HF) (H0 to HF)

*Bit units (H8) should be specified for the transmission method of the [S1] to send the command 05.
[S1+1]: H1 H0 fixed H0 H7 DT11

Selects COM port (H1 or H2)

Unit No. (H00 to H63) (0 to 99)

[S1]: DT10 (DT10=8100H, DT11=1007H) [S2]: WR3 (WR3=0007H) [D]: WY0 [N]: K1 Command conversion * Reads a value of the bit 0 of WR3 and sets the condition by selecting ON or OFF. Specify ON=FF00, OFF=0000.

1 2 3 4 5 6 7 8

MODBUS commands Slave address 07 Command (05H) 05 Coil No. (H) 00 Coil No. (L) 11 Setting status (H) FF Setting status (L) 00 CRC16 (H) DC 59 CRC16 (L)

Command 06 (DT1 word write) send


Example) When the 1word data of WR3 is transmitted to the DT1000 of the unit No. 7 in the remote unit from the COM1. [ F145 (SEND), DT10, WR3, DT0, K1000 ]
[S1]: H0 H0 H0 H1 DT10

Word unit Specifies No. of transmission words transmission (H1 to H7F)

*Word units (H0) for the transmission method of [S1] and (H1) for No. of transmission words should be specified to send the command 06.
[S1+1]: H1 H0 fixed H0 H7 DT11
Selects COM port (H1 or H2)

Unit No. (H00 to H63) (0 to 99)

[S1]:DT10(DT10=0001HDT11=1007H) [S2]:WR3(WR3=1234H) [D] :DT0 [N] :K1000 Command conversion * Reads the word data of WR3 and sets in the write data.

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (06H) Starting No. of write (H) Starting No. of write (L) Write data (H) Write data (L) CRC16 (H) CRC16 (L)

07 06 03 E8 12 34 04 AB

3 341
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Command 15 (Y, R multipoints write) send


Example) When the 64bit data from the bit 0 of the WR3 to the bit F of the WR6 is transmitted to the W0 to Y3F of the unit No. 7 in the remote unit from the COM1. [ F145 (SEND), DT10, WR3, WY0, K0 ]
[S1]: H0 H0 H0 H4 DT10

Word unit Specifies No. of transmission words transmission (H1 to H7F)

*Word unit (H0) should be specified for the transmission method of [S1] to send the command 15.
[S1+1]: H1 H0 fixed H0 H7 DT11

Selects COM port (H1 or H2)

Unit No. (H00 to H63) (0 to 99)

[S1]:DT10(DT10=0004HDT11=1007H) [S2]:WR3(WR3=3210H WR4=7654H WR5=BA98H WR6=FEDCH) [D] :WY0 Command [N] :K0 conversion

*Specify the coil No. of the destination for the starting No. of status change. (Remote unit) The quantity of changed coils is that the No. of write bits is changed to HEX. Max. quantity of changed coils is 2032 (07F0H). (due to the restrictions on the MODBUS protocol) No. of data (No. of bytes) is calculated regarded 8 coils as 1 data (1 byte). (Max. 254 (FEH) bytes)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

MODBUS commands Slave address Command (0FH) Starting No. of status change (H) Starting No. of status change (L) Quantity of changed coils (H) Quantity of changed coils (L) No. of data (No. of bytes) Setting data 1 Setting data 2 Setting data 3 Setting data 4 Setting data 5 Setting data 6 Setting data 7 Setting data 8 CRC16 (H) CRC16 (L)

07 0F 00 00 00 40 08 10 32 54 76 98 BA DC FE 6C B3

3 342
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Command 16 (DT multiwords write) send


Example) When the 3word data from WR3 to WR5 is transmitted to DT500 to DT502 of the unit No. 7 of the remote unit. [ F145 (SEND), DT10, WR3, DT0, K500 ]
[S1]: H0 H0 H0 H3 DT10

Word unit Specifies No. of transmission words transmission (H1 to H7F)

*Word units (H0) should be specified for the transmission method of [S1] to send the command 16.
[S1+1]: H1 H0 fixed H0 H7 DT11

Selects COM port (H1 or H2)

Unit No. (H00 to H63) (0 to 99)

[S1]:DT10(DT10=0003H, DT11=1007H) [S2]:WR3(WR3=0011H WR4=2233H WR5=4455H) [D] :DT0 [N] :K500

Command conversion

*Max. quantity of write registers is 127 (7FH) (due to the restrictions on the MODBUS protocol). No. of data (No. of bytes) is calculated regarded No. of write registers as 2 bytes. (Max. 254 (FEH) bytes)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

MODBUS commands Slave address Command (10H) Starting No. of write (H) Starting No. of write (L) No. of write registers (H) No. of write registers (L) No. of data (No. of bytes) Write data 1 (H) Write data 1 (L) Write data 2 (H) Write data 2 (L) Write data 3 (H) Write data 3 (L) CRC16 (H) CRC16 (L)

07 10 01 F4 00 03 06 00 11 22 33 44 55 5A E7

Flag conditions

Error flag (R9007) : Error flag (R9008) :

Turns on and stays on when: Turns on for an instant when: The control data of [S1] and [S1+1] is a value outside of the specified range. The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used. [D]+[N] exceeds the area of [D]. The MODBUS mode has not been specified for the COM port of the control data specified by [S1+1]. The area of [D] is DT in bit unit transmission. The device No. of [D] is not 0.

Precautions during programming


It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution enabled flag (R9044: COM1/R904A: COM2) is on.
R9044 (COM1) R904A (COM2) 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled

3 343
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed.
R9045 (COM1) DT90124 (COM1) R904B (COM2) DT90125 (COM2) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.) If the transmission has been completed with an error (R9045 is on), the contents of the error (error code) are stored. 0: Completed normally 1: Completed with error (The error code is stored in DT90125.) If the transmission has been completed with an error (R904B is on), the contents of the error (error code) are stored.

For information on the contents of error codes, refer to the manual. If the error code is H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 2.5 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX)
73

Description
Timeout: Waiting for response

For global transmission (the transmission performed by specifying H00 for the unit No.), the program should be set up so that the transmission is executed after a time of at least the maximum scan time elapsed. The F145 or F146 instruction cannot be executed if the target is a special internal relay (from R9000) or a special data register (from DT9000).

3 344
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Availability

F145 (SEND)
Outline

Data send (MODBUS master II: Type directly specifying MODBUS address)

FP0R FPX: Ver. 2.50 FP: Ver. 3.20

Sends specified data to another PLC or computer from the serial port of the unit. Feature: Data can be transmitted with this instruction only.
Boolean Address 10 11 Instruction ST F145 DT DT H H R 0 10 20 10 20

Program example
Ladder Diagram

(SEND)

10

R0 F145 SEND, DT10 , DT20 , H10 , H20 S1


S1 S2 D N

S2

Specification of transmission port, transmission command and destination unit No. Starting 16bit area for storing source data Specification of MODBUS address Specification of No. of data to be sent (No. of words or bits)

Operands
Operand S1 S2 D N A A N/A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A Index register In (*1) N/A N/A N/A N/A A A N/A N/A A A N/A N/A SWR SDT Constant K A N/A A A H A N/A A A Index modifier A A N/A A

(*1) I0 to ID (*2) This instruction is available only for FP0R/FP V3.20 or later/FPX V2.50 or later.

A: Available N/A: Not Available

Description
The send data specified by [S2] is sent to the MODBUS address specified by [D] with the MODBUS command by specifying the transmission port, transmission command (5 or 6) and destination unit number. (MODBUS commands 05, 06, 15 and 16) The feature is that data can be transmitted with this instruction only.

3 345
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Specifications for each item


[S1]: Specifying port number, transmission command and destination unit number
[S1]: H1 or H2 H5 or H6

Selects COM Specifies Unit No. (H00 to HFF) port transmission command (1) Specifying COM port Specify H1 for COM 1 port, and H2 for COM2 port. If only one COM port is available, specify H1. (2) Specifying transmission command. H5 (HD) = Bit data/H6 (HE) = Word data When specifying multiple points by [N], the command is automatically converted to the command 15 or 16 for sending multiple bits or multiple words. On V1.06 or later version of FP0R, the command for writing multiple points (0F or 10) can be issued by specifying HD or HE even if 1 bit or 1 word is transferred. (3) Specifying destination unit number

Specify the area by [S2] in which the data to be transmitted is stored. Specify the starting number of the operation memory of the local unit in which the data to be transmitted is stored. This instruction can be executed even if the transmission command specified by [S1] and the device type in the remote unit differs. That means the contents of DT can be transmitted by specifying the bit data, or the contents of WR can be transmitted by specifying the word data. When the bit data is specified by [S1], data is always transmitted from the bit 0. Specifying the MODBUS address of the remote unit where data is transmitted by [D]. Settable address: H0 to HFFFF Specifying the number of data transmitted by [N] Settable number of data For bit data: Max. 2040 (07F8H) For word data: Max. 127 (7FH)

Explanation of command Command 05 (Coil singlepoint forcing)


Example) When the value of the bit 0 of WR3 is transmitted to the bit of the bit address H7788 of the unit No. 7 from the COM1. [ F145(SEND), H1507, WR3, H7788, K1 ]
[S1]: H1 H5 H0 H7

Selects COM port

Unit No. (H00 to HFF)

[S1]: H1507 [S2]: WR3 (WR3=0007H) [D]: H7788 [N]: K1 Command conversion * Reads a value of the bit 0 of WR3 and sets the condition by selecting ON or OFF. Specify ON=FF00, OFF=0000.

1 2 3 4 5 6 7 8

MODBUS commands 07 Slave address Command (05H) 05 77 Coil No. (H) Coil No. (L) 88 Setting status (H) FF Setting status (L) 00 CRC16 (H) 17 C2 CRC16 (L)

3 346
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Command 06 (Register single preset)


Example) When the 1word data of WR3 is transmitted to the address H7788 of the unit No. 7 from the COM1. [ F145(SEND), H1607, WR3, H7788, K1 ]
[S1]: H1 H6 H0 H7
Selects COM port

Unit No. (H00 to HFF)

[S1]:H1607 [S2]:WR3(WR3=1234H) [D] :H7788 [N] :K1 Command conversion * Reads the word data of WR3 and sets in the write data.

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (06H) Starting No. of write (H) Starting No. of write (L) Write data (H) Write data (L) CRC16 (H) CRC16 (L)

07 06 77 88 12 34 53 C2

Command 15 (Multipoint coil forcing)


Example) When the 64bit data from the bit 0 of the WR3 to the bit F of the WR6 is transmitted to the bit address H7788 of the unit No. 7 from the COM1. [ F145(SEND), H1507, WR3, H7788, K64 ]
[S1]: H1 H5 H0 H7

Selects COM port

Unit No. (H00 to HFF)

[S1]:H1507 [S2]:WR3 (WR3=3210H WR4=7654H WR5=BA98H WR6=FEDCH) [D] :H7788 [N] :K64

Command conversion

* When specifying multiple points by [N], the command is automatically corrected. H5 bit single write => H15 bit multiple write The starting No. fo status change is H7788. (Remote unit) The quantity of changed coils is that the No. of write bits is changed to HEX. Max. quantity of changed coils is 2040 (07F8H). (due to the restrictions on the MODBUS protocol) No. of data (No. of bytes) is calculated ragarded 8 coils as 1 data (1 byte). (Max. 255 (FFH) bytes)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

MODBUS commands Slave address Command (0FH) Starting No. of status change (H) Starting No. of status change (L) Quantity of changed coils (H) Quantity of changed coils (L) No. of data (No. of bytes) Setting data 1 Setting data 2 Setting data 3 Setting data 4 Setting data 5 Setting data 6 Setting data 7 Setting data 8 CRC16 (H) CRC16 (L)

07 0F 77 88 00 40 08 10 32 54 76 98 BA DC FE 3B 65

3 347
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Command 16 (Multipoint register preset) send


Example) When the 3word data from DT3 to DT5 is transmitted to the address H7788 of the unit No. 7 from the COM1 port. [ F145(SEND), H1607, DT3, H7788, K3 ]
[S1]: H1 H6 H0 H7

Selects COM port

Unit No. (H00 to HFF)

[S1] : H1607 [S2] : DT3 ( DT3=0011H DT4=2233H DT5=4455H) [D] : H7788 [N] : K3

Command conversion

* When specifying multiple points by [N], the command is automatically corrected. * Max. quantity of write registers is 127 (7FH). (due to the restrictions on the MODBUS protocol) No. of data (No. of bytes) is calculated regarded No. of write registers as 2 bytes. (Max. 254 (FEH) bytes)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

MODBUS commands Slave address Command (10H) Starting No. of write (H) Starting No. of write (L) No. of write registers (H) No. of write registers (L) No. of data (No. of bytes) Write data 1 (H) Write data 1 (L) Write data 2 (H) Write data 2 (L) Write data 3 (H) Write data 3 (L) CRC16 (H) CRC16 (L)

07 10 77 88 00 03 06 00 11 22 33 44 55 2C BA

Flag conditions

Error flag (R9007) : Error flag (R9008) : Turns on when the control data of [S1] is a value outside of the specified range. Turns on when the MODBUS mode has not been specified for the COM port of the control data specified by [S1]. Turns on when the number of transmission data is 0. Turns on when the number of transmission data is negative. Turns on when the number of transmission data [N] exceeds the operation memory area specified by [S2]. Turns on when the number of transmission data [N] exceeds the limit of the MODBUS specifications.

3 348
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Precautions during programming


It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution enabled flag (R9044: COM1/R904A: COM2) is on.
R9044 (COM1) R904A (COM2) 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled

The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed.
R9045 (COM1) DT90124 (COM1) R904B (COM2) DT90125 (COM2) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.) If the transmission has been completed with an error (R9045 is on), the contents of the error (error code) are stored. 0: Completed normally 1: Completed with error (The error code is stored in DT90125.) If the transmission has been completed with an error (R904B is on), the contents of the error (error code) are stored.

If the error code is H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 10 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX)
73

Description
Timeout: Waiting for response

For global transmission (the transmission performed by specifying H00 for the unit No.), the program should be set up so that the transmission is executed after a time of at least the maximum scan time elapsed. The F145 or F146 instruction cannot be executed if the target is a special internal relay (from R9000) on a special data register (DT90000).

3 349
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F145 (SEND) Data send (MEWNET link) P145 (PSEND)


Outline Sends data to another station through link modules in the network.
Boolean Address 10 11 Instruction ST F145 DT DT DT K R 0 10 20 0 100

Program example
Ladder Diagram

Trigger R0 F145 SEND, DT10 , DT20 , DT 0 , K 100 S1


S1 S2 D N

(SEND)

10

S2

Starting 16-bit area for storing control data Starting 16-bit area for storing source data (data area at the local station) Type of destination operands for storing data in the remote station. Be sure to select the area by setting address 0 (destination data area at another station). Starting 16-bit area address for the destination operand specified in D above (destination data area in another station).

Operands
Operand S1 S2 D N A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A N/A EV A A A N/A Register DT A A A LD A A A FL A A A Index register IX N/A N/A N/A N/A IY N/A N/A N/A N/A Constant K N/A N/A N/A A H N/A N/A N/A A Index modifier A A N/A A A: Available N/A: Not Available

N/A N/A N/A N/A

N/A N/A N/A

Explanation of example
1

Example of word unit transmission When the control data is as follows: DT10(S1)=H0005 (=K5)
Word unit 5 words

DT11(S1+1)=H010A
Unit No.10 Route No.1

the 5 words of data from DT20 to DT24 are sent to DT100 to DT104 of unit No. 10, which is connected to route No. 1, when the execution condition (trigger) R0 turns on.

3 350
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example of bit unit transmission When the control data is as follows: DT10(S1)=H850D
Bit unit Bit No. 13 of local station Bit No. 5 of remote station

DT11(S1+1)=H010A
Unit No.10 Route No.1

the on and off information of Bit No. 13 of DT20 is sent to Bit No. 5 of DT100 of Unit No. 10, which is connected to route No. 1, when the execution condition (trigger) R0 turns on. If the network is configured only of the FP2, FP2SH, and FP10SH, specifying [FF] (HFF) for the unit number sends the same contents to all of the link stations on the same network.

Description
This sends the local station data for the area specified by S2 to the areas specified by the D and N of the remote stations connected with the MEWNETW, MEWNETP, and MEWNETH. The remote stations (routes and unit numbers), the transmission unit (bit unit or word unit), the transmission method, and other parameters are specified by the control data S1. F145 (SEND) execution S2 Local station Link unit D N Remote station

CPU

The remote station is specified by S1. If generalpurpose communication through the COM. port of the FP2, FP2SH, and FP10SH is being used, F144 (TRNS) instruction is used instead of this instruction. Refer to the section describing the F144 (TRNS) instruction.

3 351
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the various items


Control data (S1)
Specifying the remote station Specify the remote station by means of a route number and unit number. The setting is entered differently depending on whether the remote station is a PLC in the same network, or a PLC in a network on a different hierarchical level. Specifying the transmission unit and transmission method If data is to be sent in word units, specify the data volume, and if it is to be sent in bit units, specify the position of the target bit.

Specifying the memory area of the local station (S2)


Specify the memory area of the local station in which the data to be transmitted is stored.

Specifying the memory area of the remote station (D) and (N)
Specify the memory area of the remote station in which the data to be transmitted is stored, specifying the type D and the address N in combination.

Example:

D: DT0, N: K100 DT100

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The control data is a value outside of the specified range. The remote station does not exist. The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used.

Transmitting to a PLC within the same network


Specifying the control data (S1+1, S1)
The control data should be specified as an H constant. The transmission unit, transmission method and other parameters are specified with S1, and the remote station is specified with S1+1.
S1+1 S1

Specifying the remote station

Specifying the transmission unit and method

3 352
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

(1) Specifying word unit transmission


If word unit transmission is being used, the data for the specified number of words is sent from the memory area of the local station specified by S2, and is stored at the beginning of the memory area of the remote station specified by D and N. If only the MEWNETH network is being used, up to 1,020 words can be sent at one time, and if the network is using the MEWNETP or MEWNETW, up to 16 words can be sent at one time.
15 S1: Number of transmission words: H001 to H3FC (1 to 1020) Specifies H0. 11 7 4 0

Example: If 10 words of data are being sent, K10(H000A) should be specified in S1.
(2) Specifying bit unit transmission
If bit unit transmission is being used, the information of the specified bit in the memory area of the local station specified by S2 is sent to the specified bit of the memory area of the remote station specified by D and N.
15 S1: Bit No. of local station: H0 to HF(0 to 15) Specifies H0 Bit No. of remote station: H0 to HF(0 to 15) Specifies H8 11 7 4 0

Example: If the data of Bit No. 15 of the local station memory area is being sent to Bit No. 0 of the memory area in the remote station, H800F should be specified in S1.
(3) Specifying the remote station (common to both word/bit transmission)
15 S1+1: Unit No.: H01 to H40 (0 to 64) Route No.: H1 to H8(1 to 8) Specifies H0. 11 7 4 0

The unit number should be converted to a hexadecimal number and specified. For MEWNETW: H01 to H20 (1 to 32) For MEWNETP: H01 to H3F (1 to 63) For MEWNETH: H01 to H40 (1 to 64)

3 353
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Sending data to a PLC on a different hierarchical level


What is a hierarchical link?
A hierarchical link functions as a relay station between two link units installed on the same backplane, enabling communication between CPUs belonging to different networks.

Example:

Communicating with a CPU at depth 1


Local station Relay station Power CPU Link

Power CPU Link

Depth 0

Unit of relay source

Unit of remote station Link Unit of relay destination

Power CPU

Depth 1

Remote station

In this way, by passing data through a relay station, communication is possible to a depth of 3.

Note
When using the MEWNETP and MEWNETW, data can only be relayed one network deeper in the hierarchy.

3 354
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Link

Highlevel Instructions

Example:

Communicating with a CPU at depth 3 (sending data from CPU1 to CPU5)


Power CPU 1 Link Power CPU 2 Link Link

Link
Depth 1 Depth 3

Depth 0

Power CPU 4

Power CPU 3 Link Link


Depth 2

Power CPU 5

The numbers CPU1 to CPU5 have been temporarily assigned, for the purpose of indicating the relay order of the hierarchical links.
Specifying the control data (S1)
The control data should be specified as an H constant. The transmission unit, transmission method and other parameters are specified with S1, and the remote station is specified with S1+1 and subsequent parameters (the relay source unit, relay destination unit, and unit targeted for communication). (depth + 3) words are required.

Example:

Control data when specifying a remote station which is at depth 3


S1

Specifying the transmission unit and method


Depth (H03) Relay destination Relay destination Relay destination H00 CPU1 CPU2 CPU3 CPU4 CPU5

[S1+1] Local station [S1+2] Relay source [S1+3] Relay source [S1+4] Relay source [S1+5] Remote station

Link

Link

Specifying the remote station

: Same network :Same backplane The relay source is specified by a unit No. in the network, and the relay destination is specified by a route number on the backplane.
3 355
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

(1) Specifying word unit transmission


If word unit transmission is being used, the data for the specified number of words is sent from the memory area of the local station specified by S2, and is stored starting from the beginning of the memory area of the remote station specified by D and N. If only the MEWNETH network is being used, up to 1,020 words can be sent at one time, and if the network is using the MEWNETP and MEWNETW, up to 16 words can be sent at one time.
15 S1: Number of transmission words: H001 to H3FC (1 to 1020) Specifies H0 11 7 4 0

Example: If 10 words of data are being sent, K10(H000A) should be specified in S1.
(2) Specifying bit unit transmission
If bit unit transmission is being used, the information of the specified bit in the memory area of the local station specified by S2 is sent to the specified bit of the memory area of the remote station specified by D and N.
15 S1: Bit No. of local stations memory area: H0 to HF(0 to 15) Specifies H0 Bit No. of remote stations memory area: H0 to HF(0 to 15) Specifies H8 11 7 4 0

Example: If the data of Bit No. 15 of the local station memory area is being sent to Bit No. 0 of the memory area in the remote station, H800F should be specified in S1.
(3) Specifying the remote station (common to both word/bit transmission)
1

Specifying the route No. and depth

S1+1: Depth of remote station: H01 to H03 Route No. of local station: H1 to H8 Specifies H8.

3 356
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the relay station S+1 should be used to specify only the specified amount of depth, while (S1+3) is used to specify depth 2 for the same item, and (S1+4) is used to specify depth 3.

S1+2: Route No. of relay destination in depth 1: H01 to H08 Unit No. of relay source in depth 1: H01 to H40 (1 to 64)
3

Specifying the remote station This should be specified right after the specification of the relay station.

S1+n: (n = depth + 2) Specifies H00 Unit No. of remote station: H01 to H40(1 to 64)

Example:

When using the program example shown on page 3 339 In this example, the 5 words of data from DT20 to DT24 of the local station (CPU1) are sent to DT100 and subsequent addresses of the CPU (CPU5) shown below.
Connection diagram
1 1 2 3

Power CPU 1 Link

Power CPU 2 Link Link


1 2 3 4 No.2 1 2

No.1

Link
3

Power CPU 4

Power CPU 3 Link Link

Link
No.4

Power CPU 5

DT20 to DT24

No.16

DT100 to DT104

Link
No.10

3 357
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

In this example, the control data beginning with DT10 (depth 3 6 words) should be specified as shown below. To send the 5 words of data DT10 = H0005
CPU1 0 CPU2 CPU2 1 CPU3 CPU3 2 CPU4 CPU4 3 CPU5 : Depth No.10 DT15=H0A00 No.16 Route 2 DT14=H1002 No.4 Route 1 DT13=H0401 No.2 Route 3 DT12=H0203 Route 1 DT11=H8103

Precautions during programming


It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions at the same time. The program should be set up so that these instructions are executed when the MEWNET send/receive execution enabled flag (R9030) is on.
R9030 0: Execution inhibited (F145 (SEND)/F146 (RECV) instruction being executed) 1: Execution enabled

The F145 (SEND) instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The MEWNET send/receive completed flag (R9031) can be used to check whether or not the transmission has been completed.
R9031 DT9039 (DT90039) 0: Completed normally 1: Completed with error (The error code is stored in DT9039.) If the transmission has been completed with an error (R9031 is on), the contents of the error (error code) are stored.

For information on the contents of error codes, refer to the manual for that particular link unit. If the error code is H71 to H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 10 ms), using the setting of system register 32. The default value is set to 10 seconds for FP2/FP2SH/FP10SH. Error code (HEX)
H71 H72 H73

Description
Time out: Waiting for transmission answer Timeout: Waiting for transmission buffer to be emptied Timeout: Waiting for response

If there is any CPU other than the FP2SH and FP10SH connected to the network, global transmission (sending data using the HFF specification for the unit No.) should never be used. The F145 (SEND) instruction cannot be executed if the target is a special internal relay (from R9000) or a special data register (from DT9000/DT90000).

3 358
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Additional information concerning the F145 (SEND) instruction


Sending the special data registers and special internal relays using the data transfer instruction Special data registers and special internal relays cannot be sent using the F145 (SEND) instruction. Use a program like that shown below to send these types of data. Sending FP2, FP2SH or FP10SH special data registers (source issuing the command: FP2/FP2SH/ FP10SH)
X10 10 F145 SEND, S, DT9****, DT0, Kn

Sending special internal relays (source issuing the command: FP2/FP2SH/FP10SH)


X10 10 F145 SEND, S, WR9**, DT0, Kn

How to send FL (How to specify FL banks)


How to specify the FL bank for destination units The FL to communicate is specified like FL0 + H10. Specify FL1 + H10 to specify the FL of the bank 1 (FL2 + H10 for the bank 2) How to specify the FL bank for a local unit Normally, FLn is specified for the FL for the local unit. If specifying, the FL will be sent to the bank which has been selected in the execution of this instruction.

3 359
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

F146 (RECV) Data receive P146 (PRECV) (For MEWTOCOL master mode)
Outline Program example
Ladder Diagram

Availability FP0R FPX: Ver 1.2 or more FP: 32k

Receives specified data from the serial port of another PLC or computer to the unit.
Boolean Address 10 11 Instruction ST F146 DT DT K DT R 0 10 0 100 50

Trigger R0 F146 RECV, DT10 , DT 0 , K 100 , DT50 S1


S1 S2 N D

(RECV)

10

S2

Starting 16-bit area for storing control data 16bit area of destination to receive (The device No. is fixed at 0). Starting address of the destination to receive. Starting 16bit area address for storing data received (destination data area at local unit).

Operands
Operand S1 S2 N D A A N/A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A A (*2) A EV A A A (*2) A Register DT A A LD A A Index register In (*1) N/A N/A N/A N/A A N/A N/A N/A A N/A N/A N/A SWR SDT Constant K N/A N/A A N/A H N/A N/A A N/A Index modifier A N/A A A

A A A (*2) (*2) (*2) A A A

A A (*2) (*2) A A

(*1) I0 to ID

A: Available N/A: Not Available

(*2) It can be specified only for the FP0R, FP V3.20 or later, FPX V2.50 or later, however, an operation error will occur not a syntac error if K or H constant is specified as S1 and S2.

Operation
It is used to send commands to the serial port (COM1 or COM2) of the specified unit in the MEWTOCOLCOM mode connecting the unit that enables to receive the computer link command. The data is sent from the area of the remote unit specified by [S2] and [N], and is stored in the area of the local unit that starts with [D], according to the specification for the 2word data stored in the control data that starts with the area specified by [S1].

3 360
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Specifications for each item


The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method
[S1]: H0 Word unit transmission Specifies No. of transmisson words H001 to H1FD (1 to 509 words): when transmitting to Group A H001 to H1B (1 to 27 words): when transmitting to Group B Group A Group B [S1]: H8 Bit unit transmission FP, FPX, FP0R, FP2, FP2SH, FP10SH FP0, FPe H0 fixed Bit No. of local unit (H0 to HF) Bit No. of remote unit (H0 to HF)

[S1+1]: Specifying the remote unit


[S1+1]: H0 fixed
Unit No. (H01 to H63)

Selects COM port (H1 or H2)

(1 to 99)

(1) Specifying the transmission unit and transmission method [S1] If data is to be sent in word units, specify the data volume, and if it is to be sent in bit units, specify the position of the target bit. (2) Specifying the remote unit [S1+1] Specify the remote unit with the unit number. Specify either the COM1 or COM2 port from which data is transmitted to the remote unit. Specify H1 if only one COM port is available. (3) Specifying the area of the remote unit which is received by [S2] and [N]. Specify 0 for the device No. of [S2]. Specify the memory area of the remote unit in which the data to be transmitted is stored, specifying the type S2 and the address N in combination. [S2]:DT0, [N]:K100 Example) DT100 For the FP0R, FP V3.20 or later, FPX V2.50 or later, transmission can be performed without checking when DT0 or LD0 is specified for D, and H constant is specified for N. (Example) In case of DT0 and HFFFF, it is possible to access DT63353. It is convenient to access the data registers of an ecopower meter KW8M. (4) Specifying the area of the local unit by [D] in which the data to be received is stored Specify the memory area of the local unit in which the data to be received is stored.

The MEWTOCOLCOM command is created according to the operands specified by [S1],[S1+1], [S2], [D], and [N].

3 361
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Flag conditions

Error flag (R9007) : Error flag (R9008) :

Turns on and stays on when Turns on for an instant when The control data of [S1] and [S1+1] is a value outside of the specified range. The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used. [S2]+[N] exceeds the area of [S2]. The operation mode for the target COM port is other than compute link. Word unit If [S2] is DT/LD, it turns on when [N] is not 0 to 32767. If [S2] is WX/WY/WR/WL/SV/EV, it turns on when [N] is not 0 to 9999. Bit unit It turns on when [S2] is not WX/WY/WR/WL. It turns on when [N] is not 0 to 999. The device No. of [S2] is not 0. The communication cassette has not been installed for the target COM port.

Precautions during programming


Specify the computer link for the operation mode (system register setting) of the COM port to be used. It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution enabled flag (R9044: COM1/R904A: COM2) is on.
R9044 (COM1) R904A (COM2) 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled

The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed.
R9045 (COM1) DT90124 (COM1) R904B (COM2) DT90125 (COM2) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.) If the transmission has been completed with an error (R9045 is on), the contents of the error (error code) are stored. 0: Completed normally 1: Completed with error (The error code is stored in DT90125.) If the transmission has been completed with an error (R904B is on), the contents of the error (error code) are stored.

3 362
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

For information on the contents of error codes, refer to the manual. If the error code is H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 2.5 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX)
73

Description
Timeout: Waiting for response

The F145 or F146 instruction cannot be executed if the target is a special internal relay (from R9000) or a special data register (from DT9000) or file register FL.

3 363
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

F146 (RECV) Data receive P146 (PRECV) (For MODBUS master mode)
Outline Program example
Ladder Diagram

Availability FP0R/FPX FP: 32k

Receives specified data from the serial port of another PLC or computer to the unit.
Boolean Address 10 11 Instruction ST F146 DT DT K DT R 0 10 0 100 50

Trigger R0 F146 RECV, DT10 , DT 0 , K 100 , DT50 S1


S1 S2 N D

(RECV)

10

S2

Starting 16-bit area for storing control data 16bit area of destination to receive (The device No. is fixed at 0). Starting address of the destination to receive. Starting 16bit area address for storing data received (destination data area at local unit).

Operands
Operand S1 S2 N D A A N/A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A N/A A (*2) A EV A N/A A (*2) A Register DT A A LD A A Index register In (*1) N/A N/A N/A N/A A N/A N/A N/A A N/A N/A N/A SWR SDT Constant K N/A N/A A N/A H N/A N/A A N/A Index modifier A N/A A A

A A A (*2) (*2) (*2) A A A

A A (*2) (*2) A A

(*1) I0 to ID

A: Available N/A: Not Available

(*2) It can be specified only for the FP0R, FP V3.20 or later, FPX V2.50 or later, however, an operation error will occur not a syntac error if K or H constant is specified as S1 and S2.

Operation
It is used to send commands to the serial port (COM1 or COM2) of the specified unit in the MODBUS mode connecting the unit that enables to receive the MODBUS command. (MODBUS command 01, 02, 03 and 04) The data is sent from the area of the remote unit specified by [S2] and [N], and is stored in the area of the local unit that starts with [D], according to the specification for the 2word data stored in the control data that starts with the area specified by [S1].

3 364
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Specifications for each item


The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method
[S1]: H0 Word unit transmission [S1]: H8 Bit unit transmission Specifies No. of transmisson words (H001 to H07F) *According to the restrictions on the MODBUS protocol. H0 fixed Bit No. of local unit (H0 to HF) Bit No. of remote unit (H0 to HF)

[S1+1]: Specifying the remote unit


[S1+1]: H0 fixed
Unit No. (H01 to H63)

Selects COM port (H1 or H2)

(1 to 99)

(1) Specifying the transmission unit and transmission method [S1] If data is to be sent in word units, specify the data volume, and if it is to be sent in bit units, specify the position of the target bit. * For word units, the maximum of 127 (7Fh) words can be transmitted as the transmission range is up to 254 bytes. (2) Specifying the remote unit [S1+1] Specify the remote unit with the unit number. Specify either the COM1 or COM2 port from which data is transmitted to the remote unit. Specify H1 if only one COM port is available. (3) Specifying the area of the remote unit which is received by [S2] and [N]. Specify 0 for the device No. of [S2]. Specify the memory area of the remote unit in which the data to be transmitted is stored, specifying the type S2 and the address N in combination. [S2]:DT0, [N]:K100 Example) DT100 (4) Specifying the area of the local unit by [D] in which the data to be received is stored Specify the memory area of the local unit in which the data to be received is stored.

The MODBUS command is created according to the operands specified by [S1],[S1+1], [S2], [D], and [N]. When being transmitted in word units: The command 01 (Y, R coil read), command 02 (WL, LD read), command 03 (DT read) and command 04 (WL, LD read) can be transmitted. When being transmitted in bit units: The command 01 (Y, R coil read) and command 02 (X contact read) can be transmitted. The transmission is executed adding the 2 bytes of CRC at the end after the MODBUS command has been created.

3 365
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Explanation of command Command 01 (Y, R coil read) send


Example) When the 1 bit of Y17 is readed from the unit No. 17 of the remote unit, and a command to transmit the readed bit data to the 5th bit of the DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, WY0, K1, DT100 ]
[S1]: H8 H5 H0 fixed H7 DT10

Bit unit Bit No. of local unit transmission (H0 to HF)

Bit No. of remote unit (H0 to HF)

*Bit units (H8) should be specified for the transmission method of [S1] to read only 1bit of data by the command 01.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10(DT10=8507H, DT11=1011H) [S2]: WY0 [N] : K1 [D] : DT100 Command conversion *Specify the coil No. of the destination for the starting No. of read. (Remote unit: Y17) The quantity to read should be 1.

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (01H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 01 00 17 00 01 DC 59

Example) When the 64 bits (4 words) of data from Y10 to Y4F is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, WY0, K1, DT100 ]
[S1]: H0 H0 H0 H4 DT10

Word unit Specifies No. of transmission words transmission (H001 to H07F)

*Bit units (H0) should be specified for the transmission method of [S1] to read in word units by the command 01.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10 (DT10=0004H, DT11=1011H) [S2]: WY0 [N]: K1 [D]: DT100

Command conversion

* Specify the coil No. of the destination for the starting No. of read. (Remote unit: Y10) The quantity to read should be the value of No. of specified words X 16. (64bit read)

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (01H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 01 00 10 00 40 3E AF

3 366
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Command 02 (X contact read) send


Example) When the 1 bit of X17 is readed from the unit No. 17 of the remote unit, and a command to transmit the readed bit data to the 5th bit of DT100 in the local unit is sent. [ F146 (RECV), DT10, WX0, K1, DT100 ]
[S1]: H8 H5 H0 fixed H7 DT10

Bit unit Bit No. of local unit transmission (H0 to HF)

Bit No. of remote unit (H0 to HF)

*Bit units (H8) should be specified for the transmission method of the [S1] to read only 1bit of data by the command 02.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10(DT10=8507H, DT11=1011H) [S2]: WX0 [N] : K1 [D] : DT100 Command conversion *Specify the coil No. of the destination for the starting No. of read. (Remote unit: X17) The quantity to read should be 1.

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (02H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 02 00 17 00 01 0B 5E

Example) When the 64 bits (4 words) of data from X10 to X4F is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, WX0, K1, DT100 ]
[S1]: H0 H0 H0 H4 DT10

Word unit Specifies No. of transmission words transmission (H001 to H07F)

*Bit units (H0) should be specified for the transmission method of [S1] to read in word units by the command 02.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10 (DT10=0004H, DT11=1011H) [S2]: WX0 [N]: K1 [D]: DT100 Command conversion *Specify the coil No. of the destination for the starting No. of read. (Remote unit: X10) The quantity to read should be the value of No. of specified words X 16. (64bit read)

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (02H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 02 00 10 00 40 7A A0

3 367
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Command 03 (DT read) send


Example) When the 6 words of data from DT500 to DT505 is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, DT0, K500, DT100 ]
[S1]: H0 H0 H0 H6 DT10

Word unit Specifies No. of transmission words transmission (H001 to H07F)

*Word units (H0) should be specified for the transmission method of [S1] to read in word units by the command 03.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10 (DT10=0006H, DT11=1011H) [S2]: DT0 [N]: K500 [D]: DT100 Command conversion * Specify the data No. of the destination for the starting No. of read. (Remote unit: DT500) The quantity to read should be the No. of specified words. (6word read)

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (03H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 03 01 F4 00 06 87 56

Command 04 (WL, LD read) send


Example) When the 6 words of data from WL20 to WL25 is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, WL0, K20, DT100 ]
[S1]: H0 H0 H0 H6 DT10

Word unit Specifies No. of transmission words transmission (H001 to H07F)

*Word units (H0) should be specified for the transmission method of [S1] to read in word units by the command 04.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10 (DT10=0006H, DT11=1011H) [S2]: WL0 [N]: K20 [D]: DT100 Command conversion * Specify the data No. of the destination for the starting No. of read. (Remote unit: WL20) The quantity to read should be the No. of specified words. (6word read)

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (04H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 04 00 14 00 06 32 9C

3 368
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Example) When the 6 words of data from LD100 to LD105 is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, LD0, K100, DT100 ]
[S1]: H0 H0 H0 H6 DT10

Word unit Specifies No. of transmission words transmission (H001 to H07F)

*Word units (H0) should be specified for the transmission method of [S1] to read in word units by the command 04.
[S1+1]: H1 H0 fixed H1 H1 DT11

Selects COM port (H1 or H2)

Unit No. (H01 to H63) (1 to 99)

[S1]: DT10 (DT10=0006H, DT11=1011H) [S2]: LD0 [N]: K100 [D]: DT100 Command conversion * Specify the data No. of the destination for the starting No. of read. (Remote unit: LD100) The quantity to read should be the No. of specified words. (6word read) *For specifying LD, it should be from 07D0H (LD0).

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (04H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 04 08 34 00 06 31 36

Flag conditions

Error flag (R9007) : Error flag (R9008) :

Turns on and stays on when Turns on for an instant when The control data of [S1] and [S1+1] is a value outside of the specified range. The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used. [S2]+[N] exceeds the area of [S2]. The MODBUS mode has not been specified for the COM port of the control data specified by [S1+1]. The area of [S2] is DT, WL and LD in the bit unit transmission. The device No. of [S2] is not 0.

Precautions during programming


It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution enabled flag (R9044: COM1/R904A: COM2) is on.
R9044 (COM1) R904A (COM2) 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled

3 369
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed.
R9045 (COM1) DT90124 (COM1) R904B (COM2) DT90125 (COM2) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.) If the transmission has been completed with an error (R9045 is on), the contents of the error (error code) are stored. 0: Completed normally 1: Completed with error (The error code is stored in DT90125.) If the transmission has been completed with an error (R904B is on), the contents of the error (error code) are stored.

For information on the contents of error codes, refer to the manual. If the error code is H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 2.5 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX)
73

Description
Timeout: Waiting for response

The F145 or F146 instruction cannot be executed if the target is a special internal relay (from R9000) or a special data register (from DT9000).

3 370
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

F146 (RECV)
Outline

Data receive (MODBUS master mode II: Type directly specifying MODBUS address)

Availability FP0R FPX: Ver. 2.50 FP: Ver. 3.20

Receives specified data from the serial port of another PLC or computer to the unit. Feature: Data can be transmitted with this instruction only.
Boolean Address 10 11 Instruction ST F146 DT H H DT R 0 10 10 20 50

Program example
Ladder Diagram

Trigger R0 F146 RECV, DT10 , H10 , S1


S1 S2 N D

(RECV)

10

H20 , DT50 N D

S2

Starting 16bit area for storing control data Specification of MODBUS address No. of received data Starting 16bit area address for storing data received

Operands
Operand S1 S2 N D A A N/A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A N/A A A EV A N/A A A Register DT A A A A LD A A A A Index register In (*1) N/A N/A N/A N/A A N/A N/A N/A A N/A N/A N/A SWR SDT Constant K A A A N/A H A A A N/A Index modifier A N/A A A

(*1) I0 to ID (*2) This instruction is available only for FP0R/FP V3.20 or later/FPX V.250 or later.

A: Available N/A: Not Available

Description
The data of the volume specified by [N] is received form the MODBUS address specified by [S2] with the specification of the transmission port, transmission command (1 or 2) and destination unit number, and stored in the operation memory specified by [D]. MODBUS commands are transmitted. (MODBUS commands 01, 02, 03 and 04) The feature is that data can be transmitted with this instruction only.

3 371
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Specifications for each item


[S1]: Specifying port number, transmission command and destination unit number
[S1]: H1 or H2
H1 H2 H3 H4

Selects COM Specifies Unit No. (H01 to HFF) port transmission command (1) Specifying COM port Specify H1 for COM 1 port, and H2 for COM2 port. If only one COM port is available, specify H1. (2) Specifying transmission command. Any one of H1, H2, H3 and H4 can be specified. (3) Specifying destination unit number Numbers in the range of H1 to HFF can be specified.

Specifying the MODBUS address of the destination unit where data is transmitted by [S2]. Settable address: H0 to HFFFF Specifying the number of data received by [N] Settable number of data For bit data: Max. 2040 (07F8H) For word data: Max. 127 (7FH) Specifying the area by [D] in which the data to be received is stored. Specify the starting number of the operation memory of the destination unit in which the data to be received is stored. This instruction can be executed even if the transmission command specified by [S1] and the device type in the destination unit differs. That means the contents of DT can be transmitted by specifying the bit data, or the contents of WR can be transmitted by specifying the word data. When the command 1 or 2 is specified, data is always stored from the bit 0 of [D].

Explanation of command Command 01 (Coil status read)


Example) When 1 bit is read from the bit address H7788 of the unit No. 17 connected to the COM1 and written in the bit of DT100 of the local unit. [ F146(RECV), H1111,H7788, K1, DT100 ]
[S1]: H1 H1 H1 H1

Selects COM port

Unit No. (H01 to HFF)

[S1]:H1111 [S2]:H7788 [N] :K1 [D] :DT100

Command conversion

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (01H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 01 77 88 00 01 64 C4

3 372
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Example) When 64 bits (4 words) are read from the bit address H7788 of the unit No. 17 connected to the COM1 and written in the bit 0 of DT100 of the local unit. [ F146(RECV), H1111,H7788, K64, DT100 ]
[S1]: H1 H1 H1 H1

Selects COM port

Unit No. (H01 to HFF)

[S1]:H1111 [S2]:H7788 [N] :K64 [D] :DT100

Command conversion

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (01H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 01 77 88 00 40 A4 F4

Command 02 (Input status read)


Example) When 1 bit is read from the bit address H7788 of the unit No. 17 connected to the COM1 and written in the bit of DT100 of the local unit. [ F146(RECV), H1211,H7788, K1, DT100 ]
[S1]: H1 H1 H1 H1

Selects COM port

Unit No. (H01 to HFF)

[S1]:H1211 [S2]:H7788 [N] :K1 [D] :DT100

Command conversion

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (02H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 02 77 88 00 01 20 C4

Example) When 64 bits (4 words) are read from the bit address H7788 of the unit No. 17 connected to the COM1 and written in the bit 0 of DT100 of the local unit. [ F146(RECV), H1211,H7788, K64, DT100 ]
[S1]: H1 H1 H1 H1

Selects COM port

Unit No. (H01 to HFF)

[S1]:H1211 [S2]:H7788 [N] :K64 [D] :DT100

Command conversion

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (02H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 02 77 88 00 40 E0 F4

3 373
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Command 03 (Holding register read)


Example) When 6 words are read from the address H7788 of the unit No. 17 connected to the COM1 and written in the area starting with DT100 in the local unit. [ F146(RECV), H1311,H7788, K6, DT100 ]
[S1]: H1 H3 H1 H1

Selects COM port

Unit No. (H01 to HFF)

[S1]:H1311 [S2]:H7788 [N] :K6 [D] :DT100

Command conversion

1 2 3 4 5 6 7 8

MODBUS commands Slave address Command (03H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L)

11 03 77 88 00 06 5C C6

Command 04 (Input register read)


Example) When 6 words are read from the address H7788 of the unit No. 17 connected to the COM1 and written in the area starting with DT100 in the local unit. [ F146(RECV), H1411,H7788, K6, DT100 ]
[S1]:H1411 [S2]:H7788 [N] :K6 [D] :DT100 1 2 3 4 5 6 7 8 MODBUS commands Slave address Command (04H) Starting No. of read (H) Starting No. of read (L) Quantity to read (H) Quantity to read (L) CRC16 (H) CRC16 (L) 11 04 77 88 00 06 E9 06

Command conversion

Flag conditions

Error flag (R9007) : Error flag (R9008) : Turns on when the control data of [S1] is a value outside of the specified range. Turns on when the MODBUS mode has not been specified for the COM port of the control data specified by [S1]. Turns on when the number of received data N is 0. Turns on when the number of received data is negative. Turns on when the number of received data [N] exceeds the limit of the MODBUS specifications. Turns on when the number of received data [N] exceeds the operation memory area specified by [D].

3 374
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Precautions during programming


It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution flag (R9044: COM1/R904A: COM2) is on.
R9044 (COM1) R904A (COM2) 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled 0: Execution inhibited (SEND/RECV instruction being executed) 1: Execution enabled

The SEND instruction only requests that the data be sent, but the actual processing thakes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed.
R9045 (COM1) DT90124 (COM1) R904B (COM2) DT90125 (COM2) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.) If the transmission has been completed with an error (R9045 is on), the contents of the error (error code) are stored. 0: Completed normally 1: Completed with error (The error code is stored in DT90125.) If the transmission has been completed with an error (R904B is on), the contents of the error (error code) are stored.

If the error code is H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 10 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX)
73

Description
Timeout: Waiting for response

For global transmission (the transmission performed by specifying H00 for the unit No.), the program should be set up so that the transmission is executed after a time of at least the maximum scan time elapsed. The F145 or F146 instruction cannot be executed if the target is a special internal relay (from R9000) on a special data register (DT90000).

3 375
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F146 (RECV) Data receive (MEWNET link) P146 (PRECV)


Outline Receives data from another station through link units in the network.
Boolean Address 10 11 Instruction ST F146 DT DT K DT R 0 10 0 100 50

Program example
Ladder Diagram

Trigger R0 F146 RECV, DT10 , DT 0 , K 100 , DT50 S1


S1 S2 N D

(RECV)

10

S2

Starting 16-bit area for storing control data Type of source operands for storing data in the remote station. Be sure to select the area by setting address 0 (source data area at another station). Starting 16-bit area address for the source operand specified in S2 above (source data area at another station). Starting 16-bit area address for storing data received (destination data area at local station).

Operands
Operand S1 S2 N D A A Relay WX WY WR WL A A A A A A Timer/Counter SV A A N/A A EV A A N/A A Register DT A A LD A A FL A A Index register IX N/A N/A N/A N/A IY N/A N/A N/A N/A Constant K N/A N/A A N/A H N/A N/A A N/A Index modifier A N/A A A A: Available N/A: Not Available

N/A N/A N/A N/A N/A A A A

N/A N/A N/A A A A

Explanation of example
1

Example of word unit reception When the control data is as follows: DT10(S1)=H0005 (=K5) Word unit 5 words DT11(S1+1)=H010A Unit No.10 Route No.1 the data from DT100 to DT104 of the unit No. 10 connected to route No. 1 is sent to DT50 to DT54 of the local station when the execution condition (trigger) R0 turns on.

3 376
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Example of bit unit reception When the control data is as follows: DT10(S1)=H850D Bit unit DT11(S1+1)=H010A Unit No.10 Route No.1 the on and off information of Bit No. 13 of DT100 of the unit No. 10 connected to route No. 1 is sent to Bit No. 5 of DT50 when the execution condition (trigger) R0 turns on.
Bit No. 13 of remote stations memory area Bit No. 5 of local stations memory area

Description
This reads the data in the area specified by S2 and N of a remote station connection with the MEWNETW, MEWNETP, MEWNETH, and stores it in the area specified by D of the local station. The remote stations (routes and unit numbers), the transmission unit (bit unit or word unit), the transmission method, and other parameters are specified by the control data S1. (Receiving request) D Local station Link unit Data S2 N Remote station

CPU

The remote station is specified by S1. If generalpurpose communication through the COM. port of the FP2, FP2SH, and FP10SH is being used, F144 (TRNS) instruction is used instead of this instruction. Refer to the section describing the F144 (TRNS) instruction.

3 377
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the various items


Control data (S1)
Specifying the remote station Specify the remote station by means of a route number and unit number. The setting is entered differently depending on whether the remote station is a PLC in the same network, or a PLC in a network on a different hierarchical level. Specifying the transmission unit and transmission method If data is to be received in word units, specify the data volume, and if it is to be received in bit units, specify the position of the target bit.

Specifying the memory area of the remote station (S2) and (N)
Specify the memory area of the remote station in which the data being received is to be stored, specifying the type S2 and the address N in combination.

Example:

S2: DT10, N: K100 DT100

Specifying the memory area of the local station (D)


Specify the memory area of the local station in which the data received from the remote station is to be stored.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The control data is a value outside of the specified range. Tthe remote station does not exist. The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit reception is being used.

Receiving from a PLC within the same network

Specifying the control data (S1+1, S1) The control data should be specified as an H constant. The transmission unit, transmission method and other parameters are specified with S1, and the remote station is specified with S1+1.
S1+1 S1

Specifying the remote station

Specifying the transmission unit and method

3 378
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

(1) Specifying word unit reception


If word unit reception is being used, the data for the specified number of words is sent from the memory area of the remote station specified by S2 and N, and is stored in the memory area of the local station that starts with D. If only the MEWNETH network is being used, up to 1,020 words can be received at one time, and if the network is using the MEWNETP/W, up to 16 words can be received at one time.
15 S1: Number of words received: H001 to H3FC (1 to 1020) Specifies H0. 11 7 4 0

Example: If 10 words of data are being received, K10(H000A) should be specified in S1.
(2) Specifying bit unit reception
When data is being sent in bit units, the information for the specified bit of the memory area of the remote station specified by S2 and N is stored in the specified bit of the memory area of the local station specified by D.
15 S1: Bit No. of remote station: H0 to HF(0 to 15) Specifies H0 Bit No. of local station: H0 to HF(0 to 15) Specifies H8. 11 7 4 0

Example: If the data from Bit No. 0 of the memory area in the remote station is being sent to Bit No. 15 of the local station memory area, H8F00 should be specified in S1.
(3) Specifying the remote station (common to both word/bit transmission)
15 S1+1: Unit No.: H01 to H40 (0 to 64) Route No.: H1 to H8(1 to 8) Specifies H0. 11 7 4 0

The unit number should be converted to a hexadecimal number and specified. For MEWNETW: H01 to H20 (1 to 32) For MEWNETP: H01 to H3F (1 to 63) For MEWNETH: H01 to H40 (1 to 64)

3 379
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Sending data from a PLC on a different hierarchical level


What is a hierarchical link?
A hierarchical link functions as a relay station between two link units installed on the same backplane, enabling communication between CPUs belonging to different networks.

Example:

Communicating with a CPU at depth 1


Power CPU Link Local station Relay station Power CPU Link

Depth 0

Unit of relay source

Unit of remote station Link Unit of relay destination

Power CPU

Depth 1

Remote station

In this way, by passing data through a relay station, communication is possible to a depth of 3.

Note
When using the MEWNETP and MEWNETW, data can only be relayed one network deeper in the hierarchy.

3 380
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Link

Highlevel Instructions

Example:

Communicating with a CPU at depth 3 (reception from CPU5 to CPU1)


Power CPU 1 Link Power CPU 2 Link Link

Link
Depth 1 Depth 3

Depth 0

Power CPU 4

Power CPU 3 Link Link


Depth 2

Power CPU 5

The numbers CPU1 to CPU5 have been temporarily assigned, for the purpose of indicating the relay order of the hierarchical links.
Specifying the control data (S1)
The control data should be specified as an H constant. The transmission unit, transmission method and other parameters are specified with S1, and the remote station is specified with S1+1 and subsequent parameters (the relay source unit, relay destination unit, and unit targeted for communication). (depth + 3) words are required.

Example:

Control data when specifying a remote station which is at depth 3


S1

Specifying the transmission unit and method


Depth (H03) Relay destination Relay destination Relay destination H00 CPU1 CPU2 CPU3 CPU4 CPU5

[S1+1] Local station [S1+2] Relay source [S1+3] Relay source [S1+4] Relay source [S1+5] Remote station

Link

Link

Specifying the remote station

: Same network :Same backplane The relay source is specified by a unit No. in the network, and the relay destination is specified by a route number on the backplane.

3 381
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

(1) Specifying word unit reception


If word unit reception is being used, the data for the specified number of words is sent from the memory area of the remote station specified by S2 and N, and is stored in the memory area of the local station beginning with D. If only the MEWNETH network is being used, up to 1,020 words can be received at one time, and if the network is using the MEWNETP and MEWNETW, up to 16 words can be received at one time.
15 S1: Number of words received : H001 to H3FC (1 to 1020) Specifies H0. 11 7 4 0

Example:

If 10 words of data are being received, K10(H000A) should be specified in S1.

(2) Specifying bit unit reception


When data is being sent in bit units, the information for the specified bit of the memory area of the remote station specified by S2 and N is stored in the specified bit of the memory area of the local station specified by D.
15 S1: Bit No. of remote stations memory area: H0 to HF(0 to 15) Specifies H0 Bit No. of local stations memory area: H0 to HF(0 to 15) Specifies H8. 11 7 4 0

Example:

If the data from Bit No. 0 of the memory area in the remote station is being sent to Bit 15 of the local station memory area, H8F00 should be specified in S1.

(3) Specifying the remote station (common to both word/bit transmission)


1

Specifying the route No. and depth

S1+1: Depth of remote station: H01 to H03 Route No. of local station: H1 to H8 Specifies H8.

3 382
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the relay station S+1 should be used to specify only the specified amount of depth, while (S1+3) is used to specify depth 2 for the same item, and (S1+4) is used to specify depth 3.

S1+2: Route No. of relay destination in depth 1: H01 to H08 Unit No. of relay source in depth 1: H01 to H40 (1 to 64)
3

Specifying the remote station This should be specified right after the specification of the relay station.

S1+n: (n = depth + 2) Specifies H00 Unit No. of remote station: H01 to H40(1 to 64)

Example:

When using the program example shown on page 3 376. In this example, the data from DT100 to DT104 of the CPU (CPU5) is received in DT50 to DT54 of the local station (CPU1) shown below.
Connection diagram
1 1 2 3

Power CPU 1 Link

Power CPU 2 Link Link


1 2 3 4 No.2 1 2

Link
3

Power CPU 4

Power CPU 3 Link Link

Link
No.4

Power CPU 5

DT50 to DT54

No.16

DT100 to DT104

Link
No.10

3 383
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

In this example, the control data beginning with DT10 (depth 3 6 words) should be specified as shown below. To receive the 5 words of data DT10 = H0005
CPU1 0 CPU2 CPU2 1 CPU3 CPU3 2 CPU4 CPU4 3 CPU5 : Depth No.10 DT15=H0A00 No.16 Route 2 DT14=H1002 No.4 Route 1 DT13=H0401 No.2 Route 3 DT12=H0203 Route 1 DT11=H8103

Precautions during programming


It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions at the same time. The program should be set up so that these instructions are executed when the MEWNET send/receive execution enabled flag (R9030) is on.
R9030 0: Execution inhibited F145 (SEND)/F146 (RECV) instruction being executed) 1: Execution enabled

The F146 (RECV) instruction only requests that the data be received, but the actual processing takes place when the ED instruction is executed. The MEWNET send/receive completed flag (R9031) can be used to check whether or not the reception has been completed.
R9031 DT9039 (DT90039) 0: Completed normally 1: Completed with error (The error code is stored in DT9039.) If the transmission has been completed with an error (R9031 is on), the contents of the error (error code) are stored.

For information on the contents of error codes, refer to the manual for that particular link unit. If the error code is H71 to H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 10 ms), using the setting of system register 32. The default value is set to 10 seconds for FP2/FP2SH/FP10SH. Error code (HEX)
H71 H72 H73

Description
Time out: Waiting for transmission answer Timeout: Waiting for transmission buffer to be emptied Timeout: Waiting for response

The F146 (RECV) instruction cannot be executed if the target is a special internal relay (from R9000) or a special data register (from DT9000/DT90000).

3 384
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Additional information concerning the F146 (RECV) instruction


Receiving the special data registers and special internal relays using the data transfer instruction Special data registers and special internal relays cannot be transferred using the F146 (RECV) instruction. Use a program like that shown below to receive these types of data. Receiving special data registers in the FP2 , FP2SH or FP10SH (source issuing the command: FP2/FP2SH/FP10SH)
X10 10 F146 RECV, S, DT90000, Kn, DT0

Receiving special internal relays (source issuing the command: FP2/FP2SH/FP10SH)


X10 10 F146 RECV, S, WR900, Kn, DT0

How to receive FL (How to specify FL banks)


How to specify the FL bank for destination units The FL to communicate is specified like FL0 + H10. Specify FL1 + H10 to specify the FL of the bank 1 (FL2 + H10 for the bank 2) How to specify the FL bank for a local unit Normally, FLn is specified for the FL for the local unit. If specifying, the FL will be received at the FL bank which has been selected in the execution of this instruction.

3 385
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F147 (PR)
Outline Program example

Printout

Outputs ASCII codes to the printer (for transistor output type only).
Boolean Address 10 11 12 14 Instruction ST DF OR F147 DT WY R 9033 (PR) 0 0 R 10

Ladder Diagram

Trigger 10 12 R10 R9033


Printout flag

(DF )

F147 PR , DT 0 , WY 0 S D

S D

Starting 16-bit area for storing 12 bytes (6 words) of ASCII codes (source) Word external output relay used for output of ASCII codes (destination)

Operands
Relay Operand WX WY WR S D A N/A A A A WL (*1) A Timer/Counter SV A N/A EV A N/A Register DT A LD FL (*1) (*2) A A Index register I N/A N/A Constant K N/A N/A H N/A N/A Index modifier N/A N/A A: Available N/A: Not Available

N/A N/A

N/A N/A N/A

(*1) This cannot be used with the FP0 and FPe. (*2) This cannot be used with the FP0, FPe, FP0R, FP, FPX.

3 386
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The ASCII codes stored in data registers DT0 to DT5 are output through word external output relay WY0 when trigger R10 turns on. Source: ASCII code for 12 character A, B, C, D, E, F, G, H, I and J
Data register
ASCII HEX code ASCII character

DT5 0D 0A CR LF

DT4 4A J 49 I

DT3 48 H 47 G

DT2 46 F 45 E

DT1 44 D 43 C

DT0 42 B 41 A

Control data for printer

ASCII codes R10: on

Destination
WY0

YF YE YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

Y0 to YF: for data signals of printer (Y0 to Y7 correspond to DATA1 to DATA8 of printer.) Y8: for strobe signal of printer Y9 to YF: not used

Description
Outputs the ASCII codes for 12 characters stored in the 6-word area specified by S through the word external output relay WY specified by D.
15 S S+1 S+2 S+3 S+4 S+5 0 WY D1 to D8 STROBE

If the specified output is connected to a commercial printer, the characters corresponding to the output ASCII code are printed. Only bit positions 0 to 8 of WY are used in the actual printout.
YF YE YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

WY0 Y0 to YF: for data signals of printer (Y0 to Y7 correspond to DATA1 to DATA8 of printer.) Y8: for strobe signal of printer Y9 to YF: not used

ASCII code is output in order starting from the lower byte of the starting area. Be sure to set the control code (LF and CR) for the printer as the final word of the data. Three scans are required for 1 character constant output. Therefore, 37 scans are required until 12 character constants are output. (See Time chart)

3 387
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


Multiple F147 (PR) instructions cannot be executed at the same time. The program should be set up so that the printout flag (R9033) is used during execution of F147 (PR) instruction to inhibit simultaneous execution. The ASCII code conversion instruction [F95 (ASC)] can be used to convert character constants (M) to ASCII codes. Character constants (M) can be input only with programming tool software. A transistortype output unit/board is necessary. When this instruction is executed, of the WY area specified by D, zero <off> is set for Y_9 to Y_F.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The ending area for storing ASCII codes exceeds the limit. The trigger of another F147 (PR) instruction turns on while one F147 (PR) instruction is being executed. Printout flag (R9033): Turns on and stays on while a F147 (PR) instruction is being executed.

Connection example
Transistor output type (output: 9 points or more) Printer (centronics interface)

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 : COM

DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 STROBE GND

Data setting Example: ASCII code for 10 character A, B, C, D, E, F, G, H, I and J


Data register
ASCII HEX code

DT5 0D 0A

DT4 4A J 49 I

DT3 48 H 47 G

DT2 46 F 45 E

DT1 44 D 43 C

DT0 42 B 41 A

ASCII character CR LF

Control data for printer

ASCII codes

3 388
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Time chart
A Signal of output unit ASCII HEX code (Y0 to Y7) Strobe signal (Y8) R9033 Number of scans
on off on off

B H42

C H43

D H44

E H45

CR H0D

LF H0A

H41

F147 (PR) instruction execution


0 1 2 3 4 5 6 7 8 9 1011 121314151617 323334353637

Using printer output during 8point output


When only eight output points are being used, connections should be made as shown below, and the program should be set up so that the strobe signal is output from Y7. Connection example
Transistor output type (output: 8 point) Printer (centronics interface)

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 STROBE GND

COM

Program example
X10 R9033 Y8 Y7 Strobe signal is output from Y7. F147 PR, DT0, WY0

3 389
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F148 (ERR) P148 (PERR)


Outline

Self-diagnostic error set

Sets the specified condition as a self-diagnostic error. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P148 (PERR) is not available.
Boolean Address 10 Instruction ST F148 K 20 ST F148 K R R 0 (ERR) 100 1 (ERR) 0

Program example
Ladder Diagram

Selfdiagnostic error set Trigger 10 R0 n F148 ERR , K 100

11

Selfdiagnostic error clear R1 F148 ERR , K 0 20 Trigger


n

21

n
Self-diagnostic error code number Range: 0 and 100 to 299

Operands
Operand n Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register IX N/A IY N/A Constant K A H A Index modifier N/A A: Available N/A: Not Available

N/A N/A N/A

Explanation of example
The selfdiagnosis error 100 is set when the execution condition (trigger) R0 turns on. For FP0/FPe/FP0R/FP/FPX, the ERROR (ERROR/ALARM) LED on the control unit blinks and for FP2/FP2SH/FP10SH, ERROR LED on CPU lights, and operation stops. (If a situation occurs in which you wish to set the selfdiagnosis error 100, set up the program so that input R0 turns on.) When the execution condition (trigger) R1 turns on, selfdiagnostic errors of error codes 43 and higher are cleared.

3 390
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Along with selfdiagnostic error codes specified by n being stored in the special data register DT9000 on DT90000, the selfdiagnostic error flag (R9000) is turned on. Also, for FP0/FPe/FP0R/FP/FPX, the ERROR/ALARM on the control unit blinks and for FP2/FP2SH/FP10SH, ERROR LED on the CPU lights. The specified value n is what determines whether operation stops or continues when the instruction is executed. n setting K100 to K199 K200 to K299 Operation when error occurs Operation stops Operation continues

If n is set to a value between K200 and K299, if several F148 (ERR) instructions are processed at one time, codes are received in sequential order, starting with the lowest number. If n is set to 0 and the F148 (ERR) instruction is executed, selfdiagnostic errors with error codes of 43 and higher are cleared. For FP0/FPe/FP0R/FP/FPX, ERROR/ALARM LED: turned off For FP2/FP2SH/FP10SH, ERROR LED: turned off R9000, R9005, R9006, R9007, R9008: off DT9000, DT9017, DT9018: Cleared to 0 DT90000, DT90017, DT90018: Cleared to 0 F148 (ERR) instructions which specify the same error code can be notated in duplicate in the program.

Confirmation of selfdiagnostic error


Selfdiagnostic errors are checked in the normal way. FP0 C10, C14, C16,C32/FPe DT9000 DT9017 DT9018 FP0 T32/FP0R/FP/FPX/ FP2/FP2SH/FP10SH DT90000 DT90017 DT90018

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the value of n exceeds the limit of specified range K0, or K100 to K299. Turns on and stays on when the value of n exceeds the limit of specified range K0, or K100 to K299.

3 391
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F149 (MSG) P149 (PMSG)


Outline

Message display

Displays the message specified character constant on the programming tool. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P149 (PMSG) is not available.
Boolean Address 10 11 Instruction ST F149 R 10 (MSG)

Program example
Ladder Diagram

Trigger 10 R10 F149 MSG , M TEST PROGRAM S


S Character constant for message

M TEST PROGRAM

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT LD FL Index register IX N/A IY N/A K N/A Constant H N/A M A Index modifier N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Displays the message TEST PROGRAM on the programming tool when trigger R10 turns on.

Description
This instruction is used for displaying message specified by S on the programming tool. The character constants (M) can be input only with programming tool software. When the F149 (MSG) instruction is executed, the message flag (R9026) turns on and the message specified by S is set in special data registers DT9030 to DT9035/DT90030 to DT90035. Type FP0 C10, C14, C16, C32/FPe FP0 T32/FP0R/FP/FPX/ FP2/FP2SH/FP10SH Special data register DT9030 to DT9035 DT90030 to DT90035

Once the message is set in the special data registers, the message cannot be changed even if the F149 (MSG) instruction is executed again. To clear the message in the special data registers, click on the Cancel button on Display PLC Message screen using the programming tool software.

3 392
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying Slot Numbers


With the FP The slot numbers of target intelligent unit are allocated automatically, based on the installation position.
Number being specified
3 2 1 0 Control unit

Expansion unit Intelligent unit

With the FP2 and FP2SH The slot numbers of the target intelligent unit are allocated automatically, based on the installation position. Slot numbers are allocated in the order of the board number. With 7, 9, and 12module type boards, slot numbers are specified in the same way as with the 14module type.
Number being specified (Hexadecimal constants) 16 slots (slots which can be counted as slot numbers) 14 slots (number of slots on backplane)

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Power supply

CPU side (14module type backplane) 16 slots (slots which can be counted as slot numbers) 14 slots (number of slots on backplane)

10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
Power supply

Expansion side (14module type backplane)

3 393
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

With the FP3 and FP10SH The slot numbers of the target intelligent unit are allocated automatically, based on the installation position. Slot numbers are allocated in the order of the board number. With 3slot and 5slot boards, slot numbers are specified in the same way as with 8slot boards.
Number being specified (Hexadecimal constants)
00 Power supply 01 02 03 04 05 06 07

Expansion

Board number =1
Power supply

CPU

08

09

0A

0B

0C

0D

0E

0F

10 11 12 13 14 15

Expansion

Board number =2
Power supply

10

11

12

13

14

15

16

17

16 17 18 19 20 21 22 23

Expansion

Board number =3
Power supply

18

19

1A

1B

1C

1D

1E

1F

24 25 26 27 28 29 30 31

3 394
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F150 (READ) Data read from intelligent unit P150 (PREAD)


Outline Reads data from the shared memory in an intelligent unit.
Boolean Address 10 11 Instruction ST F150 H K K DT R 10 3 19 4 0

Program example
Ladder Diagram

Trigger R10 F150 READ, H 3, K 19, K 4, DT 0 S1


S1 S2 n D

(READ)

10

S2

16-bit equivalent constant for specifying the bank number in the shared memory of the intelligent unit. 16-bit equivalent constant for specifying the starting address in the shared memory of the intelligent unit (source data address). 16-bit equivalent constant for specifying the number of words to be read. Starting 16-bit area address for storing read data (destination data address).

Operands
Relay Operand WX WY WR WL S1 S2 n D N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A A A A SV N/A N/A N/A A EV N/A N/A N/A A DT LD Timer/Counter Register FL (*1) Index register I N/A N/A N/A N/A Constant K A A A N/A H A A A N/A Index modifier A A A A A: Available N/A: Not Available

N/A N/A N/A N/A N/A N/A N/A N/A N/A A A A

(*1) This cannot be used with the FP.

3 395
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Reads four words of data stored in the addresses starting from K19 to K22 of the intelligent unit shared memory (located in slot 3) and stores them in data registers DT0 to DT3 of CPU when trigger R10 turns on.
0 1 2 3 4

(Slot No.)

Power

CPU

Intelligent unit
0 17 18 19 20 21 22 23 24 DT0 DT1 DT2 DT3 DT4 DT5

CPU 4 words

Description
The n words of the data stored in the shared memory of the intelligent unit/board specified by S1 is read from the address specified by S2, and is stored in the area specified by D of the CPU.

Specifying the various items


Specifying the slot number and bank number (S1)
Specify the slot in which the intelligent unit has been installed. If the memory has a bank, enter a specification that matches the bank number.

Initial readout address of the shared memory for the intelligent unit (S2)
Specify this referring to the shared memory tables for the various intelligent units. To specify address 2, specify K2.

Number of words to be read (n)


Specify this using a K constant. To read 10 words of data, specify K10.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The value of S1 exceeds the limit of specified range. The area specified using the index modifier exceeds the limit. The read data exceeds the area of D.

3 396
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying S1
Intelligent unit without bank
Specify the slot number in which the target intelligent unit has been installed.
Upper byte S1 H00 Slot No.: H00 to H1F Lower byte

Intelligent unit with bank


Specify the slot number (H constant) in which the target intelligent unit has been installed, and the bank number (H constant).
Upper byte S1 Slot No.: H00 to H1F Bank No.: H00 to HFF Lower byte

Reference: Intelligent unit with bank


Name FP3 expansion data memory unit FP expansion data memory unit Order No. AFP32091 AFP32092 AFPG201

3 397
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F151 (WRT) P151 (PWRT)


Outline Program example

Data write into intelligent unit

Writes data into the shared memory in an intelligent unit.


Boolean Address 10 11 Instruction ST F151 H DT K K R 10 (WRT) 0 10 5 0

Ladder Diagram

Trigger R10 F151 WRT, H 0, DT 10, K 5, K 0 S1


S1 S2 n D

10

S2

16-bit equivalent constant for specifying the bank number in the shared memory of the intelligent unit. Starting 16-bit area address for storing data written in the shared memory. 16-bit equivalent constant for specifying the number of words written in the shared memory. Starting 16-bit area address for storing data written (destination data address).

Operands
Relay Operand WX WY WR WL S1 S2 n D N/A N/A N/A N/A A A A A SV N/A A N/A N/A EV N/A A N/A N/A DT LD Timer/Counter Register FL (*1) Index register I N/A N/A N/A N/A Constant K A N/A A A H A N/A A A Index modifier A A A A A: Available N/A: Not Available

N/A N/A N/A A A A

N/A N/A N/A N/A N/A N/A N/A N/A

N/A N/A N/A N/A N/A N/A

(*1) This cannot be used with the FP.

3 398
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Five words of data stored in data registers DT10 to DT14 of CPU are written into the addresses starting from K0 to K4 of the intelligent unit shared memory (located in slot 0) when trigger R10 turns on.
0 1 2 3 4 (Slot No.)

Power

CPU CPU

Intelligent unit
0 1 2 3 4 5 6

DT0 DT1 DT10 DT11 DT12 DT13 DT14

5 words

Description
Writes n words of the initial data from the area specified by S2 of the CPU to the address specified by D of the shared memory of the intelligent unit specified by S1.

Specifying the various items


Specifying the slot number and bank number (S1)
Specify the slot in which the intelligent unit has been installed. If the memory has a bank, enter a specification that matches the bank number.

Number of words to be written (n)


Specify this using a K constant. To write 10 words of data, specify K10.

Initial address written to the shared memory of the intelligent unit (D)
Specify this referring to the table of shared memories for the various intelligent units. To specify address 2, specify K2.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The value of S1 exceeds the limit of specified range. The area specified using the index modifier exceeds the limit. The range of writing data exceeds the area specified using S2.

3 399
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying S1
Intelligent unit without bank
Specify the slot number in which the target intelligent unit has been installed.
Upper byte S1 H00 Slot No.: H00 to H1F Lower byte

Intelligent unit with bank


Specify the slot number (H constant) in which the target intelligent unit has been installed, and the bank number (H constant).
Upper byte S1 Slot No.: H00 to H1F Bank No.: H00 to HFF Lower byte

Reference: Intelligent unit with bank


Name FP3 expansion data memory unit FP expansion data memory unit Order No. AFP32091 AFP32092 AFPG201

3 400
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F152 (RMRD) Data read from MEWNET-F slave station P152 (PRMRD)
Outline Reads data from the specified intelligent unit of the MEWNET-F slave station
Boolean Address 10 11 Instruction ST F152 DT K K DT R 10 0 0 10 10

Program example
Ladder Diagram

Trigger R10 F152 RMRD, DT 0, K 0, K 10, DT 10 S1


S1 S2 n D

(RMRD)

10

S2

Lower 16-bit area of two 16-bit areas for storing control data for F152 (RMRD)/P152 (PRMRD) 16-bit equivalent constant or 16-bit area for specifying starting shared memory address in the intelligent unit 16-bit equivalent constant or 16-bit area for specifying number of read data words Starting 16-bit area for storing the read data

Operands
Relay Operand WX WY WR WL S1 S2 n D A A A N/A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A FL A A A A Timer/Counter Register Index register IX (*1) N/A A A N/A IY (*2) N/A A A N/A Constant K N/A A A N/A H N/A A A N/A Index modifier A A A A A: Available N/A: Not Available

(*1) With the FP2, FP2SH, and FP10SH, this is I0 to IC. (*2) With the FP2, FP2SH, and FP10SH, this is ID.

3 401
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Ten words of data stored at address 0 to 9 in the shared memory of the intelligent unit of the slave station specified by DT0 and DT1 are read and the read data stored in data registers DT10 to DT19 of the master station CPU when R10 turns on.
No.5
0 1 2 3 4

CPU Master 1

Master 2

Power

Power

Master station 1

Slave
DT0=H105 DT1=H0

0 1 2 8 9

Intelligent unit (shared memory)


DT10 DT11 DT12 DT18 DT19

CPU

Description
This reads n words of the data stored in the shared memory of the intelligent unit of the slave station on the MEWNETF (remote I/O system) specified by S1 and S1+1 from the address specified by S2, and stores it in the area of the master station CPU specified by D.

Specifying the various items


Control data (S1)
Specify the master station number, slave station number, and slot number (and the bank number, if there is a bank), and specify the memory of the intelligent unit (for detailed information, refer to the following page).

Initial readout address of the shared memory for the intelligent unit (S2)
Enter the specification, referring to the shared memory tables for the various intelligent units. To specify address 2, specify K2.

Number of words to be read (n)


Specify this using a K constant. To read 10 words of data, specify K10.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The control data S1 exceeds the limit of specified range. No MEWNET-F master unit is found. The area specified using the index modifier exceeds the limit. The read data exceeds the area of D.

3 402
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying control data (S1+1 and S1)


Specify the master station number and the slave station number with S1, and the slot number of the target intelligent unit with S1+1. Intelligent unit without bank
Upper byte S1 Slave station No.H01 to H20 (1 to 32) Master station No. H01 to H04 (1 to 4) Upper byte S1+1 H00 Slot No.H00 to H1F Lower byte Lower byte Lower byte

Intelligent unit with bank


Upper byte S1 Slave station No.H01 to H20 (1 to 32) Master station No. H01 to H04 (1 to 4) Upper byte S1+1 Slot No.H00 to H1F Bank No.H00 to HFF Lower byte

Reference: Intelligent unit with bank


Name FP3 expansion data memory unit Order No. AFP32091 AFP32092

Example of setting
When specifying the intelligent unit installed in slot number 0 of the No. 5 slave station on the path of the No. 1 master station, using the program example on page 3 401, the program will be structured as follows.
R10 F0 MV, H0105, DT0 F0 MV, H 0 , DT1

F152 RMRD, DT0, K0, K10, DT10

The control data is specified as shown below. DT0=H0105 (master station No.1 and slave station No.5) DT1=H0 (slot 0)

3 403
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


It is not possible to execute multiple F152 (RMRD) instructions and F153 (RMWT) instructions at the same time. The program should be set up so that these instructions are executed when the F152 (RMRD)/F153 (RMWT) instruction execution enabled flag (R9035) is on. R9035
0: Execution inhibited (RMRD/RMWT instruction being executed) 1: Execution enabled

The F152 (RMRD) instruction only enables a request to be accepted. The actual processing is carried out with the ED instruction. The F152 (RMRD)/F153 (RMWT) instruction completed flag (R9036) can be used to confirm whether or not the instruction has been executed. R9036
0: Completed normally 1: Completed with error (The error code is stored in DT9036/DT90036)

DT9036 If the transmission has been completed with an error (R9036 is on), the contents of the error (error (DT90036) code) are stored.

Reference: The error codes stored in the DT9036/DT90036


Error code (HEX) Description H5B H68 H71 H72 H73
Timeout error (no intelligent unit found at the specified location.) No memory error (no memory exists at the specified address.) Send answer timeout error Send buffer full timeout error Response timeout error

If the error code is H71 to H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 s (in units of 10 ms), using the setting of system register 32. The default value is set to 2 seconds for FP3 and 10 seconds for FP2/FP2SH/FP10SH.

3 404
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F153 (RMWT) Data write into MEWNET-F slave station P153(PRMWT)


Outline Writes data into the specified intelligent unit of the MEWNET-F slave station.
Boolean Address 10 11 Instruction ST F153 DT DT K K R 10 0 250 20 500

Program example
Ladder Diagram

Trigger R10 F153 RMWT, DT 0, DT 250, K 20, K 500 S1


S1 S2 n D

(RMWT)

10

S2

Lower 16-bit area of two 16-bit areas for storing control data of F153 (RMWT)/P153 (PRMWT) Starting 16-bit area for storing data transferred to the shared memory 16-bit equivalent constant or 16-bit area for specifying number of data words written 16-bit equivalent constant or 16-bit area for storing the starting address of the shared memory in the intelligent unit

Operands
Relay Operand WX WY WR WL S1 S2 n D A A A A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A FL A A A A Timer/Counter Register Index register IX (*1) A A A A IY (*2) N/A N/A A A Constant K N/A N/A A A H N/A N/A A A Index modifier A A A A A: Available N/A: Not Available

(*1) With the FP2, FP2SH, and FP10SH, this is I0 to IC. (*2) With the FP2, FP2SH, and FP10SH, this is ID.

3 405
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Twenty words of data stored in data registers DT250 to DT269 of the master station CPU are written into the shared memory of the intelligent unit of slave station starting from address 500 to 519 specified by DT0 and DT1 when R10 turns on.
No.10
0 1 2 3 4

CPU Master 1

Master 2

Power

Power

Master station 2

Slave

DT0=H20A DT1=H 2

CPU
DT250 DT251 DT252

Intelligent unit (shared memory)


500 501 502

DT267 DT268 DT269

517 518 519

Description
This writes the initial n words of the data from the area specified by S2 of the CPU to the address specified by D of the shared memory of the intelligent unit of the slave station on the MEWNETF (remote I/O system) specified by S1 and S1+1.

Specifying the various items


Control data (S1)
Specify the master station number, slave station number, and slot number (and the bank number, if there is a bank), and specify the memory of the intelligent unit (for detailed information, refer to the following page).

Specifying the address of the shared memory (S2)


Enter the specification, referring to the shared memory tables for the various intelligent units. To specify address 2, specify K2.

Number of words to be write (n)


Specify this using a K constant. To write 10 words of data, specify K10.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The control data S1 exceeds the limit of specified range. No MEWNET-F master unit is found. The area specified using the index modifier exceeds the limit. The range of writing data exceeds the area of S2.

3 406
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying control data (S1+1 and S1)


Specify the master station number and the slave station number with S1, and the memory of the target intelligent unit with S1+1. Intelligent unit without bank
Upper byte S1 Slave station No.: H01 to H20 (1 to 32) Master station No.: H01 to H04 (1 to 4) Upper byte S1+1 H00 Slot No: H00 to H1F Lower byte Lower byte Lower byte

Intelligent unit with bank


Upper byte S1 Slave station No.: H01 to H20 (1 to 32) Master station No.: H01 to H04 (1 to 4) Upper byte S1+1 Slot No.: H00 to H1F Bank No.: H00 to HFF Lower byte

Reference: Intelligent unit with bank


Name FP3 expansion data memory unit Order No. AFP32091 AFP32092

Example of setting
When specifying the intelligent unit installed in slot number 2 of the No. 10 slave station on the path of the No. 2 master station, using the program example on page 3 405, the program will be structured as follows.
R10 F0 MV, H020A, DT0 F0 MV, H 2, DT1

F153 RMWT, DT0, DT250, K20, K500

The control data is specified as shown below. DT0=H020A (master station No.2, slave station No.10) DT1=H2 (slot 2)

3 407
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


It is not possible to execute multiple F152 (RMRD) instructions and F153 (RMWT) instructions at one time. The program should be set up so that these instructions are executed when the F152 (RMRD)/F153 (RMWT) instruction execution enabled flag (R9035) is on.
R9035 0: Execution inhibited (RMRD/RMWT instruction being executed) 1: Execution enabled

The F152 (RMRD) instruction only enables a request to be sent. The actual processing is carried out with the ED instruction. The F152 (RMRD)/F153 (RMWT) instruction completed flag (R9036) can be used to confirm whether or not the instruction has been executed.
R9036 DT9036 (DT90036) 0: Completed normally 1: Completed with error (The error code is stored in DT9036/DT90036) If the transmission has been completed with an error (R9036 is on), the contents of the error (error code) are stored.

Reference: The error codes stored in the DT9036/DT90036


Error code (HEX)
H5B H68 H71 H72 H73

Description
Timeout error (no intelligent unit found at the specified location.) No memory error (no memory exists at the specified address.) Send answer timeout error Send buffer full timeout error Response timeout error

If the error code is H71 to H73, a communication timeout error has occurred. The timeout time can be changed within a range of 10.0 ms to 81.9 s (in units of 10 ms), using the setting of system register 32. The default value is set to 2 seconds for FP3 and 10 seconds for FP2/FP2SH/FP10SH.

3 408
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F155 (SMPL) P155 (PSMPL)


Outline Program example

Availability

Sampling start

FP2/FP2SH/FP10SH FPX (V2.00 or more) FP (V3.10 or more)/FP0R

Starts sampling data which is preset in trace memory.


Boolean Address 10 11 Instruction ST F155 R 10

Ladder Diagram

Trigger R10 10 F155 SMPL

(SMPL)

Explanation of example
When the execution condition (trigger) R10 turns on, sampling of a relay (contact) and register registered in advance is carried out.
R10 off
on on off

Sampling

Sample

off

on

on

off

Registration of the data to be sampled, specification of the sampling method (such as the cable and the time interval), and specification of the sampling trace can be done using only the programming tool software.

Description
During a sampling trace, sampling of the specified data (relay contacts and registers) is carried out, and the data contents at the time of sampling are stored in the sampling trace memory. If the sampling trace settings and the startup have not been specified using the programming tool software, processing will not be carried out, even if the execution condition (trigger) is fulfilled.

3 409
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Sampling traces
This is a function which samples the on/off status of the registered relay and the data stored in the register, either periodically or when the appropriate conditions have been fulfilled, and stores the results in memory. It can be used to confirm changes in the data. 16 relays points and 3 words of registers can be set.

Procedure for executing a sampling trace


1. Specify registration of the data to be sampled and the sampling method (such as the number of times or the time interval). 2. Indicate that the sampling trace is to begin. 3. Sampling is carried out. Sampling can be carried out using with periodic sampling or sampling based on the F155 (SMPL) instruction. 4. Stops a sampling trace Programming tool software online operation or executing the F156 (STRG) instruction applies a stop command trigger. (When a trigger is applied, sampling of the specified delay is carried out, and then sampling stops.) (The programming tool software can also be used to initiate a forced stop.) 5. The programming tool software can be used to read the sampling results from the CPU, and to monitor and confirm them.

3 410
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F156 (STRG) P156 (PSTRG)


Outline Program example

Availability

Sampling stop

FP2/FP2SH/FP10SH FPX (V2.00 or more) FP (V3.10 or more)/FP0R

Stops sampling data.


Boolean Address 10 11 Instruction ST F156 R 10

Ladder Diagram

Trigger R10 F156 STRG

(STRG)

10

Explanation of example
When the execution condition (trigger) R10 turns on, a sampling trace stop command trigger is applied.
R10 off
on on off

Sampling

Delay times Sampling trace stops Stop command trigger Registration of the data to be sampled, specification of the sampling method (such as the cable and the time interval), and specification of the sampling trace can be done using only the programming tool software.

Description
This instruction applies a sampling trace stop command trigger. When a trigger is applied, sampling of the specified delay is carried out, and then sampling trace stops. If the sampling trace settings and the startup have not been specified using the programming tool software, processing will not be carried out, even if the execution condition (trigger) is fulfilled.

3 411
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Sampling traces
This is a function which samples the on/off status of the registered relay and the data stored in the register, either periodically or when the appropriate conditions have been fulfilled, and stores the results in memory. It can be used to confirm changes in the data. 16 relays points and 3 words of registers can be set.

Procedure for executing a sampling trace


1. Specify registration of the data to be sampled and the sampling method (such as the number of times or the time interval). 2. Indicate that the sampling trace is to begin. 3. Sampling is carried out. Sampling can be carried out using with periodic sampling or sampling based on the F155 (SMPL) instruction. 4. Stops a sampling trace Programming tool software online operation or executing the F156 (STRG) instruction applies a stop command trigger. (When a trigger is applied, sampling of the specified delay is carried out, and then sampling stops.) (The programming tool software can also be used to initiate a forced stop.) 5. The programming tool software can be used to read the sampling results from the CPU, and to monitor and confirm them.

3 412
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F157 (CADD) P157 (PCADD)


Outline

Time addition

Adds specified time data (hours, minutes, and seconds) to date (years, months, and days) and clock (hours, minutes, and seconds) data. For the FP0R/FP/FPX, the P type highlevel instruction P157 (PCADD) is not available.
Boolean Address 10 11 Instruction ST F157 DT DT DT R 0 9054 10 30

Program example
Ladder Diagram

Trigger R0 F157 CADD, DT 9054, DT 10, DT 30 S1* S2 D

(CADD)

10

(* When FP0R/FP/FPX/FP2/FP2SH/FP10SH, S1 = DT90054)


S1 S2 D Starting 16-bit area for storing date/clock data (3 words are occupied in form of BCD). Starting 16-bit area for storing time data (2 words are occupied in form of BCD). Starting 16-bit area for storing result (3 words are occupied in form of BCD).

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register Index register IY N/A N/A N/A Constant Index modifier FL IX (* (* LD **** **** ) ) A A A A A A N/A A N/A

K N/A A N/A

H N/A A N/A

A A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0, FPe, FP0R, FP, FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 413
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Adds the time data stored in data registers DT11 and DT10 to the clock/calendar data stored in special data registers DT9054 to DT9056 (DT90054 to DT90056) when trigger R0 turns on. The result is stored in data registers DT32, DT31, and DT30.

June 17, 1992 10: 30 24: H920617103024 (BCD)


DT9056 (DT90056) 9 2 0 6 1 DT9055 (DT90055) 7 1 0 3 DT9054 (DT90054) 0 2 4

June 18, 1992 7: 15 24: H920618071524 (BCD)


DT32 9 2 0 6 1 8 DT31 0 7 1 5 DT30 2 4

Description
The date/clock data (3 words) specified by S1 and the time data (2 words) specified by S2 are added together. The result (time of elapsed value) is stored in the area (3 words) specified by D.


Years Months Days Hours Minutes Seconds

Date/clock data
S1+2 BCD H code H00 to H99 H01 to H12 S1+1 H01 to H31 H00 to H23 H00 to H59 S1 H00 to H59

Date/clock data
D+2 BCD H code H00 to H99 H01 to H12 D+1 H01 to H31 H00 to H23 H00 to H59 D H00 to H59

3 414
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net


Years Months Days Hours Minutes Seconds


Hours Minutes Seconds


Years Months Days Hours


Hours Minutes Seconds


Years Months Days Hours

+
0

Minutes

Seconds

(Addition)
DT10

20: 45 00: H00204500 (BCD)


DT11 0 0 2 4 5 0 0

Time data
S2+1 BCD H code H0000 to H9999

Minutes

Seconds

(Addition)
S2 H00 to H59 H00 to H59

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S1 and S2 is not BCD data. The data specified by S1 is not the date/clock data. The data specified by S2 is not the time data. The specified data exceeds the area.

Data configuration for the internal calendar timer FP0R/FP/FPX/FP2/FP2SH/FP10SH


DT90056 DT90055 DT90054

Precautions during programming


The special data registers DT9054 to DT9056/ DT90054 to DT90056, in which the values of the internal calendar timer are stored, cannot be specified directly for D. To change the value of the internal calendar timer, store the addition results in a separate memory area, and then use the F0 (MV) instruction to transfer the value to DT9054 to DT9056/DT90054 to DT90056.


Years Months Days Hours Minutes Seconds 3 415
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F158 (CSUB) P158 (PCSUB)


Outline

Time substruction

Subtracts specified time data (hours, minutes, and seconds) from date (years, months, and days) and clock (hours, minutes, and seconds) data. For the FP0R/FP/FPX, the P type highlevel instruction P158 (PCSUB) is not available.
Boolean Address 10 11 Instruction ST F158 DT DT DT R 0 9054 10 30

Program example
Ladder Diagram

Trigger R0 F158 CSUB, DT 9054, DT 10, DT 30 S1* S2 D

(CSUB)

10

(* When FP0R/FP/FPX/FP2/FP2SH/FP10SH, S1 = DT90054)


S1 S2 D Starting 16-bit area for storing date/clock data (3 words are used in form of BCD). Starting 16-bit area for storing time data (2 words are used in form of BCD). Starting 16-bit area for storing result (3 words are used in form of BCD).

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A Timer/Counter Register FL LD (*1) A A A A A A Index register IX (*2) N/A A N/A IY N/A N/A N/A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0, FPe, FP0R, FP and FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

3 416
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Subtracts the time data stored in data registers DT11 and DT10 from the date/clock data stored in data registers DT9054 to DT9056/ DT90054 to DT90056) when trigger R0 turns on. The result is stored in data registers DT32, DT31, and DT30.

June 17, 1992 10: 30 24: H920617103024 (BCD)


DT9056 (DT90056) 9 2 0 6 1 DT9055 (DT90055) 7 1 0 3 DT9054 (DT90054) 0 2 4

June 17, 1992 6: 59 54: H920617065954 (BCD)


DT32 9 2 0 6 1 7 DT31 0 6 5 9 DT30 5 4


Years Months Days Hours Minutes Seconds

Description
Subtracts time data (2 words) specified by S2 from the date/clock data (3 words) specified by S1. The result is stored in the area (3 words) specified by D.

Date/clock data
S1+2 BCD H code H00 to H99 H01 to H12 S1+1 H01 to H31 H00 to H23 H00 to H59 S1 H00 to H59

Date/clock data
D+2 BCD H code H00 to H99 H01 to H12 D+1 H01 to H31 H00 to H23 H00 to H59 D H00 to H59

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net


Years Months Days Hours Minutes Seconds 3 417


Hours Minutes Seconds


Years Months Days Hours


Hours Minutes Seconds


Years Months Days Hours

3: 30 30: H00033030 (BCD)


DT11 0 0 0 3 3 0 DT10 3 0

Minutes

Seconds

(Subtraction)

Time data
S2+1 BCD H code

Minutes

Seconds

(Subtraction)
S2 H00 to H59 H00 to H59

H0000 to H9999

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S1 and S2 is not BCD data. The data specified by S1 is not the date/clock data. The data specified by S2 is not the time data. The specified data exceeds tha area.

Precautions during programming


The special data registers DT9054 to DT9056/DT90054 to DT90056 in which the values of the internal calendar timer are stored, cannot be specified directly for D. To change the value of the internal calendar timer, store the subtraction results in a separate memory area, and then use the F0 (MV) instruction to transfer the value to DT9054 to DT9056/DT90054 to DT90056.

Data configuration for the internal calendar timer


FP2/FP2SH/FP10SH
DT90056 DT90055 DT90054

3 418
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net


Years Months Days Hours Minutes Seconds

Highlevel Instructions

Usage example: Computing the elapsed time


The elapsed time can be computed using the F158 (CSUB) instruction. Using the calendar timer, store the starting time and ending time in the data memory, and compute the elapsed time between the two values. An example in which operation was stopped at 08:02:15 and resumed at 10:30:25 will be used to show how the time that operation was stopped is computed. The computation can be thought of as subtracting 08:02:15 from 10:30:25.

Starting time: December 23, 1994 8: 2 15


S1+2 BCD H code 9 4 1 2 2 3 S1+1 0 8 0 2 S1 1 5

Ending time: December 23, 1994 10: 30 25


S2+2 BCD H code 9 4 1 2 2 3 S2+1 1 0 3 0 S2 2 5

The data to be subtracted is taken from the starting time data, as shown below.

(8: 02 15)
BCD H code 0 0 0 8 0 2 1 5

The results will be as follows.

Result: December 23, 1994 2: 28 10


DT32 BCD H code 9 4 1 2 2 3 DT31 0 2 2 8 DT30 1 0

The section indicating the hour, minutes and seconds is read as 2 hours, 28 minutes, 10 seconds, and this is the elapsed time.

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net


Years Months Days Hours Minutes Seconds 3 419


Years Months Days Hours Minutes Seconds Hours Minutes Seconds The section indicating the Day is set to 0. F158 (CSUB) execution


Years Months Days Hours Minutes Seconds

Highlevel Instructions

FP/FPX/FP0R

F159 (MTRN)
Outline

Availability

Serial data communication

FP/FPX/FP0R

This is used to send data to or receive data from an external device through the specified RS232C port.
Boolean Address 10 11 12 Instruction ST DF F159 DT K K (MTRN) 100 8 1 R 0

Program example
Ladder Diagram

Trigger R0 10 1 DF F159 MTRN, DT 100, K 8, K 1 S


S n

Starting area of data table (data register) Area for storing the number of bytes of data to be transmitted, or constant data. When the value is positive, an end code is added. When the value is negative, an end code is not added. When the value is H8000, the transmission mode of the RS232C port is changed. Port for transmitting data (K0, K1, K2) K0: TOOL port (FP 32k, FPX) K1: COM1 Port (FP0R: COM Port) K2: COM2 Port

Operands
Relay Operand WX WY WR WL S n D (*1) I0 to ID. N/A N/A N/A N/A A A A A SV N/A A N/A EV N/A A N/A DT A A LD N/A A Timer/Counter Register Index register IX (*1) N/A A N/A IY N/A A N/A Constant K N/A A A H N/A A N/A Index modifier A A A A: Available N/A: Not Available

N/A N/A N/A N/A

N/A N/A

3 420
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Description
This instruction is used to send and receive instructions and data when an external device (computer, measuring instrument, bar code reader, etc.) has been connected to the specified RS232C port.

1) Transmission
Transmits n bytes of the data stored in the data table that begins from the starting area specified in S through the communication port specified in D to an external device. A start code and end code can be automatically added to the transmission. The maximum number of bytes that can be transmitted is 2048.

2) Reception
Reception is controlled by the reception done flag (R9038/R9048) turning on and off. When the reception done flag is off, reception can take place at any time and data coming into the RS232C port is stored in the data register specified in system registers 416 to 419. The F159(MTRN) instruction is used to turn off (enable reception) the reception done flag (R9038/R9048). The maximum number of bytes that can be received is 4094.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when there is an index modifier. The data table exceeds the area because of the number of bytes specified in n.

3) Changing the transmission mode of the RS232C port


An F159(MTRN) instruction can be executed to change between general transmission mode and computer link mode. To do so, specify H8000 in n (the number of transmission bytes) and execute the instruction. Changing from general port to computer link
R0 DF R9032 1

F159 MTRN, DT100, H8000, K1

RS232C port selection flag in R9032 or R9042. Turns on when general port is selected. Changing from computer link to general port
R0 DF R9032 1

F159 MTRN, DT100, H8000, K1

Specify H8000

Note
When the power is turned on, the mode of use selected in system register 412 takes effect. The FP0R, FP 32k, FPX tool port is always set to the computer link mode in the PROG. mode.
3 421
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Programming and operation during transmission


To execute transmission, write the data to be transmitted to the data table and specify with an F158(MTRN) instruction. Use an F0(MV) or F95(ASO) instruction to write the data to be transmitted to the transmission data storage area specified in S. Do not include an end code in the transmission data. An end code is added automatically. When yes is specified for the start code in system register 413 or 414, do not add a start code to the transmission data. A start code is added automatically. The maximum number of transmission bytes n is 2048.

Data table for transmission


This is used as a data table for transmission, starting at the data register specified in S. [S] [S+1] [S+2]
2 4 1 3

At the beginning of transmission, nothing is set. At the end of transmission, 0 is set.

Transmission data storage area The circled numbers indicate the order of transmission.

[S+n]

2n

2n1

Example: Transmitting the eight characters A, B, C, D, E, F, G, H (8 bytes of data) This example uses DT100 to DT104 as the data table.
DT100 DT101 DT102 DT103 DT104 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) Data is transmitted in order from the lowerorder byte. When transmission begins: Nothing is set. When transmission ends: Cleared to 0.

Data table before transmission

Notes
When using a RS232C 1 ch type communication cassette, transmission does not take place until CS (Clear to Send) turns on. If you are not going to connect to the other device, connect to RS (Request to Send). (FP, FPX C14) As for the FPX C30/C60, it depends on the settings. Refer to the FPX Manual. *1. With the FP0R, FP V3.10 or later, FPX V2.50 or later, the number of transmitted data is set.
3 422
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Program
Specify the starting address of the transmission data table in S, and the number of data bytes to be transmitted in n.
R0 F1 DMV, H44434241, DT101 F1 DMV, H48474645, DT103 R1 DF F159 MTRN, DT100, K 8, K 1 1

Write the transmission data to the data table.

Transmit the data in the data table.

Operation
When the execution condition of the F159(MTRN) instruction turns on, operation is as follows when the transmission done flag (R9039/R9049) is on: 1) n is preset in S. The reception done flag (R9038/R9048) is turned off, and the reception data number is cleared to 0. 2) The set data is transmitted in order from the lowerorder byte in S+1 of the table. During transmission, the transmission done flag (R9039/R9049) turns off. If system register 413 or 414 is set to start code with STX, a start code is automatically added to the beginning of the data. The end code specified in system register 413 or 414 is automatically added to the end of the data. Transmission data
DT101 DT102 DT103 DT104

H (CR)

R9039 R9049 Execution condition (trigger) R0 F159 (MTRN) execution

on off on off During transmission During this interval the F159(MTRN) instruction cannot be executed.

3) When all of the specified quantity of data has been transmitted, the S value is cleared to 0 and the transmission done flag (R9039/R9049) turns on.

When you do not wish to add an end code to transmissions, use one of the following methods:
Specify the number of bytes to be transmitted using a negative number. If you also do not wish to add an end code to receptions, set system register 413 or 414 to no end code.

Example: Program for transmitting 8 bytes of data without adding an end code
R0 DF F159 MTRN, DT100, K8, K1 1

Specify K8. 3 423


CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Preparation for reception


Setting of COM 1 port reception buffer No. 416 and No. 417
The area of data registers DT0 up to DT2047 is the default reception buffer. The maximum number of bytes that can be received is 4094 bytes. No. of received bytes

Specify start area as No. 416.

Reception data storage area

Specified number of words for No. 417

Setting of COM 2 port reception buffer (This setting is not available for the FP0R.)

No. 418 and No. 419

The area of data registers DT2048 up to DT4095 is the default reception buffer. The maximum number of bytes that can be received is 4094 bytes. Specify start area as No. 418. No. of received bytes

Reception data storage area

Specified number of words for No. 419

Setting of Tool port reception buffer

No. 420 and No. 421

The area of data registers DT4096 up to DT6143 is the default reception buffer. The maximum number of bytes that can be received is 4094 bytes. Specify start area as No. 420. No. of received bytes

Reception data storage area

Specified number of words for No. 421

3 424
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Programming and operation during reception


Data sent from an external device connected to the RS232C port is stored in the data registers that have been set as the reception buffer. Data registers are used for the reception buffer. Specify the data registers in system registers 416 to 419. The number of bytes of data received is stored in the starting address of the reception buffer. The initial value is 0. Received data is stored in the received data storage area in order from the lowerorder byte.

Reception buffer

Using a reception buffer data register Word The number of (address) 0 bytes received is stored in this area. 1 2
2 1

Reception buffer storage area (The circled numbers indicate the order of storage.) n 2n 2n1

Example: Receiving eight bytes of data, A, B, C, D, E, F, G, H, from an external device through the COM1 port DT200 to DT204 are used as the reception buffer. System register settings are as follows: System register 416: K200 System register 417: K5
DT200 DT201 DT202 DT203 DT204 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) Received data is stored in order from the lowerorder byte. The received number of bytes is stored as data is stored.

Reception buffer when reception is completed

3 425
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Table of related flags and system registers


Item
Transmission mode flag Reception done flag Transmission done flag Beginning of reception buffer Reception buffer capacity

For COM1
R9032 R9038 R9039 Specified in 416 Specified in 417

For COM2
R9042 R9048 R9049 Specified in 418 Specified in 419

For Tool
R9040 R903E R903F Specified in 420 Specified in 421

Program
The reception done flag (R9038/9048) turns on when data reception from the external device is completed. Reception of any further data is prohibited. To receive subsequent data, you must execute an F159(MTRN) instruction to turn off the reception done flag (R9038/R9048) and clear the byte number to 0.
R0 F159 MTRN, DT100, K 0, K 1

To repeatedly perform only reception, specify K0. R9038/R9048 also turn off when transmission is performed with a byte number specification.

Operation
When the reception done flag (R9038/R9048) is off, operation takes place as follows when data is sent from an external device. (R9038/R9048 are off during the first scan after RUN. 0 is set in the starting area of the reception buffer specified in the system registers.) 1) Incoming data is stored in order from the lowerorder byte of the 2ndword area of the reception buffer. Start and end codes are not stored. Beginning of reception Received data R9038 R9048 Execution condition (trigger) R0 Execution of F159(MTRN) instruction
on off on off

Reopening
U V

B T (CR)

Reception is possible

Reception Reception is is not possible possible

2) When the end code is received, the reception done flag (R9038/9048) turns on. Reception of any further data is prohibited. 3) When an F159(MTRN) instruction is executed, the reception done flag (R9038/9048) turns off, the number of received bytes is cleared, and subsequent data is stored in order from the lowerorder byte.

3 426
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Notes
To perform repeated reception of data, refer to the following steps. 1) Receive data 2) Reception done (R9038/R9048: on, reception prohibited) 3) Process received data 4) Execute F159(MTRN) instruction (R9038/R9048: off, reception possible) 5) Receive subsequent data The reception done flag (R9038/R9048) also changes during scanning.

3 427
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH

F159 (MTRN) P159 (PMTRN)


Outline

Serial data communication (for MCU COM port)

Availability FP2/FP2SH

Data is transmitted to external equipment via the COM port of the specified MCU.
This function is available from FP2/FP2SH Ver. 1.50 or later.

Program example
Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F159 DT K H (MTRN) 0 10 C1 X 4

Trigger X4 10 1 DF F159 MTRN, DT 0, S


S n

1 K 10, H C1 n D

Head area of the data table Area or constant data in which the byte number of the transmitted data stored When it is positive value, the terminal code is added in transmission. When it is negative value, the terminal code is not added in trasmission. In case of H8000, the application of the MCU port specified in transmission is changed. Specification of the slot number and port number of the MCU unit which the data is transmitted.

Operands
Relay Operand WX WY WR WL S n D (*1) I0 to ID. A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A FL A A A Timer/Counter Register Index register I (*1) A A A Constant K N/A A A H N/A A A Index modifier A A A A: Available N/A: Not Available

Reference: FP2 Multi Communication Unit Manual

3 428
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH

Highlevel Instructions

Description
1) It is used to transmit commands or data to the COM port (COM1 or COM2) of the specified MCU unit connecting with external equipment (such as PC, measuring insrument, barcode reader). Note: The operation mode of the communication port of the MCU should be set to the generalpurpose serial communication mode. 2) [n] bytes of the data stored in the data table which is headed with the area specified by [S] is transmitted to external equipment from the communication port of the CPU or MCU unit specified by [D].
Data table (transmitted buffer) S S+1 S+2 S+3 S+4 Transmitted data storage area
*1

S+n/2

*1: Nothing is specified for the initial address of the transmitted buffer. 3) The slot number and the communication port number specified by [D] is set as below.
[D]: Specify slot number. Specify communication port number. Specify from H00 to H1F. HC1/HD1: COM1 port HC2/HD2: COM2 port

* Caution: 1. Specify to K1 (H1) for the COM port of the CPU. 2. When specifying [D] with the K constant, ex.) if the slot number is set to 3, and the COM2 (2) is selected for the communication port of the MCU, set as follows. H03C2 to K962 (*convert the content specified in hexadecimal to decimal) 4) The starting code and the terminal code can be added automatically in transmission. 5) The transmitted byte number is maximum of 2048 bytes (including starting code and terminal code). 6) When a negative value is specified for the transmitted byte number, the data will be transmitted without the terminal code. 7) When 8000H is specified for the transmitted byte number, the operation mode of the specified communicaton port can be switched between the computer link and the generalpurpose communication mode. 8) The communication parameter for the communication port can be set by specifying the communicating port number to HD1 or HD2. When HD1 is designated: the communication parameter is registered for the COM 1 port. When HD2 is designated: the communication parameter is registered for the COM 2 port. Example
R0 F159 MTRN, DT0, K22, H D1

3 429
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH

9) The communication parameter data consists of 11 words. 1) 2) Unit number setting value (K1 to K99) Baud rate setting value (K0 to K10) *2 *2. Baud rate setting value
Storage value 0 1 2 3 4 5 6 7 8 9 10 Baud rate 300 600 1200 2400 4800 9600 19200 38400 57600 115K 230K

3) 4) 5) 6) 7) 8) 9)

Data length setting value (K0=7 bits, K1=8 bits) Parity setting value (K0=no parity, K1=parity 0, K2=Odd, K3=Even) Stop bit length setting value (K0: 1 bit, K1: 2 bits) RS/CS setting (K0=disable, K1=able) Waiting time for starting transmission (K: 0=Time for about three characters/effective time=Kn*0.01 ms (0 to 100 ms)) Starting code STX setting value (K0=disable, K1=able) Terminator setting value (K0=cR, K1=cR+Lf, K2=time (24 bits), K3=EXT)

10) Reception done judgment time (K:0=immediate/effective time=Kn*0.01 ms (0 to 100 ms) 11) Modem initialization (K0=Not initialized when the power turns on, K1=Initialized when the power turns on)

Note
The execution for switching the operation mode of the communication (between the computer link and the generalpurpose serial communication mode) or the setting for the communication parameter should be carried out when no communication is performed. If these operations are executed in communicating, the data which is being transmitted will be cancelled, and the reception error will occur for the data which is being received and this data may not be received properly. When the communication parameter is specified, the received byte number should be specified to the even data of 22 bytes or smaller. If it is specified to the value larger than 22 bytes or odd byte, an error occurs in the parameter settings of the MCU.

3 430
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH

Highlevel Instructions

Flag conditions

Error flag (R9007) (R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when the MCU unit does not exist in the slot No. specified by [D]. It turns on, when the MCU unit does not exist in the slot No. specified by [D] It turns on, when the data device specified by [S] exceeds the area. It turns on, when the transmitted byte number specified by [n] is outside of the specified area. It turns on, when the transmitted byte number specified by [n] exceeds the area of the data table. It turns on, when H8000 is designated in the PC link mode. It turns on, when an additional parameter is registered in executing the parameter registration. It turns on, when H8000 is designated in the parameter registration. It turns on, when a negative value is designated in the parameter registration.

3 431
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH

F161 (MRCV) Serial data reception P161(PMRCV) (for MCU COM port)
Outline
This function is available from FP2/FP2SH Ver. 1.50 or later.

Availability FP2/FP2SH

Data is received from external equipment via the COM port of the specified MCU.

Program example
Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F161 H DT DT (MRCV) C1 0 100 X 0

Trigger X0 10 1 DF F161 MRCV, H C1, DT0, DT100 S


S D1 D2

D1

D2

Specification of the slot number and port number of the MCU unit which the data is received. Initial address in which the received data stored. Ending address in which the received data stored.

Operands
Relay Operand WX WY WR WL S D1 D2 (*1) I0 to ID. A N/A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A FL A A A Timer/Counter Register Index register I (*1) A A A Constant K A N/A N/A H A N/A N/A Index modifier A A A A: Available N/A: Not Available

Explanation of example

When the reception done signal X0 of the COM 1 port is on, the received data is readout, and stored in DT0 to DT100.

Flag conditions

Error flag (R9007) (R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when the MCU unit does not exist in the slot No. specified by [S]. It turns on, when the communication port specified by [S] does not exist. It turns on, when the data device specified by [D1] exceeds the area. It turns on, when the data device specified by [D2] exceeds the area. It turns on, when [D1] > [D2].

Reference: FP2 Multi Communication Unit Manual


3 432
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH

Highlevel Instructions

Description
1) It is used to receive commands or data for the COM port (COM1 or COM2) of the specified MCU unit connecting with external equipment (such as PC, measuring insrument, barcode reader). Note: The operation mode of the communication port of the MCU should be set to the generalpurpose communication mode. 2) The received data is readout to the communication port of the MCU unit in the slot No. specified by [S], and stored in the specified data area of [D1] to [D2]. 3) The slot number and the communication port number specified by [S] is set as below.
[D]: Specify slot number. Specify from H00 to H1F. Specify communication port number. HC1/HD1/HE1: COM1 port HC2/HD2/HE2: COM2 port

4) The received byte number is set for the initial address of the data area specified by [D1]. * If the received data exceeds the ending address specified by [D2], the operation error is detected. At that time, the data which has been received up to the area of [D2] is stored.
Data table (received buffer) D1 D1+1 D1+2 D1+3 D1+4 Received data storage area The received byte number is stored.

D23 D22 D21 D2

<Reading of communication parameter and condition> 5) When the communication port numbers specified by [S] is HD1 or HD2, HE1 or HE2, the registered communication parameter and the monitoring data are read. HD1:The communicaton parameter data in the COM 1 port is read. HD2:The communicaton parameter data in the COM 2 port is read. When HE1 or HE2 is designated, the operation mode of each communication port and the information on the communication cassette detection is read. HE1:The monitoring data in the COM 1 port is read. HE2:The monitoring data in the COM 2 port is read.
example: R0 F161 (MRCV) HD1, DT0, DT11

example: R0 F161 (MRCV) HE1, DT0, DT7

6) There are eight 2048byte buffers in the received buffer of the MCU unit, and eight data can be received sequentially. 3 433
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP2/FP2SH

If nine or more data should be received, the MCU unit detects the received buffer full error. If the received buffer FULL error is detected, the MCU unit prohibits the reception of data in that channel and inform about the error. The byte number which can be received in one buffer is maximum of 2048 bytes (including terminal code). However, the data which can be received with the MRCV do not include terminal code. <Configuration of communication parameter> 7) The communication parameter data consists of 11 words.
1) 2) Unit number setting value (K1 to K99) Baud rate setting value (K0 to K10) *2 *2. Baud rate setting value Storage value 0 1 2 3 4 5 6 7 8 9 10 3) 4) 5) 6) 7) 8) 9) Baud rate 300 600 1200 2400 4800 9600 19200 38400 57600 115K 230K

Data length setting value (K0=7 bits, K1=8 bits) Parity setting value (K0=no parity, K1=parity 0, K2=Odd, K3=Even) Stop bit length setting value (K0: 1 bit, K1: 2 bits) RS/CS setting (K0=disable, K1=able) Waiting time for starting transmission (K: 0=Time for about three characters/effective time=Kn*0.01 ms (0 to 100 ms)) Starting code STX setting value (K0=disable, K1=able) Terminator setting value (K0=cR, K1=cR+Lf, K2=time (24 bits), K3=EXT)

10) Reception done judgment time (K:0=immediate/effective time=Kn*0.01 ms (0 to 100 ms) 11) Modem initialization (K0=Not initialized, K1=Initialized) <Configuration of monitor data> 1) 2) 3) Operation mode (K0 to K7) (K0=computer link, K1=generalpurpose serial, K2=PC link, K7=modem initialization) Communication cassette detection (from K0) (No communication cassette=0, RS232C=K232, RS422=K422, RS485=K485) Reception error code (Lower byte: bit 0=received buffer overrun, bit 1=stop bit not detected, bit 2=parity unmatched) (Higher byte: bit 0=received buffer overflow, bit 1=received buffer full) Number of times reception errors (number of times which the reception errors to be stored in the above lower byte are detected) Setting error code (Lower byte: bit 0=error in the dip switch setting ofthe operation mode, bit 1=operation mode setting which exceeds the usable limit of the unit) (Higher byte: bit 0=error in the communication parameter setting, bit 1=error in the number of transmitted data) Error parameter No. (K0 to K11) Modem initialization (h0000=deinitialized h0100=now initializing h0200=initialization completed. h02FF=initialization failed.)

4) 5)

6) 7)

3 434
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F160 (DSQR) 32-bit data square root P160 (PDSQR)


Outline Takes the square root of the specified 32-bit data. For the FP0R, FP and FPX, the P type highlevel instruction P160 (PDSQR) is not available.
Boolean Address 10 11 Instruction ST F160 DT DT R 0 10 20

Program example
Ladder Diagram

Trigger R0 F160 DSQR, DT10 , DT20 S


S D

(DSQR)

10

32-bit equivalent constant or lower 16-bit area of 32-bit area for storing data to be calculated Lower 16-bit area of 32-bit area for storing the calculated result

Operands
Relay Operand WX WY WR WL S D A N/A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register IX (*2) A A IY N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

(*1) This cannot be used with the FP0R, FP and FPX. (*2) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
The square root of 32bit data stored in DT11 and DT10 is calculated and stored in DT21 and DT20 when R0 turns on. When K64 is stored in DT11 and DT10, the following occurs. Source data [S+1, S]: K64
DT11 DT10 Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0 Binary data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
Decimal data

K64

Higher 16-bit area


R0: on

Lower 16-bit area

Destination [D+1, D]: K8


DT21 DT20 Bit position 15 1211 8 7 4 3 0 15 1211 8 7 4 3 0 Binary data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Decimal data

K8

Higher 16-bit area

Lower 16-bit area 3 435

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The square root of 32-bit data specified by S1 is calculated and stored in the 32-bit area specified by D. In the result, the digits beyond the decimal point are disregarded. (S+1, S) (D+1, D)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S is a negative value.

3 436
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP/FPX/FP0R

Highlevel Instructions

F0 (MV)
Outline Program example

Availability

Highspeed counter control

FP0/FP0R/FP/FPX

This instruction is used to perform control such as software reset, counter disabling, and highspeed counter instruction clearing.
Boolean Address 10 11 12 Instruction ST DF F0 H DT 17 F0 H DT (MV) 1 9052 (MV) 0 9052 R 0

Ladder Diagram

Trigger R0 DF 1 F0 MV , H 1, DT9052 or DT90052 F0 MV , H 0, DT9052 or DT90052 S High speed counter and Controls flag area
* The highspeed counter and pulse output controls flag area varies dependingon the PLC type. S

10

Pulse output

Area for storing highspeed counter control code or constant data

Operands
Relay Operand WX WY WR S A A A SV A EV A DT A Timer/Counter Register Index register IX (*1) A IY (*2) A Constant K A H A Index modifier A A: Available

(*1) I0 to IC on FP/FPX/FP0R (*2) ID on FP/FPX/FP0R

Description
Performs highspeed counter control according to the control code specified in S. This instruction is used to perform the following operations when using a highspeed counter: <Function> 1) Performing a software reset 2) Disabling the count 3) Temporarily disables reset input setting using external inputs 4) Clearing control executed with highspeed counter and pulse output instructions F166 or F167. Once written, a control code is retained until the next write operation.

Precautions during programming


Hardware resets can only be disabled if a reset input is used.

3 437
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FP/FPX/FP0R

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used The S is outside specification range

Using the FP0/FPe


Highspeed counter and Pulse output controls flag area Four bits are allocated to each highspeed counter channel for use as the control code write area DT9052 (DT90052 on the FP0 T32) A control code written using an F0(MV) instruction is stored in special data register DT9052 (DT90052 on the FP0 T32). Highspeed counter and Pulse output controls flag area of FP0
ch3 DT9052: DT90052: 15 12 11 ch2 8 7 ch1 4 3 ch0 0

<Control code> Written using an F0(MV) instruction (H0 to HF)

Select control codes in units of one bit and specify with H.


H

Clears highspeed counter instruction 0: Continue 1: Clear

Reset input setting (See note.) 0: Enable 1: Disable Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes

Note: At the reset input setting, you set whether the reset input (X2 or X5), which was assigned by the system register highspeed counter setting, will be enabled or disabled.

Example: EPerform software reset . . . . . . . . . . . . . . . . . . . . . . . H1(0001) EProhibit count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H2(0010) EClear high speed counter instruction . . . . . . . . . H8(1000) EClear high speed counter instruction and reset elapsed value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H9(1001)

3 438
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP/FPX/FP0R

Highlevel Instructions

Program example Example: Software reset of channel 0 of highspeed counter.


X3 DF F0 MV, H4, DT9052 F0 MV, H0, DT9052

Using the FP
Highspeed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only. Highspeed counter and Pulse output controls flag area of FP
15 DT90052: Channel specification H0 to H3: CH0 to CH3 Clear highspeed counter instruction 0: Continue 1: Clear Reset input setting (See note.) 0: Enable 1: Disable Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes 12 11 8 7 4 3 0

Note: At the reset input setting, you set whether the reset input (X2 or X5), which was assigned by the system register highspeed counter setting, will be enabled or disabled.

3 439
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FP/FPX/FP0R

Program example Example 1: Software reset of channel 0 of highspeed counter


R0 DF F0 MV, H1, DT90052 F0 MV, H0, DT90052

Example 2: Software reset of channel 2 of highspeed counter


R0 DF F0 MV, H2001, DT90052 F0 MV, H2000, DT90052

Using the FPX


Highspeed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only. Highspeed counter and Pulse output controls flag area of FPX
15 DT90052: Channel specification H0 to HB: CH0 to CHB H0 fixation (HSC) 12 11 8 7 4 3 0

However, the settable channels differ depending on the models. (Refer to the table on the next page.) Clear highspeed counter instruction 0: Continue 1: Clear Reset input setting (See note.) 0: Enable 1: Disable Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes

3 440
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FP/FPX/FP0R

Highlevel Instructions

Program example Example 1: Software reset of channel 0 of highspeed counter


R0 DF F0 MV, H1, DT90052 F0 MV, H0, DT90052

Example 2: Software reset of channel 1 of highspeed counter


R0 DF F0 MV, H1001, DT90052 F0 MV, H1000, DT90052

Note: FPX Ry type At the reset input setting, you set whether the reset input (X2 or X5) of the pulse I/O cassette, which was assigned by the system register highspeed counter setting, will be enabled or disabled. Note: FPX Tr type At the reset input setting, you set whether the reset input (X6 or X7) assigned for the controller input will be enabled or disabled.

Using the FP0R


Highspeed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only. Highspeed counter and Pulse output controls flag area of FP0R
15 DT90052: Channel specification H0 to H5: CH0 to CH5 H0 fixation (HSC) 12 11 8 7 4 3 0

However, the settable channels differ depending on the models. (Refer to the table on the next page.) Clear highspeed counter instruction 0: Continue 1: Clear Reset input setting (See note.) 0: Enable 1: Disable Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes

3 441
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FP/FPX/FP0R

Highspeed counter control for FP0R, FP and FPX


Channel No. FP
ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 chA chB DT90190 DT90191 DT90192 DT90193

Control code monitor area FPX Ry type FPX Tr type


DT90360 DT90361 DT90362 DT90363 DT90364 DT90365 DT90366 DT90367 DT90368 DT90369 DT90370 DT90371 DT90370 DT90371 DT90372 DT90373 DT90374 DT90375 DT90376 DT90377

FP0R
DT90370 DT90371 DT90372 DT90373 DT90374 DT90375

3 442
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX/FP0R

Highlevel Instructions

F0 (MV)
Outline Program example

Availability

Pulse output control

FP0/FP0R/FPe/ FP/FPX

This instruction is used to perform control such as software reset, counter disabling, and stopping pulse output.
Boolean Address 10 11 12 Instruction ST DF F0 H DT 17 F0 H DT (MV) 1 9052 (MV) 0 9052 R 0

Ladder Diagram

Trigger R0 DF 1 F0 MV , H 1, DT9052 or DT90052 F0 MV , H 0, DT9052 or DT90052 S High speed counter and Controls flag area
* The highspeed counter and pulse output controls flag area varies depending on the PLC type. S

10

Pulse output

Area for storing pulse output control code or constant data

Operands
Relay Operand WX WY WR S A A A SV A EV A DT A Timer/Counter Register Index register IX (*1) A IY (*2) A Constant K A H A Index modifier A A: Available

(*1) I0 to IC on FP/FPX/FP0R (*2) ID on FP/FPX/FP0R

Description
Performs Pulse output control according to the control code specified in S. This instruction is used to perform the following operations when using a Pulse output: <Function> 1) Performing a software reset 2) Disabling the count 3) Preemptively stopping positioning/pulse output 4) Clearing control executed with pulse outputrelated instructions F171 or F176. 5) Setting near home input when returning to home position and changing to deceleration. Once written, a control code is retained until the next write operation.

Precautions during programming


The near home processing is not possible when the count is prohibited during a return to home position, or when a software reset is performed. The near home bit is retained; however, each time you wish to perform near home processing during a return to home position, 1 must be written to the respective bit.

3 443
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe/FP/FPX/FP0R

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used The S is outside specification range

Using the FP0/FPe


Highspeed counter and Pulse output controls flag area Four bits are allocated to each Pulse output channel for use as the control code write area DT9052 (DT90052 on the FP0 T32) A control code written using an F0(MV) instruction is stored in special data register DT9052 (DT90052 on the FP0 T32). Highspeed counter and Pulse output controls flag area of FP0
ch1 DT9052: DT90052: 15 12 11 8 7 4 3 ch0 0

<Control code> Written using an F0(MV) instruction (H0 to HF)

Select control codes in units of one bit and specify with H.


H

Stop pulse output 0: Continue 1: Stop Near home input 0: Enable 1: Disable Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes

Example: EPerform software reset . . . . . . . . . . . . . . . . . . . . . . . H1(0001) EProhibit count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H2(0010) EStop pulse output . . . . . . . . . . . . . . . . . . . . . . . . . . . . H8(1000) ETurn off pulse output and reset elapsed value . . H9(1001)

3 444
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX/FP0R

Highlevel Instructions

Program example Example 1: Software reset of channel 0 of Pulse output.


R0 DF F0 MV, H1, DT9052 F0 MV, H0, DT9052

Example 2: Enable near home input during pulse output control and change to deceleration.
X3 DF F0 MV, H4, DT9052 F0 MV, H0, DT9052

Using the FP
Highspeed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only. Highspeed counter and Pulse output controls flag area of FP
15 DT90052: Channel specification H0, H2: CH0, CH2 Near home input 0: Enable 1: Disable Stop pulse output 0: Continue 1: Stop 12 11 8 7 4 3 0

Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes

3 445
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe/FP/FPX/FP0R

Program example Example 1: Software reset of Pulse output


(ch0)
R0 DF F0 MV, H1, DT90052 F0 MV, H0, DT90052

(ch2)
R0 DF F0 MV, H2001, DT90052 F0 MV, H2000, DT90052

Example 2: Enable near home input during pulse output control and change to deceleration.
(ch0)
X3 DF F0 MV, H10, DT90052 F0 MV, H0, DT90052

(ch2)
X3 DF F0 MV, H2010, DT90052 F0 MV, H2000, DT90052

3 446
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX/FP0R

Highlevel Instructions

Using the FPX


Highspeed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only. Highspeed counter and Pulse output controls flag area of FPX
15 DT90052: Channel specification H0 to H3: CH0 to CH3 Near home input 0: Enable 1: Disable Stop pulse output 0: Continue 1: Stop H1 fixation (PLS) 12 11 8 7 4 3 0

Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes

Program example Example 1: Software reset of Pulse output


(ch0)
R0 DF F0 MV, H101, DT90052 F0 MV, H100, DT90052

(ch1)
R0 DF F0 MV, H1101, DT90052 F0 MV, H1100, DT90052

3 447
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe/FP/FPX/FP0R

Example 2: Enable near home input during pulse output control and change to deceleration.
(ch0)
X3 DF F0 MV, H110, DT90052 F0 MV, H100, DT90052

(ch1)
X3 DF F0 MV, H1110, DT90052 F0 MV, H1100, DT90052

Using the FP0R


Highspeed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only. Highspeed counter and Pulse output controls flag area of FP0R
15 DT90052: Channel specification H0 to H3: CH0 to CH3 Near home input 0: Enable 1: Disable Stop pulse output 0: Continue 1: Stop Clear of pulse output control 0: Continue, 1: Stop Count 0: Permit 1: Prohibit Software reset 0: No 1: Yes * The pulse output control is available when controlling the pulse output ch with F166(HC1S) or F167(HC1R) instruction. H1 fixation (PLS) 12 11 8 7 4 3 0

Program example
Refer to the program example of FPX.

Pulse output control for FP and FPX


Channel No. FP
ch0 ch1 ch2 ch3 DT90190 DT90192

Control code monitor area FPX Ry type FPX Tr type


DT90372 DT90373 DT90380 DT90381 DT90382 DT90383

FP0R
DT90380 DT90381 DT90382 DT90383

3 448
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX/FP0R

Highlevel Instructions

F1 (DMV)
Outline Program example

Writing and reading the highspeed counter and pulse output elapsed value

Availability FP0/FP0R/FPe/ FP/FPX

This instruction is used to write and read the elapsed value of the highspeed counter/pulse output.
Boolean Address 10 11 12 Instruction ST DF F1 K DT (DMV) 3000 9044 R 0

Ladder Diagram

Writing Trigger R0 DF F1 DMV , K 3000 , DT9044 S Reading Trigger R10 DF F1 DMV , DT9044 , DT 6
Elapsed value area of highspeed counter and pulse output Elapsed value area of highspeed counter and pulse output

10

: : 20 21 22

: : ST DF F1 DT DT (DMV) 9044 6 R 10

20

* The highspeed counter and pulse output elapsed value area varies dependinon the PLC type. S Writing Area for storing the elapsed value (32 bits) write in the highspeed counter/pulse output, or constant data Reading Area for reading the elapsed value of the highspeed counter/pulse output

Operands
Relay Operand WX WY WR S D A N/A A A A A SV A A EV A A DT A A Timer/Counter Register Index register IX (*1) A A IY (*2) N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available

(*1) I0 to IC on FP/FPX/FP0R (*2) ID on FP/FPX/FP0R

3 449
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe/FP/FPX/FP0R

Writing the elapsed value


This instruction writes the 32bit data specified in S to the elapsed value area of the highspeed counter and pulse output channel being used, and simultaneously sets the data in the elapsed value area of the highspeed counter used inside the system. Make sure the 32bit data value that is written to the elapsed value is within the following range. Type
FP0/FPe FP/FPX/FP0R

Allowed setting range


K 8,388,608 to K 8,388,607 K 2,147,483,648 to K 2,147,483,647

Writing is only possible using an F1(DMV) instruction. Writing is not possible using other applied instructions such as the transfer instruction F0(MV) or arithmetic instructions. When specifying the memory area in S or D (when reading), specify only the lowerorder 16 bits of the memory area number.

Explanation of example
When the execution condition R0 is on, K3000 is written to the elapsed value area of ch0 of the highspeed counter and pulse output.

Reading the elapsed value


The contents of the special data register that stores the elapsed value of the highspeed counter and pulse output is written to the area specified in D.

Explanation of example
When the execution condition R10 is on, the elapsed value of the highspeed counter and pulse output is transferred to data registers DT6 and DT7.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used The S is outside specification range

3 450
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX/FP0R

Highlevel Instructions

Program examples
The elapsed value area varies depending on the model and channel number.

Example 1: On R0 input, the value in data register DT4 is set in the ch0 elapsed value area as the set value.
R0 DF F1 DMV, DT4, DT9044

Decrement input X0 R0

Value in DT4

Time Setting set value

Example 2: On R1 input, the elapsed value of the ch0 is stored in data register DT100.
R1 DF F1 DMV, DT9044, DT100

Example 3: When the elapsed value of the ch0 is greater than K10000, the internal relay R0 turns on.
R9010 F1 DT9044, DT0

F61 DCMP, DT0, K10000 R900A R0

3 451
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe/FP/FPX/FP0R

Table of channel number and elapsed value area


For FP0/FPe Highspeed counter channel no.
ch0 ch1 ch2 ch3

Pulse output channel no.


ch0 ch1

Elapsed value area


DT9044 to DT9045 DT9048 to DT9049 DT9104 to DT9105 DT9108 to DT9109

For FP0(T32) Highspeed counter channel no.


ch0 ch1 ch2 ch3

Pulse output channel no.


ch0 ch1

Elapsed value area


DT90044 to DT90045 DT90048 to DT90049 DT90104 to DT90105 DT90108 to DT90109

For FP Highspeed counter channel no.


ch0 ch1 ch2 ch3

Pulse output channel no.


ch0 ch2

Elapsed value area


DT90044 to DT90045 DT90048 to DT90049 DT90200 to DT90201 DT90204 to DT90205

For FPX Ry type Highspeed counter channel no.


ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 chA chB

Pulse output channel no.


ch0 ch1

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321 DT90324 to DT90325 DT90328 to DT90329 DT90332 to DT90333 DT90336 to DT90337 DT90340 to DT90341 DT90344 to DT90345 DT90348 to DT90349 DT90352 to DT90353

3 452
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX/FP0R

Highlevel Instructions

For FPX Tr type Highspeed counter channel no.


ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7

Pulse output channel no.


ch0 ch1 ch2 ch3

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321 DT90324 to DT90325 DT90328 to DT90329 DT90348 to DT90349 DT90352 to DT90353 DT90356 to DT90357 DT90360 to DT90361

For FP0R Highspeed counter channel no.


ch0 ch1 ch2 ch3 ch4 ch5

Pulse output channel no.


ch0 ch1 ch2 ch3

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90323 DT90400 to DT90401 DT90410 to DT90411 DT90420 to DT90421 DT90430 to DT90431

3 453
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F165(CAM0)
Outline

Cam control (Highspeed counter control)

Availability FP0R

This instruction enables the control according to the maximum of 31point target values for the highspeed counter. [Feature] An interrupt program can be also executed wheneber the elapsed value reaches each target value.
Boolean Address 10 Instruction ST DF F165 DT (CAM0) 100 R 3

Program example
Ladder Diagram

R3

DF

F165 CAM0 , DT 100 S

11 12

Starting 16bit area

Operands
Operand S (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A Timer/Counter Register SV N/A EV N/A DT A Index register In (*1) N/A N/A N/A SWR SDT Constant K N/A H N/A Index modifier A

A: Available N/A: Not Available

Description
It notifies that the elapsed value has reached a maximum of 31 target values in the pattern specified with the data table starting with the address specified by [S]. The internal relays corresponding to the target positions are turned on. Also, the interrupt program INTn can be executed at the target position. *It is necessary to allow the execution of the interrupt program with ICTL instruction. 1 Check that the same value is not used for the target values of the control table and they are arranged in ascending order.
2 3

Judge the position of the current value of highspeed counter, set 1 to the correponding bit in the targe position notification area of the internal relay, and clear the others to 0. After that, in case of addition, the target position notification internal relay changes every time the elapsed value matches the targe values. However, in case of subtraction, (Target value 1) is used as the target position data.

[When the maximum value control is not performed] When the maximum target value is 0, and the reset input is not permitted, 4 When the elapsed value matches the maximum target position m in add operation, the next target position will be the negative minimum value.
5

When the elapsed value matches the minimum (target position 11) in subtraction operation, the target position will be the positive maximum value.

The control with the maximum target value is available as well as the above control operation. The maximum target value can be specified at the end of the table. When the elapsed value matches the maximum target value, the elapsed value is cleared to 0, and The beginning of the internal relay in the position notification area is turned on. 3 454
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

To perform the control with the maximum target value, positive integer numbers must be specified for all the target position data. [When the maximum value control is performed] Using the maximum target value of data table or hardware/software reset signal enables the value to return to the starting address of data table. (V1.06 or later) In add operation, the elapsed value will be cleared to 0 when it reaches the maximum target value (when reset signal is detected), and the starting bit of position notification relay will be turned on. In subtraction operation, when the elapsed value reaches 1, the maximum target value will be set as the elapsed value, and the bit corresponding to the target position m will be turned on for position output. Note: Hardware reset is CH0: X2, CH1: X2, CH2: X5, CH3: X5. Description of hardware reset signal operation When the maximum value control is not performed
V1.06 or later V1.05 or older The elapsed value is cleared to 0, and the table pointer moves to the beginning. Only the elapsed value is cleared to 0.

When the maximum value control is not performed


Only the elapsed value is cleared to 0. Only the elapsed value is cleared to 0.

When the maximum value control has been specified, set the maximum target value to a large value which cannot be reached for returning the value to the starting address of data tabe using the hardware reset signal. Sample operation: When controlling the highspeed counter CH0 with the maximum target value Example: If the instruction is executed on the leading edge of the trigger R3, and the elapsed value when the execution is started is smaller than the target position 1 The target position notification area is specified from R10.
Elapsed value of highspeed counter Max. target value Target value 4 Target value 3 Target value 2 Target value 1 Execution condition of this instruction Control flag of highspeed counter K14000 K10000 K8000 K4000 K2000 R3 R9110 Time

Target value notification relay 0 R10 Target value notification relay 1 R11 Target value notification relay 2 R12 Target value notification relay 3 R13 Target value notification relay 4 R14

3 455
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Precautions during programming


To use this instruction, the highspeed counter function must be used. The highspeed counter control flag (R9110 to R9115) corresponding to the specified channel turns on when the execution condition of F165(CAM0) instruction turns on until the cam control is cleared. When the highspeed counter control flag (R9110 to R9115) is on, the highspeed counter control instructions (F166(HC1S), F167(HC1R), F178(PLSM)) to the highspeed counter of the same channel cannot be executed. To stop the control with this instruction, execute Clears highspeed counter instruction. If the elapsed value to be controlled with this instruction is rewritten, an unexpected operation might be performed. When controlling with the main program, set the target value to be Minimum travelling time between each target value greater than 1 scan time. When controlling with a interrupt program, set the target value to be Minimum travelling time between each target value greater than Maximum execution time of interrupt program. Set the interval between adjacent target values within 1msec not to match them. This instruction can be simultaneously executed for 2 channels only. When the maximum value control and the hardware/software reset is used at the same time, do not operate them intensively in a short time. When hardware/software reset is used, set the first target value to an integer value that is 1 or more.

Channels of highspeed cunter and areas used


Highspeed counter Control flag Elapsed value area channel No.
ch0 ch1 ch2 ch3 ch4 ch5 R9110 R9111 R9112 R9113 R9114 R9115 DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321

Target value area


DT90302 to DT90303 DT90306 to DT90307 DT90310 to DT90311 DT90314 to DT90315 DT90318 to DT90319 DT90322 to DT90323

Interrupt program
INT0 INT1 INT3 INT4 INT6 INT7

Setting of data table


S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 Specification of highspeed counter channel Word No. of internal relay for position notification Specification of No. of target position m Target position 1 Target position 2 Target position 3 Target position m1 Target position m Max. target value (*1) (*2) (*3) (*4) (*4) (*4) (*4) (*4) (*5) (Note) Arrange the target values of the targe positions 1 to m in ascending order. The same value cannot be specified. A maximum of 31 target positions can be specified.

3 456
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

*1: Specification of highspeed counter channel Specify the channel of the highspeed counter/pulse output with H constant in the starting area (2 words) of the data table.
H 0 0 0 0 0 0 0 1 <Specification of the channel of highspeed counter/pulse output> Allowable range for specifying the highspeed counter: 0 to 5 Specification of maximum value control:0 = Not control with the maximum target value 1 = Control with the maximum target value <Specification of highspeed counter/pulse output> 0: Specification of highspeed counter

*2: Specify the word number of the internal relay where the targe position is output. (Note1) In the 3rd word and 4th word areas, specify the word number of the internal relay where the target position is output. *3: Specification of the number of target positions (Note1) Specify the number of target positions. Settable range: K1 to K31 <Method of target position notification>
Turns on when the elapsed value matches the first target value. Turns on when this instruction is executed. Only when the current value is 1514131211 10 9 8 7 6 5 4 3 2 1 0 smaller than target posit WRn When the number of the target values is in the range of 1 to 16, 1 word is used. WRn+1 When the number of the target values is in the range of 17 to 32, 2 words are used. Turns on when it matches Turns on when it matches the 17th target value. the 15th target value. Values in specified in S+2 and S+3

*4: Specification of target position: Specify the target position after the 5th word. Settable range: K2147483648 to K2147483647 (H80000000 to H7FFFFFFF) *5: Specification of maximum target value: Specify the maximum target value in the next address of the targe value at the final target position. Settable range: K2147483648 to K2147483647 (H80000000 to H7FFFFFFF) The interrupt program INTn corresponding to the specified highspeed counter channel can be executed at the target position. The interrupt program corresponding to the channel to be controlled is programmed. After this instruction is executed, interrupt will be permitted with ICTL instruction. Note1) Specify numbers so that the total of them does not exceed the maximum area of the internal relay.

3 457
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Example of setting 1
[Condition] (1) Target values: 4 points Position output from R10 (2) Each taget value is as the table below. Position output
1 (R11) 2 (R12) 3 (R13) 4 (R14)

Target value
2000 4000 8000 10000

(3) The maximum value is 14000 pulses. (4) The elapsed value of the highspeed counter is cleared to 0 before starting the position output.

Program
R9013 F1 DMV , H F1 DMV , H F1 DMV , H F1 DMV , K F1 DMV , K F1 DMV , K F1 DMV , K F1 DMV , K R3 F1 DMV , K ( DF ) 10, DT100 1, DT102 4, DT104 2000, DT106 4000, DT108 8000, DT110 10000, DT112 14000, DT114 0, DT90300 Specification of highspeed counter channel 0 Specification of internal relay word No. 4point output Target value 1 Target value 2 Target value 3 Target value 4 Max. target value Reset of elapsed value Start of cam control

F165 CAM0, DT100

Explanation of program operation


When adding elapsed values with the maximum target value When the internal relay R3 is on, the operation is as follows.
Elapsed value of highspeed counter Max. target value K14000 K10000 K8000 K4000 K2000 Time R3 R9110 R10 R11 R12 R13 R14

3 458
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Explanation of program operation


When adding + subtracting elapsed values with the maximum target value When the internal relay R3 is on, the operation is as follows.
Elapsed value of highspeed counter Max. target value K14000 K10000 K8000 K4000 K2000 R3 R9110 R10 R11 R12 R13 R14 Time

Example of setting 2
[Condition] (1) Cam output: 4 points Output from R10 to R13 (2) The target values for each cam are as the table below. Cam output
1 (R11) 2 (R12) 3 (R13) 4 (R14)

Target value
10000 4000 4000 8000

Program
R9013 ICTL, R9013 F1 DMV , F1 DMV , F1 DMV , F1 DMV , F1 DMV , F1 DMV , F1 DMV , F1 DMV , F1 DMV , R3 ( DF ) H H H H K K K K K 0, 0, 1, 4, H1 DT100 DT102 DT104 INT0 interrupt for CH0 is permitted. Specification of highspeed counter channel 0 Specification of internal relay word No. 4point output Target value 1 Target value 2 Target value 3 Target value 4 Max. target value Reset of elapsed value Start of cam control

K 10000, DT106 4000, DT108 4000, DT110 8000, DT112 0, 0, DT114 DT90300

F165 CAM0, DT100

3 459
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Explanation of program operation


When adding + subtracting elapsed values with the maximum target value and interrupt control, the operation will be performed as below if the following conditions are met; Elapsed value when the instruction is executed: K4000 < Elapsed value < K4000 Internal relay R3: ON *The operation can be started once the interrupt program is permitted to be started with ICTL instruction.
Elapsed value of highspeed counter

K8000 K4000 K4000 K10000 R3 R9110 R10 R11 R12 R13 R14 INT0 * The execution time in the interrupt program should be shorter than the travelling time between control positions. Time

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when the specified channel is out of the setting range. Turns on when any other setting than the highspeed counter/pulse output is specified. Turns on when the word number of the internal relay where the target value is output is out of the setting range. Turns on when the specification of the number of target values exceeds the limit. (Up to 31) Turns on when the garge value is greater than the maximum target value. Turns on when the target value is 0. Turns on when the targe values are not arranged in asceding order. Turns on ending 16bito area used for this instruction exceeds the limit of data table. Turns on when the highspeed counter has not been set for the specified channel by the system register.

3 460
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F166(HC1S)
Outline Program example

Target value match on (with channel specification)

Availability FP0/FP0R/FPe/ FP/FPX

When the elapsed value of the specified channel of the highspeed counter matches the target value, the specified output is turned on.
Boolean Address 10 11 12 Instruction ST DF F166 K K Y (HC1S) 0 10000 0 R 0

Ladder Diagram

Trigger R0 DF F166 HC1S , K 0 , K10000 , Y0 n


n S D

10

The channel number of the highspeed counter that corresponds to the match output (FP0/FP: H0 to H3, FPX: H0 to HB). The highspeed counter target value data or the starting address of the area that contains the data. The output coil that is turned on when the values match (Yn).

Operands
Relay Operand WX WY WR n S D N/A N/A N/A A A A SV N/A A N/A EV N/A A N/A DT N/A A N/A Timer/Counter Register Index register IX (*1) N/A A N/A IY (*2) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier N/A A N/A A: Available N/A: Not Available

N/A N/A N/A

(*1) I0 to IC on FP/FPX/FP0R (*2) ID on FP/FPX/FP0R

Explanation of example
Target value 10000 0 Elapsed value

R0 Highspeed counter control flag varies Y0

End of F166 control (clear)

ON when matches target value

3 461
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Highspeed counter control flag varies


FP0, FP, FPe FPX, FP0R R903A R9110

(Refer to next page) The number of the highspeed counter control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page.

Description
The number specified in S is set as the target value of the highspeed counter, and when the elapsed value matches the target value, the specified output Yn turns on (by interrupt processing). The target value setting and target value match output control are cleared when the elapsed value matches the target value. Specify a 32bit data value for the target value S within the following range: FP0/FPe K8,388,608 to K8,388,607 FP/FPXFP0R K2,147,483,648 to K2,147,483,647 The S value is stored in the target value area when the instruction is executed. Possible specification range for Yn: Devices specified for the match ON/OFF output
Type FP0/FPe FP FP (V3.10 or more) FPX Device area Y0 to Y7 Y0 to Y7 Y0 to Y1F Y0 to Y29F

However, for the device that is not implemented, only the memory turns ON/OFF. However, when the output that is not implemented is specified, only the WY memory is set/reset.

Precautions during programming


Set the highspeed counter by the system register before using this instruction. The highspeed counter control flag turns on when the execution condition of the F166(HC1S) instruction turns on and remains on until the target value match output turns on. During this time, an instruction to the highspeed counter of the same channel (F166 through F176) cannot be executed. Before the elapsed value matches the target value, the target value and target value match output setting are not cleared even if a hardware reset is performed (the elapsed value is cleared to 0). A check for double output with OT instructions, KP instructions, and other applied instructions is not performed on the output Y that is specified for target value match output. To turn off the target value match output that was turned on with this instruction, reset using an RST instruction or F0(MV) instruction, or use as a pair with an F167(HC1R) instruction. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. The highspeed counter control flag also changes during scanning. The interupt program is able to be excuted, when the highspeed counter elapsed value equals the set target value.

3 462
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe/FP/FPX

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is outside specification range. The S is outside specification range. The D is outside specification range. The highspeed counter has not been set for the specified channel by the system register.

FP0, FPe
Channel No.
ch0 ch1 ch2 ch3

Control flag
R903A R903B R903C R903D

Elapsed value area


DT9044 to DT9045 DT9048 to DT9049 DT9104 to DT9105 DT9108 to DT9109

Target value area


DT9046 to DT9047 DT9050 to DT9051 DT9106 to DT9107 DT9110 to DT9111

FP
Channel No.
ch0 ch1 ch2 ch3

Control flag
R903A R903B R903C R903D

Elapsed value area


DT90044 to DT90045 DT90048 to DT90049 DT91200 to DT91201 DT91204 to DT91205

Target value area


DT90046 to DT90047 DT90050 to DT90051 DT91202 to DT91203 DT91206 to DT91207

FPX Ry type:ch0 to chB


Channel No.
ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 chA chB

T type : ch0 to ch7 FP0R: ch0 to ch5


Control flag
R9110 R9111 R9112 R9113 R9114 R9115 R9116 R9117 R9118 R9119 R911A R911B

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321 DT90324 to DT90325 DT90328 to DT90329 DT90332 to DT90333 DT90336 to DT90337 DT90340 to DT90341 DT90344 to DT90345

Target value area


DT90302 to DT90303 DT90306 to DT90307 DT90310 to DT90311 DT90314 to DT90315 DT90318 to DT90319 DT90322 to DT90323 DT90326 to DT90327 DT90330 to DT90331 DT90334 to DT90335 DT90338 to DT90339 DT90342 to DT90343 DT90346 to DT90347

3 463
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F166(HC1S)
Outline

Target value match on (Highspeed counter control)

Availability FP0R

When the elapsed value of the specified channel of the highspeed counter (HSC) matches the target value, the specified output is turned on.
Boolean Address 10 Instruction ST DF F166 H K Y n S D (HC1S) 0 10000 2 R 0

Program example
Ladder Diagram

R0

11

DF

F166 HS1S , H0, K10000, Y2 n S D

12

The channel number of the highspeed counter that corresponds to the match output. The highspeed counter target value data or the starting address of the area that contains the data. The output coil that is turned on when the values match. (Yn)

Operands
Operand n S D (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A A A A A Timer/Counter Register SV N/A A N/A EV N/A A N/A DT N/A A N/A Index register In (*1) N/A A N/A N/A N/A N/A N/A N/A N/A SWR SDT Constant K A A N/A H A A N/A Index modifier N/A A N/A

N/A N/A N/A N/A

Description
Specify the channel number of the highspeed counter in n.
H 0 0 0 0

A: Available N/A: Not Available

The number specified in S is set as the target value of the highspeed counter, and when the elapsed value matches the target value, the specified output Yn turns on (by interrupt processing).

<Specification of the channel of highspeed counter/pulse output> Allowable range for specifying the highspeed counter: 0 to 5 <Specification of highspeed counter/pulse output> 0: Specification of highspeed counter

The target value setting and target value match output control are cleared when the elapsed value matches the target value. Specify a 32bit data value for the target value S within the following range: FP0R K2,147,483,648 to K2,147,483,647 The S value is stored in the target value area when the instruction is executed.

3 464
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Possible specification range for Yn: Devices specified for the match ON/OFF output Type
FP0R

Device area
Y0 to Y1F However, for the device that is not implemented, only the memory turns ON/OFF.

Example of target value match on setting


When specifying the highspeed counter

Condition
(1) Specify the highspeed counter channle number 0. (2) Set the target value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
R0 ( DF ) F166 HC1S, H0, K10000, Y2 Highspeed counter control start

Execution of program
Target value
10000 0

Elapsed value

R0

Control flag
R9110 Y2

End of F166 control (clear) The number of the highspeed counter control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page. Targe value match ON

3 465
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

FP0R <In case of highspeed counter>


Channel No.
ch0 ch1 ch2 ch3 ch4 ch5

Control flag
R9110 R9111 R9112 R9113 R9114 R9115

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321

Target value area


DT90302 to DT90303 DT90306 to DT90307 DT90310 to DT90311 DT90314 to DT90315 DT90318 to DT90319 DT90322 to DT90323

Interrupt program
INT0 INT1 INT3 INT4 INT6 INT7

Precautions during programming


Set the highspeed counter channel by the system register before using this instruction. Without the setting, an operation error occurs. The highspeed counter control flag (R9110 to R9115) turns on when the execution condition of this instruction turns on and remains on until the target value matches. During this time, the highspeed counter control instructions (F165(CAM0), F166(HC1S), F167(HC1R), F178(PLSM)) to the highspeed counter of the same channel cannot be executed. Before the elapsed value matches the target value, the target value and target value match output setting are not cleared even if a hardware reset is performed (the elapsed value is cleared to 0). A check for double outptu with OT instructions, KP instructions and other applied instructions is not performed on the outptu Y that is specified for target value match output. If the control is cleared with F0(MV) S, DT90052 instruction, the control of this instruction is cancelled and the highspeed countrol flag turns off. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. The interrupt program is able to be executed, when the highspeed counter elapsed value equals the set target value. The INT program description and the permission using ICTL instruction is required.

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when [S]n is out of the specified range. Turns on when [D]n is out of the specified range. Turns on when the highspeed counter has not been set for the specified channel by the system register.

3 466
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

F166(HC1S)
Outline Program example

Target value match on (Pulse output control)

Availability FP0R

When the elapsed value of the specified pulse output channel matches the target value, the specified output is turned on.
Boolean Address 10 Instruction ST DF F166 H K Y n S D (HC1S) 100 10000 2 R 0

Ladder Diagram

R0

11

DF

F166 HS1S , H100, K10000, Y2 n S D

12

The channel number of the pulse output that corresponds to the match output. The pulse output target value data or the starting address of the area that contains the data. The output coil that is turned on when the values match. (Yn)

Operands
Operand n S D (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A A A A A Timer/Counter Register SV N/A A N/A EV N/A A N/A DT N/A A N/A Index register In (*1) N/A A N/A N/A N/A N/A N/A N/A N/A SWR SDT Constant K A A N/A H A A N/A Index modifier N/A A N/A

N/A N/A N/A N/A

Description
Specify the channel number of the pulse output in n.
H 0 1 0 0

A: Available N/A: Not Available

The number specified in S is set as the target value of the pulse output channel, and when the elapsed value matches the target value, the specified output Yn turns on (by interrupt processing).

<Specification of the channel of highspeed counter/pulse output> Allowable range for specifying the pulse output: 0 to 3 <Specification of highspeed counter/pulse output> 1: Specification of pulse output

The target value setting and target value match output control are cleared when the elapsed value matches the target value. The control flag also turns off. Specify a 32bit data value for the target value S within the following range: FP0R K2,147,483,648 to K2,147,483,647 The S value is stored in the target value area when the instruction is executed. Possible specification range for Yn: Devices specified for the match ON/OFF output Type
FP0R

Device area
Y0 to Y1F However, for the device that is not implemented, only the memory turns ON/OFF.

3 467
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Example of target value match on setting


When specifying the pulse output

Condition
(1) Specify the pulse output channle number 0. (2) Set the targe value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
R0 ( DF ) F166 HC1S, H100, K10000, Y2 Pulse output control start

Execution of program
Target value 10000 0 Elapsed value

R0 Control flag R9130 Y2 End of F166 control (clear) The number of the pulse output control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page. Targe value match ON

3 468
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

FP0R <In case of pulse output>


For pulse output Channel Pulse output No. instruction flag
ch0 ch1 ch2 ch3 R9120 R9121 R9122 R9123

For pulse output control Elapsed value area


DT90400 to DT90401 DT90410 to DT90411 DT90420 to DT90421 DT90430 to DT90431

Target value area


DT90402 to DT90403 DT90412 to DT90413 DT90422 to DT90423 DT90432 to DT90433

Control flag
R9130 R9131 R9132 R9133

Target value area


DT90404 to DT90405 DT90414 to DT90415 DT90424 to DT90425 DT90434 to DT90435

Interrupt program
INT8 INT9 INT10 INT11

Precautions during programming


Set the pulse output channel by the system register before using this instruction. Without the setting, an operation error occurs. The pulse control flag (R9130 to R9133) turns on when the execution condition of this instruction turns on and remains on until the target value matches. During this time, the pulse output control instructions (F165(CAM0), F166(HC1S), F167(HC1R)) to the pulse output of the same channel cannot be executed. This instruction is available for all the pulse output instructions except F173(PWMH) instruction. This instruction can be executed before or after the execution of the above pulse output instruction. A check for double output with OT instructions, KP instructions and other applied instructions is not performed on the outptu Y that is specified for target value match output. If the control is cleared with F0(MV) S, DT90052 instruction, the control of this instruction is cancelled and the highspeed countrol flag turns off, however, the pulse output continues. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. The interrupt program is able to be executed, when the highspeed counter elapsed value equals the set target value. The INT program description and the permission using ICTL instruction is required.

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when [S]n is out of the specified range. Turns on when [D]n is out of the specified range. Turns on when the pulse output has not been set for the specified channel by the system register.

3 469
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F167(HC1R)
Outline Program example

Target value match off (with channel specification)

Availability FP0/FP0R/FPe/ FP/FPX

When the elapsed value of the specified channel of the highspeed counter matches the target value, the specified output is turned off.
Boolean Address 10 11 12 Instruction ST DF F167 K K Y (HC1R) 0 200 0 R 0

Ladder Diagram

Trigger R0 DF F167 HC1R , K 0 , K 200 , Y0 n


n S D

10

The channel number of the highspeed counter that corresponds to the match output (FP0/FPe/FP: H0 to H3, FPX: H0 to HB). The highspeed counter target value data or the starting address of the area that contains the data. The output coil that is turned off when the values match (Yn n: 0 to 7)

Operands
Relay Operand WX WY WR n S D N/A N/A N/A A A A SV N/A A N/A EV N/A A N/A DT N/A A N/A Timer/Counter Register Index register IX (*1) N/A A N/A IY (*2) N/A N/A N/A Constant K A A N/A H A A N/A Index modifier N/A A N/A A: Available N/A: Not Available

N/A N/A N/A

(*1) I0 to IC on FP/FPX/FP0R (*2) ID on FP/FPX/FP0R

Explanation of example
Elapsed value

0
Target value 200

R0 Highspeed counter control flag varies Y0

End of F167 control (clear)

OFF when matches target value

3 470
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Highspeed counter control flag varies


FP0, FP, FPe FPX, FP0R R903A R9110

(Refer to next page) The number of the highspeed counter control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page.

Description
The number specified in S is set as the target value of the highspeed counter, and when the elapsed value matches the target value, the specified output Yn turns off (by interrupt processing). The target value setting and target value match output control are cleared when the elapsed value matches the target value. Specify a 32bit data value for the target value S within the following range: FP0/FPe K8,388,608 to K8,388,607 FP/FPX/FP0R K2,147,483,648 to K2,147,483,647 The S value is stored in the target value area when the instruction is executed. Possible specification range for Yn: Devices specified for the match ON/OFF output
Type FP0/FPe FP FP (V3.10 or more)/FP0R FPX Device area Y0 to Y7 Y0 to Y7 Y0 to Y1F Y0 to Y29F

However, for the device that is not implemented, only the memory turns ON/OFF. However, when the output that is not implemented is specified, only the WY memory is set/reset.

Precautions during programming


Set the highspeed counter by the system register before using this instruction. The highspeed counter control flag turns on when the execution condition of the F167(HC1S) instruction turns on and remains on until the target value match output turns off. During this time, an instruction to the highspeed counter of the same channel (F166 through F173) cannot be executed. Before the elapsed value matches the target value, the target value and target value match output setting are not cleared even if a hardware reset is performed (the elapsed value is cleared to 0). A check for double output with OT instructions, KP instructions, and other applied instructions is not performed on the output Y that is specified for target value match output. To turn on the target value match output that was turned off with this instruction, reset using an SET instruction or F0(MV) instruction, or use as a pair with an F166(HC1S) instruction. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. The highspeed counter control flag also changes during scanning. The interupt program is able to be excuted, when the highspeed counter elapsed value equals the set target value.

3 471
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe/FP/FPX

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is outside specification range. The S is outside specification range. The D is outside specification range. The highspeed counter has not been set for the specified channel by the system register.

FP0, FPe
Channel No.
ch0 ch1 ch2 ch3

Control flag
R903A R903B R903C R903D

Elapsed value area


DT9044 to DT9045 DT9048 to DT9049 DT9104 to DT9105 DT9108 to DT9109

Target value area


DT9046 to DT9047 DT9050 to DT9051 DT9106 to DT9107 DT9110 to DT9111

FP
Channel No.
ch0 ch1 ch2 ch3

Control flag
R903A R903B R903C R903D

Elapsed value area


DT90044 to DT90045 DT90048 to DT90049 DT91200 to DT91201 DT91204 to DT91205

Target value area


DT90046 to DT90047 DT90050 to DT90051 DT91202 to DT91203 DT91206 to DT91207

FPX Ry type:ch0 to chB


Channel No.
ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 chA chB

T type : ch0 to ch7 FP0R: ch0 to ch5


Control flag
R9110 R9111 R9112 R9113 R9114 R9115 R9116 R9117 R9118 R9119 R911A R911B

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321 DT90324 to DT90325 DT90328 to DT90329 DT90332 to DT90333 DT90336 to DT90337 DT90340 to DT90341 DT90344 to DT90345

Target value area


DT90302 to DT90303 DT90306 to DT90307 DT90310 to DT90311 DT90314 to DT90315 DT90318 to DT90319 DT90322 to DT90323 DT90326 to DT90327 DT90330 to DT90331 DT90334 to DT90335 DT90338 to DT90339 DT90342 to DT90343 DT90346 to DT90347

3 472
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

F167(HC1R)
Outline

Target value match off (Highspeed counter control)

Availability FP0R

When the elapsed value of the specified channel of the highspeed counter (HSC) matches the target value, the specified output is turned off.
Boolean Address 10 Instruction ST DF F167 H K Y n S D (HC1R) 0 10000 2 R 0

Program example
Ladder Diagram

R0

11

DF

F167 HS1R , H0, K10000, Y2 n S D

12

The channel number of the highspeed counter that corresponds to the match output. The highspeed counter target value data or the starting address of the area that contains the data. The output coil that is turned on when the values match. (Yn)

Operands
Operand n S D (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A A A A A Timer/Counter Register SV N/A A N/A EV N/A A N/A DT N/A A N/A Index register In (*1) N/A A N/A N/A N/A N/A N/A N/A N/A SWR SDT Constant K A A N/A H A A N/A Index modifier N/A A N/A

N/A N/A N/A N/A

Description
Specify the channel number of the highspeed counter in n.
H 0 0 0 0

A: Available N/A: Not Available

The number specified in S is set as the target value of the highspeed counter, and when the elapsed value matches the target value, the specified output Yn turns off (by interrupt processing).

<Specification of the channel of highspeed counter/pulse output> Allowable range for specifying the highspeed counter: 0 to 5 <Specification of highspeed counter/pulse output> 0: Specification of highspeed counter

The target value setting and target value match output control are cleared when the elapsed value matches the target value. Specify a 32bit data value for the target value S within the following range: FP0R K2,147,483,648 to K2,147,483,647 The S value is stored in the target value area when the instruction is executed.

3 473
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Possible specification range for Yn: Devices specified for the match ON/OFF output Type
FP0R

Device area
Y0 to Y1F However, for the device that is not implemented, only the memory turns ON/OFF.

Example of target value match OFF setting


When specifying the highspeed counter

Condition
(1) Specify the highspeed counter channle number 0. (2) Set the target value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
R0 ( DF ) F167 HC1R, H0, K10000, Y2 Highspeed counter control start

Execution of program
Target value
10000 0

Elapsed value

R0

Control flag
R9110 Y2

End of F166 control (clear) The number of the highspeed counter control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page. Targe value match OFF

3 474
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

FP0R <In case of highspeed counter>


Channel No.
ch0 ch1 ch2 ch3 ch4 ch5

Control flag
R9110 R9111 R9112 R9113 R9114 R9115

Elapsed value area


DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321

Target value area


DT90302 to DT90303 DT90306 to DT90307 DT90310 to DT90311 DT90314 to DT90315 DT90318 to DT90319 DT90322 to DT90323

Interrupt program
INT0 INT1 INT3 INT4 INT6 INT7

Precautions during programming


Set the highspeed counter channel by the system register before using this instruction. Without the setting, an operation error occurs. The highspeed counter control flag (R9110 to R9115) turns on when the execution condition of this instruction turns on and remains on until the target value matches. During this time, the highspeed counter control instructions (F165(CAM0), F166(HC1S), F167(HC1R), F178(PLSM)) to the highspeed counter of the same channel cannot be executed. Before the elapsed value matches the target value, the target value and target value match output setting are not cleared even if a hardware reset is performed (the elapsed value is cleared to 0). A check for double outptu with OT instructions, KP instructions and other applied instructions is not performed on the outptu Y that is specified for target value match output. If the control is cleared with F0(MV) S, DT90052 instruction, the control of this instruction is cancelled and the highspeed countrol flag turns off. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. The interrupt program is able to be executed, when the highspeed counter elapsed value equals the set target value. The INT program description and the permission using ICTL instruction is required.

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when [S]n is out of the specified range. Turns on when [D]n is out of the specified range. Turns on when the highspeed counter has not been set for the specified channel by the system register.

3 475
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F167(HC1R)
Outline Program example

Target value match off (Pulse output control)

Availability FP0R

When the elapsed value of the specified pulse output channel matches the target value, the specified output is turned off.
Boolean Address 10 Instruction ST DF F167 H K Y n S D (HC1R) 100 10000 2 R 0

Ladder Diagram

R0

11

DF

F167 HS1R, H100, K10000, Y2 n S D

12

The channel number of the pulse output that corresponds to the match output. The pulse output target value data or the starting address of the area that contains the data. The output coil that is turned on when the values match. (Yn)

Operands
Operand n S D (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A A A A A Timer/Counter Register SV N/A A N/A EV N/A A N/A DT N/A A N/A Index register In (*1) N/A A N/A N/A N/A N/A N/A N/A N/A SWR SDT Constant K A A N/A H A A N/A Index modifier N/A A N/A

N/A N/A N/A N/A

Description
Specify the channel number of the pulse output in n.
H 0 1 0 0

A: Available N/A: Not Available

The number specified in S is set as the target value of the pulse output channel, and when the elapsed value matches the target value, the specified output Yn turns on (by interrupt processing).

<Specification of the channel of highspeed counter/pulse output> Allowable range for specifying the pulse output: 0 to 3 <Specification of highspeed counter/pulse output> 1: Specification of pulse output

The target value setting and target value match output control are cleared when the elapsed value matches the target value. The control flag also turns off. Specify a 32bit data value for the target value S within the following range: FP0R K2,147,483,648 to K2,147,483,647 The S value is stored in the target value area when the instruction is executed. Possible specification range for Yn: Devices specified for the match ON/OFF output Type
FP0R

Device area
Y0 to Y1F However, for the device that is not implemented, only the memory turns ON/OFF.

3 476
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Example of target value match OFF setting


When specifying the pulse output

Condition
(1) Specify the pulse output channle number 0. (2) Set the targe value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
R0 ( DF ) F167 HC1R, H100, K10000, Y2 Pulse output control start

Execution of program
Target value 10000 0 Elapsed value

R0 Control flag R9130 Y2 End of F166 control (clear) The number of the pulse output control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page. Targe value match OFF

3 477
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

FP0R <In case of pulse output>


For pulse output Channel Pulse instruction No. in execution
ch0 ch1 ch2 ch3 R9120 R9121 R9122 R9123

For pulse output control Elapsed value area


DT90400 to DT90401 DT90410 to DT90411 DT90420 to DT90421 DT90430 to DT90431

Target value area


DT90402 to DT90403 DT90412 to DT90413 DT90422 to DT90423 DT90432 to DT90433

Control flag
R9130 R9131 R9132 R9133

Target value area


DT90404 to DT90405 DT90414 to DT90415 DT90424 to DT90425 DT90434 to DT90435

Interrupt program
INT8 INT9 INT10 INT11

Precautions during programming


Set the pulse output channel by the system register before using this instruction. Without the setting, an operation error occurs. The pulse control flag (R9130 to R9133) turns on when the execution condition of this instruction turns on and remains on until the target value matches. During this time, the pulse output control instructions (F165(CAM0), F166(HC1S), F167(HC1R)) to the pulse output of the same channel cannot be executed. This instruction is available for all the pulse output instructions except F173(PWMH) instruction. This instruction can be executed before or after the execution of the above pulse output instruction. A check for double output with OT instructions, KP instructions and other applied instructions is not performed on the outptu Y that is specified for target value match output. If the control is cleared with F0(MV) S, DT90052 instruction, the control of this instruction is cancelled and the highspeed countrol flag turns off, however, the pulse output continues. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. The interrupt program is able to be executed, when the highspeed counter elapsed value equals the set target value. The INT program description and the permission using ICTL instruction is required.

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when [S]n is out of the specified range. Turns on when [D]n is out of the specified range. Turns on when the pulse output has not been set for the specified channel by the system register.

3 478
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

F168(SPD1)

Positioning control (trapezoidal control)

Availability FP0/FPe

Outputs a pulse from the specified output (Y0 or Y1) according to the specified parameter. Program example Outline
Ladder Diagram Boolean Address 10 11 Instruction ST F168 DT K R 0 (SPD1) 100 0

Trigger 10 R0 F168 SPD1 , DT100 , K 0 S


S n

Starting address for the area that contains the data table. Output Yn that corresponds to the pulse output (n: K0 or K1).

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding control flag is off and the execution condition (trigger) is in the on state, a pulse is output from the specified output (Y0 or Y1). The control code, initial speed, maximum speed, acceleration/deceleration time, and target value, are specified by a user program with a data table as shown on the following page. The frequency is switched by the acceleration/deceleration time specified for changing from the initial speed to the maximum speed. During deceleration (normally 30 steps), the frequency is changed based on the same slope as during acceleration.

Table of areas used


Channel no. ch0 ch1 Control flag R903A R903B Elapsed value area DT9044, DT9045 (For FP0 T32, DT90044, DT90045) DT9048, DT9049 (For FP0 T32, DT90048, DT90049) Target value area DT9046, DT9047 (For FP0 T32, DT90046, DT90047) DT9050, DT9051 (For FP0 T32, DT90050, DT90051) Directional output Y2 Y3

Notes
When this instruction is used, the setting for the channel corresponding to system register 400 should be set to Highspeed counter not used. By performing rewrite during RUN during pulse output, more than the set number of pulses may be output.
3 479
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Description of operating mode


Incremental <relative value control> Outputs the pulses set with the target value.
Operation mode Control code: H02 Forward off/Reverse on Pulse output on direction output off Pulse output on direction output on Control code: H03 Forward on/Reverse off Pulse output on direction output on Pulse output on direction output off Elapsed value

Target value

Positive Negative

Addition Subtraction

Absolute <absolute value control> Outputs a number of pulses equal to the difference between the set target value and the current value.
Operation mode Control code: H12 Forward off/Reverse on Pulse output on direction output off Pulse output on direction output on Control code: H13 Forward on/Reverse off Pulse output on direction output on Pulse output on direction output off Elapsed value

Target value

Target value greater than current value Target value less than current value

Addition

Subtraction

Precautions during programming


If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. Run the program referring to page 3 487, when controlling the motor in one direction using the pulse output function.

Data table settings


S S+1 S+2 S+3 S+4 S+5 S+6 f Fmax Output pulse number Fmin t Acceleration time t Deceleration time t Control code Initial speed Fmin (Hz) Maximum speed Fmax (Hz) (*1) K40 to K5000 (Hz) K40 to K9500 (Hz) (*2)

Acceleration/decele K30 to K32767 (ms) ration time t (ms) Target value (pulse number) K0 K8,388,608 K+8,388,607 K8 388 608 to K+8 388 607 Specify K0

next page

3 480
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

(*1): Specify the control code by setting the constant H.


H

Pulse width specification 0: Duty 50% 1: Fixed pulse width (approx. 80s) Note: A specification of 2 or higher will result in 0. The pulse width is the output value from the IC and the actual pulse width varies due to the delay in the response of photocoupler. Operation mode and directional output theory 00: Incremental Does not use directional output 02: Incremental forward off/reverse on 03: Incremental forward on/reverse off 10: Absolute Does not use directional output 12: Absolute forward off/reverse on 13: Absolute forward on/reverse off (*2): When the pulse width is set to duty 50%, the maximum is 6kHz. When the pulse width is set to fixed pulse width (approx. 80s), the maximum is 9.5kHz. (Thermocouple input type of FPe is removed.)

Notes for using FP0 compatiblity mode of FP0R


1 The elapsed value and target value of highspeed counter and pulse output is signed 32bit values.

The highspeed counter continues counting even if data exceeds the FP0 range (signed 24bit).
2 3 The pulse output continues outputting even if data exceeds the FP0 range (signed 24bit). 4 The waveforms of pulse output are a duty cycle of 25% regardless of the designation of instructions. 5 Even if the no count setting is specified with a pulse output instruction, it counts in the addition mode. 6

The maximum frequency of pulse output is 10000Hz.

7 When using the pulse output instruction, it is not used for the pulse ouput and normal output.

Supplement to the operation in the case with the direction output 1: FP0
1: When specifying a duty of 50%: The pulse output will start approx. Initial speed period/2 hours later after the direction output. When the initial speed is 500Hz, it is approx. 1ms. 2: When specifying 80us fixedly: The pulse output will start approx. Initial speed period 25us hours later after the direction output. When the initial speed is 500Hz, it is approx. 1.98ms.

3 481
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

2: For FP0 compatibility mode


Pulses are output using a duty of 25% fixedly. (The setting is invalid.) The pulse output will start approx. 300us later after the direction output. (The characteristics of a motor driver is considered.)

Application example
R0 F0 MV, H 2, DT 0 F0 MV, K1000, DT 1 F0 MV, K7000, DT 2 F0 MV, K300, DT 3 F1 DMV, K100000, DT 4 F0 MV, K 0, DT 6 R1 F168 SPD1, DT 0, K 0

DT 0 DT 1 DT 2 DT 3 DT 4 DT 5 DT 6 7kHz

H K K K

1002 1000 7000 300

K100000 0 Number of output pulse 100,000

1kHz 300ms 300ms

f
f = (7000 1000) 30 steps = 200(Hz) t = 300ms 30 steps = 10ms

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. n is number except 0 and 1. The value of S exceeds the limit of specified range. S+1 is less than K40 S+1 > S+2 The value of S+5, S+4 exceeds the limit of specified range.

3 482
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

F168(SPD1)

Positioning control (home position return)

Availability FP0/FPe

Outputs a pulse from the specified output (Y0 or Y1) according to the specified parameter. Program example Outline
Ladder Diagram Boolean Address 10 11 Instruction ST F168 DT K R 0 (SPD1) 100 0

Trigger 10 R0 F168 SPD1 , DT100 , K 0 S


S n

Starting address for the area that contains the data table. Output Yn that corresponds to the pulse output (n: K0 or K1).

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding control flag is off and the execution condition (trigger) is in the on state, a pulse is output from the specified output (Y0 or Y1). The control code, initial speed, maximum speed, and acceleration/deceleration time are specified by a user program with a data table as shown on the following page. The frequency is switched by the acceleration/deceleration time specified for changing from the initial speed to the maximum speed. During deceleration (normally 30 steps), the frequency is changed based on the same slope as during acceleration.

Table of areas used


Channel no. ch0 Control flag R903A Elapsed value area DT9044, DT9045 (For FP0 T32, DT90044, DT90045) DT9048, DT9049 (For FP0 T32, DT90048, DT90049) Target value area DT9046, DT9047 (For FP0 T32, DT90046, DT90047) DT9050, DT9051 (For FP0 T32, DT90050, DT90051) Directional output Y2 Near home input DT9052 bit2 (For FP0 T32, DT90052) DT9052 (For FP0 T32, DT90052) Home input X0

ch1

R903B

Y3

X1

Notes
When this instruction is used, the setting for the channel corresponding to system register 400 should be set to Highspeed counter not used. By performing rewrite during RUN during pulse output, more than the set number of pulses may be output.
3 483
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Description of operating mode


Until the home input (X0 or X1) is entered, the pulse is continuously output. To decelerate the movement when near the home, set the bit corresponding to DT9052 to off on off with the near home input. During operation, the elapsed value area and set value area will become insufficient. At the completion of operations, the elapsed value will become 0.

Home position return mode II


Home position return by means of near home input and home input Deceleration occurs when near home input occurs, and pulse output stops after home input. The control code (lower order) on the next page should be set to H24 to H27.
f Fmax home input Fmin t Near home input

Home position return mode I


Home position return using only home input Pulse output stops when home input occurs. Use a control code (lower order) setting on the following page from H20 to H23.
f home input Fmax Fmin t

Precautions during programming


When the control code (lower order) is H20 to H23, the home input is enabled after near home input regardless of whether deceleration has ended or is still in progress. When the control code (lower order) is H24 to H27, the home input is only enabled following near home input after deceleration to the initial speed has been completed. Even when home input has occurred, executing this instruction causes pulse output to begin. If the near home input is enabled while acceleration is in progress, deceleration begins. If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. Run the program referring to page 3 487, when controlling the motor in one direction using the pulse output function.

Data table settings


S S+1 S+2 S+3 Control code Initial speed Fmin (Hz) Maximum speed Fmax (Hz) (*1) K40 to K5000 (Hz) K40 to K9500 (Hz) (*2)

Acceleration/decele K30 to K32767 (ms) ration time t (ms)

next page
3 484
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

(*1): Specify the control code by setting the constant H.


H

Pulse width specification 0: Duty 50% 1: Fixed pulse width (approx. 80s) Note: A specification of 2 or higher will result in 0. The pulse width is the output value from the IC and the actual pulse width varies due to the delay in the response of photocoupler. Operation mode and directional output theory 20: Home position return mode I No directional output 22: Home position return mode I directional output off 23: Home position return mode I directional output on 24: Home position return mode II No directional output 26: Home position return mode II output off 27: Home position return mode II output on 24, 26, and 27 are supported by CPU Ver. 2.0 and subsequent versions. (*2): When the pulse width is set to duty 50%, the maximum is 6kHz. When the pulse width is set to fixed pulse width (approx. 80s), the maximum is 9.5kHz. (Thermocouple input type of FPe is removed.)

Notes for using FP0 compatiblity mode of FP0R


1 The elapsed value and target value of highspeed counter and pulse output is signed 32bit values. 2 The highspeed counter continues counting even if data exceeds the FP0 range (signed 24bit). 3 The pulse output continues outputting even if data exceeds the FP0 range (signed 24bit). 4 The waveforms of pulse output are a duty cycle of 25% regardless of the designation of instructions. 5 Even if the no count setting is specified with a pulse output instruction, it counts in the addition mode. 6

The maximum frequency of pulse output is 10000Hz.

7 When using the pulse output instruction, it is not used for the pulse ouput and normal output.

Supplement to the operation in the case with the direction output 1: FP0
1: When specifying a duty of 50%: The pulse output will start approx. Initial speed period/2 hours later after the direction output. When the initial speed is 500Hz, it is approx. 1ms. 2: When specifying 80us fixedly: The pulse output will start approx. Initial speed period 25us hours later after the direction output. When the initial speed is 500Hz, it is approx. 1.98ms.
3 485
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

2: For FP0 compatibility mode


Pulses are output using a duty of 25% fixedly. (The setting is invalid.) The pulse output will start approx. 300us later after the direction output. (The characteristics of a motor driver is considered.)

Application example
R0 F0 MV, H 22, DT 0 F0 MV, K1000, DT 1 F0 MV, K7000, DT 2 F0 MV, K300, DT 3 R1 F168 SPD1, DT 0, K 0

DT 0 DT 1 DT 2 DT 3

H K K K

0022 1000 7000 300

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. n is number except 0 and 1. The value of S exceeds the limit of specified range. S+1 is less than K40 S+1 > S+2

3 486
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

Caution regarding pulse output function (F168 and F169)


Use a program such as the following when performing continuous motor rotation in one direction.
X0 DF R0 F1 DMV, K0, F0 MV, F0 MV, F0 MV, F0 MV, F0 MV, H2, K1000, K7000, K300, K0, DT9044 DT0 DT1 DT2 DT3 DT6 Positioning start Clear the elapsed value Incremental control Initial speed Maximum speed Acceleration/deceleration time Target value (Movement amount) R0

F1 DMV, K100000, DT4 F168 SPD1, DT0, K0

Pulse output stops when the upper limit of the internal elapse value is exceeded if rotation is in one direction only. As a countermeasure, reset the elapsed value (zero clear) before executing F168 (SPD1) or F169 (PLS) instructions, as with the program, above. The pulse output does not stop when the FP0R is used as the FP0 (FP0 compatibility mode). The elapsed value is signed 32bit value.

3 487
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

F169(PLS)

Pulse output (with channel specification) (JOG operation)

Availability FP0/FPe

Outputs the pulse of the specified parameter from the specified output (Y0 or Y1). Program example Outline
Ladder Diagram Boolean Address 10 11 Instruction ST F169 DT K R 10 (PLS) 10 0

Trigger 10 R10 F169 PLS , DT10 , K 0 S


S n

Starting address for the area that contains the data table. Output Yn that corresponds to the pulse output (n: K0 or K1).

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding control flag is off and the execution condition (trigger) is in the on state, a pulse is output from the specified channel. The pulse is output while the execution condition (trigger) is in the on state. By specifying either incremental counting or decremental counting in the control code, this instruction can be used as an instruction for JOG operations. For that situation, set the control code with combinations such as H12 (incremental, directional output off) and H22 (decremental, directional output on). The frequency and duty can be changed each scan. (This becomes effective with the next pulse output after this instruction is executed.) See below for the corresponding areas.
Channel no. ch0 ch1 Control flag R903A R903B Data register for elapsed value DT9044, DT9045 (For FP0 T32, DT90044, DT90045) DT9048, DT9049 (For FP0 T32, DT90048, DT90049)

When using the incremental counting mode, the pulse stops when the elapsed value exceeds H7FFFFF. When using the decremental counting mode, the pulse stops when the elapsed value exceeds HFF800000.

Notes
When this instruction is used, the setting for the channel corresponding to system register 400 should be set to Highspeed counter not used. By performing a rewrite during RUN while operating, the pulse output will stop during rewriting.
3 488
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

Data table settings


S S+1 Control code Frequency (Hz) (*1) K40 to K10000 (Hz) (*2)

(*1): Specify the control code by setting the constant H.


H

Pulse width specification 0: Fixed pulse width (approx. 80s) (CPU ver. 2.1 or later) 1 to 9: Duty ration approx. 10 to 90% (10% increments) Operation mode and directional output 00: No counting mode 10: Incremental counting mode with no directional output 12: Incremental counting mode with directional output off 13: Incremental counting mode with directional output on 20: Decremental counting mode with no directional output 22: Decremental counting mode with directional output on 23: Decremental counting mode with directional output off (*2): When the pulse width is set to duty 50%, the maximum is 6kHz. When the pulse width is set to fixed pulse width (approx. 80s), the maximum is 9.5kHz. (Thermocouple input type of FPe is removed.)

Notes for using FP0 compatiblity mode of FP0R


1 The elapsed value and target value of highspeed counter and pulse output is signed 32bit values. 2 The highspeed counter continues counting even if data exceeds the FP0 range (signed 24bit). 3 The pulse output continues outputting even if data exceeds the FP0 range (signed 24bit). 4 The waveforms of pulse output are a duty cycle of 25% regardless of the designation of instructions. 5 Even if the no count setting is specified with a pulse output instruction, it counts in the addition mode. 6

The maximum frequency of pulse output is 10000Hz.

7 When using the pulse output instruction, it is not used for the pulse ouput and normal output.

Supplement to the operation in the case with the direction output 1: FP0
1: When specifying a duty of 50%: The pulse output will start approx. Initial speed period/2 hours later after the direction output. When the initial speed is 500Hz, it is approx. 1ms. 2: When specifying 80us fixedly: The pulse output will start approx. Initial speed period 25us hours later after the direction output. When the initial speed is 500Hz, it is approx. 1.98ms.

3 489
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

2: For FP0 compatibility mode


Pulses are output using a duty of 25% fixedly. (The setting is invalid.) The pulse output will start approx. 300us later after the direction output. (The characteristics of a motor driver is considered.)

Precautions during programming


If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. Run the program referring to page 3 487, when controlling the motor in one direction using the pulse output function.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. n is number except 0 and 1.

3 490
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0/FPe

Highlevel Instructions

F170(PWM)

PWM output (with channel specification)

Availability FP0/FPe

Outputs the PWM of the specified parameter from the specified output (Y0 or Y1). Program example Outline
Ladder Diagram Boolean Address 10 11 Instruction ST F170 DT K R 10 (PWM) 20 0

Trigger 10 R10 F170 PWM , DT20 , K 0 S


S n

Starting address for the area that contains the data table. Output Yn that corresponds to the PWM output (n: K0 or K1).

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding control flag is off and execution condition (trigger) is in the on state, a PWM is output from the specified channel. The PWM is output while the execution condition (trigger) is in the on state. The frequency and duty are specified with the data table on the right made by a user program. Since the output is delayed near the maximum and minimum levels, the set duty ratio will differ. The duty can be changed each scan. The frequency settings is only effective at the start of the execution of the instruction (becomes effective after the next pulse output). See below for the corresponding areas.
Channel no. ch0 ch1 Control flag R903A R903B

Notes
When this instruction is used, the setting for the channel corresponding to system register 400 should be set to Highspeed counter not used. By performing a rewrite during RUN while operating, the pulse output will stop during rewriting. If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously.
3 491
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0/FPe

Data table settings


S S+1 Control code Duty (%) H0 to H16 (*1) K1 to K999 (0.1% to 99.9%)

(*1): Control code contents (frequency settings) FP0 Setting


H11 H12 H13 H14 H15 H16 H0 H1 H2 H3 H4 H5 H6 H7 H8

FP0 compatibility mode of FP0R Period (ms)


1.0 1.4 2.0 2.5 5.0 10.0 26.3 52.6 105.3 208.3 416.7 833.3 1666.7 3333.3 6666.7

Frequency (Hz)
1000 714 500 400 200 100 38 19 9.5 4.8 2.4 1.2 0.6 0.3 0.15

Frequency (Hz)
1000 750 500 400 200 100 40 20 10 6 Cannot be specified Cannot be specified Cannot be specified Cannot be specified Cannot be specified

Period (ms)
1.0 1.3 2.0 2.5 5.0 10.0 25.0 50.0 100.0 166.7

H11 to H16 are supported by CPU Ver. 2.0 and subsequent versions.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. n is number except 0 and 1. The frequency setting value set with (S) is outside the specification range. 100% or higher is set with (S + 1)

3 492
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

F171(SPDH)

Pulse output (with channel specification) (trapezoidal control)

Availability FP/FPX

This instruction outputs pulses from the specified channel for the pulse output according to the specified parameters. Program example Outline
Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F171 DT K (SPDH) 100 0 R 10

Trigger 10 R10 DF

F171 SPDH , DT100 , K 0 S n

S n

Starting address of area containing the data table. Channel for pulse output.

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
Pulses are output from the specified channel when the corresponding control flag turns off and the excution condition is in on state. For FP
Channel no. ch0 ch2 Output Y0 Y1 Y3 Y4 Output method CW CCW CW CCW PLS SIGN PLS SIGN

For FPX Ry type (AFPXPLS)


Channel no. ch0 Cassete mounting part 1 ch1 Cassete mounting part 2 Output Y100 Y101 Y200 Y201 Output method CW CCW CW CCW PLS SIGN PLS SIGN

For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Output Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Output method CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz. 3 493
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are specified by creating the data table S to S+11 on the following page using the user program. The frequency is changed using the specified acceleration/deceleration time from the initial speed to the maximum speed. During deceleration, the frequency is changed based on the same slope as during acceleration. If the frequency is set to 50 kHz or more, specify a duty of 1/4 (25%). If the frequency for ch2 or ch3 of FPX Tr type is set to 10kHz or more, specify a duty of 1/4 (25%).

Table of areas used


For FP
Channel no. ch0 ch2 Control flag R903A R903C Elapsed value area DT90044, DT90045 DT90200, DT90201 Target value area DT90046, DT90047 DT90202, DT90203

For FPX Ry type


Channel no. ch0 ch1 Control flag R911C R911D Elapsed value area DT90348, DT90349 DT90352, DT90353 Target value area DT90350, DT90351 DT90354, DT90355

Note) Ch1 cannot be used for C14R. For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Control flag R911C R911D R911E R911F Elapsed value area DT90348 DT90349 DT90352 DT90353 DT90356 DT90357 DT90360 DT90361 Target value area DT90350 DT90351 DT90354 DT90355 DT90358 DT90359 DT90362 DT90363

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz.

3 494
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Operation modes
Incremental <relative value control> Outputs the pulses set with the target value.
Selected mode CW/CCW Pulse output from CW Pulse output from CCW PLS + SIGN Forward off Reverse on Pulse output on direction output off Pulse output on direction output on PLS + SIGN Forward on Reverse off Pulse output on direction output on Pulse output on direction output off Elapsed value

Target value

Positive Negative

Addition Subtraction

Absolute <absolute value control> Outputs a number of pulses equal to the difference between the set target value and the current value.
Selected mode CW/CCW PLS + SIGN Forward off Reverse on Pulse output on direction output off Pulse output on direction output on PLS + SIGN Forward on Reverse off Pulse output on direction output on Pulse output on direction output off Elapsed value

Target value

Target value greater than current value Target value less than current value

Pulse output from CW Pulse output from CCW

Addition

Subtraction

Precautions during programming


If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. When using this instruction for FP, set the channels corresponding to system registers 400 and 401 to Not set as highspeed counter. If you perform a rewrite during RUN when pulse output is taking place, more pulses than the setting may be output. When using this instruction for FPX, set the pulse output by the system register.

3 495
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

Setting the data table


f Fmax Output pulse number Fmin t Acceleration time S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 Control code Initial speed Fmin (Hz) Maximum speed Fmax (Hz) t Deceleration time (*1) (*2) (*2) t

Acceleration/decele (*3) ration time t (ms) Target value (pulse number) K0 (*4)

(*1): Specification of control code (specify with H constant)


H

0: Fixed Number of acceleration/deceleration steps 0: 30 steps 1: 60 steps (Can be specified for only FP V1.4 or more and FPX.) Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%) Frequency range 0: 1.5 Hz to 9.8 kHz 1: 48 Hz to 100 kHz 2: 191 Hz to 100 kHz Operation mode and output method 00: Incremental CW/CCW 02: Incremental PLS + SIGN (forward off / reverse on) 03: Incremental PLS + SIGN (forward on / reverse off) 10: Absolute CW/CCW 12: Absolute PLS + SIGN (forward off / reverse on) 13: Absolute PLS + SIGN (forward on / reverse off) (*2): Frequency (Hz) K constant Frequency range 0: 1.5 Hz to 9.8 kHz [K1 to K9800 (units: Hz)] (Max. error near 9.8 kHz: approx. 0.9 kHz) * Set 1 to specify 1.5 Hz. 1: 48 Hz to 100 kHz [K48 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 3 kHz) 2: 191 Hz to 100 kHz [K191 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 0.8 kHz) Initial speed: Set to 30 kHz or lower. (*3): Acceleration/deceleration time (ms) K constant With 30 steps: K30 to K32760 (Set in units of 30 ms.) With 60 steps: K60 to K32760 (C32T2 and C28P2 only) (Set in units of 60 ms.) (*4): Target value K2147483648 to K2147483647 3 496
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Application example
R0 F1 DMV, H1100, DT 0 F1 DMV, K1000, DT 2 F1 DMV, K7000, DT 4 F1 DMV, K300, DT 6 F1 DMV, K100000, DT 8 F1 DMV, K 0, DT 10 R1 (DF) 7kHz Output pulse number 100,000 1kHz 300ms 300ms F171 SPDH, DT 0, K 0

With 30 steps: f = (7000 1000) 30 steps = 200(Hz) t = 300ms 30 steps = 10ms

With 60 steps: (FP V1.4 or more only) f = (7000 1000) 60 steps = 100(Hz) t = 300ms 60 steps = 5ms

Acceleration/deceleration time setting


When setting the acceleration/deceleration time, number of steps and initial speed, please use values that satisfy the following formula. When the acceleration/deceleration time has 30 steps please use 30 ms units. When it has 60 steps, please use 60 ms units. *5 Acceleration/deceleration time: t [ms] (no. of steps x 1000) / initial speed f0 [Hz] (*5): If they are set without using 30 ms units or 60 ms units, the values will be automatically corrected to the multiple values of 30 ms or 60 ms (larger value).

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is outside specification range. The data of S, S+1 to S+4, S+5 are outside specification range. The S+2, S+3 > S+4, S+5. The S+8, S+9 is outside specification range. With the FPX, the pulse output has not been set by the system register.

3 497
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

F171(SPDH)

Pulse output (with channel specification) (home position return)

Availability FP/FPX

This instruction outputs pulses from the specified channel for the pulse output according to the specified parameters. Program example Outline
Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F171 DT K (SPDH) 100 2 R 10

Trigger 10 R10 DF

F171 SPDH , DT100 , K 2 S n

S n

Starting address of area containing the data table. Channel for pulse output.

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
Pulses are output from the specified channel when the corresponding control flag turns off and the excution condition is in on state. For FP
Channel no. ch0 Output Y0 Y1 Y2 ch2 Y3 Y4 Y5 Output method CW CCW PLS SIGN

For FPX Ry type (AFPXPLS)


Channel no. ch0 Cassete mounting part 1 Output Y100 Y101 Y102 ch1 Cassete mounting part 2 Y200 Y201 Y202 Output method CW CCW PLS SIGN

Deviation counter clear CW CCW PLS SIGN

Deviation counter clear CW CCW PLS SIGN

Deviation counter clear

Deviation counter clear

3 498
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

For FPX Tr type


Channel no. ch0 Output Y0 Y1 Y4 or Y8 ch1 Y2 Y3 Y5 or Y9 ch2 Y4 Y5 ch3 Y6 Y7 Output method CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN

Deviation counter clear

Deviation counter clear

No deviation counter clear control

No deviation counter clear control

Note) There is no ch3 for C14T and C14TD. Note) C14T and C14TD is Y4 or Y5. C30T, C30TD, C60T and C60TD is Y8 or Y9. Note) The deviation counter clear control is not available for the ch2 and ch3. Note) Use the ch2 and ch3 at up to 20 kHz.

The control code, initial speed, maximum speed, acceleration/deceleration time, and deviation counter clear signal are specified by creating a data table as described on the following page using the user program. The frequency is changed using the specified acceleration/deceleration time from the initial speed to the maximum speed. During deceleration, the frequency is changed based on the same slope as during acceleration. If the frequency is set to 50 kHz or more, specify a duty of 1/4 (25%). If the frequency for ch2 or ch3 of FPX Tr type is set to 10kHz or more, specify a duty of 1/4 (25%).

Table of areas used


For FP
Channel no. ch0 ch2 Control flag R903A R903C Elapsed value area DT90044, DT90045 DT90200, DT90201 Target value area DT90046, DT90047 DT90202, DT90203 Near home DT90052 bit2 DT90052 bit4 Home input X2 X5

For FPX Ry type


Channel no. ch0 ch1 Control flag R911C R911D Elapsed value area DT90348, DT90349 DT90352, DT90353 Target value area DT90350, DT90351 DT90354, DT90355 Near home DT90052 bit4 DT90052 bit4 Home input X4 X5

3 499
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Control flag R911C R911D R911E R911F Elapsed value area DT90348 DT90349 DT90352 DT90353 DT90356 DT90357 DT90360 DT90361 Target value area DT90350 DT90351 DT90354 DT90355 DT90358 DT90359 DT90362 DT90363 DT90052 <bit4> Near home home input X4 X5 X6 X7

Note) There is no ch3 for C14T and C14TD.

Operation modes
Return to home position Pulses are output continually until home input (X2 or X5) occurs. To decelerate at near home, set the corresponding bit of special data register DT90052 off on off when near home input occurs. The value in the elapsed value area during a home position return differs from the current value. When the return is completed, the elapsed value changes to 0. Home position return by means of near home input and home input Deceleration occurs when near home input occurs, and pulse output stops after home input. Operation varies depending on the control code (lower order) settings described on the following page.
f Fmax home input Fmin t Near home input

Home position return using only home input Pulse output stops when home input occurs. Use a control code (lower order) setting on the following page from H20 to H27.
f home input Fmax Fmin t

3 500
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Setting the data table


S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 Control code Initial speed Fmin (Hz) Maximum speed Fmax (Hz) Acceleration/deceleration time t (ms) Deviation counter clear signal output time tr(ms) (*1) (*2) (*2) (*3) (*4)

(*1): Control code specification (specify with an H constant)


H

0: Fixed Number of acceleration/deceleration steps 0: 30 steps 1: 60 steps (Can be specified for only FP V1.4 or more and FPX.) Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%) Frequency range 0: 1.5 Hz to 9.8 kHz 1: 48 Hz to 100 kHz 2: 191 Hz to 100 kHz Operation mode and output method 20: Home position return mode I 21: Home position return mode I 22: Home position return mode I 23: Home position return mode I 24: Home position return mode I 25: Home position return mode I 26: Home position return mode I 27: Home position return mode I 30: Home position return mode II 31: Home position return mode II 32: Home position return mode II 33: Home position return mode II 34: Home position return mode II 35: Home position return mode II 36: Home position return mode II 37: Home position return mode II CW CCW Direction output off Direction output on CW + deviation counter clear CCW + deviation counter clear Direction output off + deviation counter clear Direction output on + deviation counter clear CW CCW Direction output off Direction output on CW + deviation counter clear CCW + deviation counter clear Direction output off + deviation counter clear Direction output on + deviation counter clear

(*2): Frequency (Hz) K constant Frequency range 0: 1.5 Hz to 9.8 kHz [K1 to K9800 (units: Hz)] (Max. error near 9.8 kHz: approx. 0.9 kHz) * Set 1 to specify 1.5 Hz. 1: 48 Hz to 100 kHz [K48 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 3 kHz) For this range we recommend a duty of 1/4. 2: 191 Hz to 100 kHz [K191 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 0.8 kHz) For this range we recommend a duty of 1/4. Initial speed: Set to 30 kHz or lower. (*3): Acceleration/deceleration time (ms) K constant With 30 steps: K30 to K32760 With 60 steps: K60 to K32760 (FP V1.4 or more and FPX only) 3 501
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

(*4): Deviation counter clear signal output time Set the deviation counter clear signal output time. 0.5 ms to 100 ms [K0 to K100] Set value and margin of error (0.5 ms or less) Specify K0 when not using this signal or when specifying 0.5 ms

Application example
R0 F1 DMV, H1125, DT 0 F1 DMV, K1000, DT 2 F1 DMV, K7000, DT 4 F1 DMV, K100, DT 6 F1 DMV, K10, DT 8 R1 (DF) F171 SPDH, DT 0, K 2

Acceleration/deceleration time setting


When setting the acceleration/deceleration time, number of steps and initial speed, please use values that satisfy the following formula. When the acceleration/deceleration time has 30 steps please use 30 ms units. When it has 60 steps, please use 60 ms units. *5 Acceleration/deceleration time: t [ms] (no. of steps x 1000) / initial speed f0 [Hz] (*5): If they are set without using 30 ms units or 60 ms units, the values will be automatically corrected to the multiple values of 30 ms or 60 ms (larger value).

Precautions during programming


When the control code (lower order) is H20 to H27 (Home return mode type I), the home input is enabled after near home input regardless of whether deceleration has ended or is still in progress. When the control code (lower order) is H30 to H37 (Home return mode type II), the home input is only enabled following near home input after deceleration to the initial speed has been completed. Even when home input has occurred, executing this instruction causes pulse output to begin. If the near home input is enabled while acceleration is in progress, deceleration begins. If both the normal program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. When using this instruction for FP, set the channels corresponding to system registers 400 and 401 to Not set as highspeed counter. When using this instruction for FPX, set the pulse output by the system register. If you perform a rewrite during RUN when pulse output is taking place, more pulses than the setting may be output. During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. Please refer to F0 (MV) instruction pulse output control when doing a soft reset, count disable, pulse output stop, or near home process.

3 502
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is outside specification range. The data of S, S+1 to S+4, S+5 are outside specification range. The S+2, S+3 > S+4, S+5. With the FPX, the pulse output has not been set by the system register.

3 503
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F171(SPDH)

Pulse output (Trapezoidal control)

Availability FP0R

Outputs pulses from the specified pulse output channels according to the specified parameters. [Feature] An acceleration time and deceleration time can be set respectively. Also, the deceleration stop is available. The target speed can be changed. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST DF F171 DT K (SPDH) 100 0 R 10

R10

DF

F171 SPDH , DT100 , K 0 S n

11 12

To change the speed, do not insert the DF instruction as the trigger should be kept being ON. S n Starting 16bit area for registering data tables Channels intended for pulse output (n=0 to 3)

Operands
Operand n S (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register In (*1) N/A N/A N/A N/A N/A N/A SWR SDT Constant K N/A A H N/A A Index modifier A N/A

Description

A: Available N/A: Not Available

When the trigger is on, pulses are output from the specified channels and the trapezoidal control can be performed. The control code, initial speed, target speed, acceleration time, deceleration time and the target value is specified by creating data tables [S] to [S+11] using user progrmas. When accelerating, the frequency is changed in the acceleration time specified from the initial speed to the target speed. When decelerating, the frequency is changed in the deceleration time specified from the target speed. The deceleration stop request is available by the control data (bit5) of DT90052. (e.g.) F0(MV) H120, DT90052 When using the same condition as the table used at the preveious startup, the operation can be started at high speed without calculation. Method of acceleration/deceleration and initial speed During the pulse output, the pulse output insturction flag corresponding to the channel turns on. When the deceleration stop is requested during acceleration, deceleration is performed with the same slope of the deceleration time from the target speed. In this instruction, the operation is processed giving the acceleration/deceleration time priority.

3 504
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

The pulse output frequency can be changed by rewriting the target speed during the pulse output. Two control methods are avialable, which are type 0 and type 1. Using the type 0, the speed can be changed within the range of the target speed specified first. Using the type 1, the speed can be accelerated/decelerated up to the range of the maximum frequency, regardless of the target speed specified fist. Image of operation 1: When the target speed is not changed
Target value

Target value Initial speed Time Acceleratrion Deceleration time Deceleration time time Deceleration stop request by F0(MV) S,DT90052

Pulse output instruction flag Trigger

Image of operation 2: When the target value is changed


First change of target speed Initial target speed Second change of target speed Time Deceleration Deceleration stop

Pulse output instruction flag

Acceleratrion

Acceleratrion

Trigger

When changing the target value, keep the trigger ON.

Precautions during programming


When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding control flag to the channel started is on. When rewriting during RUN is performed, the pulse output will stop. The instruction cannot be started when the deceleration stop request flag is on. To restart after stopping the operation, turn off the trrigger once, and then turn it on again. When the instruction is started during the interrupt program, specify the execution in the interrupt program with the control code. Speed cannot be changed when the instruction is executed in the interrupt program.

3 505
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Pules output channels and areas used


Channel No. ch0 ch1 ch2 ch3 Output Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Output type CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN Pulse Elapsed output value instruction area flag R9120 R9121 R9122 R9123 DT90400 DT90401 DT90410 DT90411 DT90420 DT90421 DT90430 DT90431 Targe value area DT90402 DT90403 DT90412 DT90413 DT90422 DT90423 DT90432 DT90433 Correction speed of initial speed R90406 R90416 R90426 R90436 Acceleration Deceleration forbidden minimum area starting speed position DT90407 DT90417 DT90427 DT90437 DT90408 DT90409 DT90418 DT90419 DT90428 DT90429 DT90438 DT90439

Settings of data table


Table of type 0
S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 Control code Initial speed (Hz) Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Target value (No. of pulses)

Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] Acceleration time up to the target speed: Acceleration time range (ms) K1 to K32760 (Unit: ms) Deceleration time from the target speed: Deceleration time range (ms) K1 to K32760 (Unit: ms) Target value range K2,147,483,648 to K2,147,483,647

Table of type 1
S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 Control code Initial speed (Hz) Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Target value (No. of pulses)

Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] Acceleration time up to the max. speed 50kHz: Acceleration time range (ms) K1 to K32760 (Unit: ms) Deceleration time from the max. speed 50kHz: Deceleration time range (ms) K1 to K32760 (Unit: ms) Target value range K2,147,483,648 to K2,147,483,647

Note: If the speed is changed to a value over 50kHz during the operation, it will be corrected to 50kHz.

Note the following characteristics according to the specified initial speed.


(1) When the initial speed is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. If the frequency is higher than that, the speed error will be larger. (2) When the initial speed is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. (3) When the initial speed is 184 or higher, the control up to 50kHz can be performed. The speed error around 50kHz will be smallest.

3 506
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Change of speed during pulse output


(1)With the type 0, if a value larger than the target speed at startup is specified, it will be corrected to the target speed at startup. With the type 1, if the target value is set to a value larger than 50kHz, it will be corrected to 50kHz. (2)If the elapsed value crosses over the acceleration forbidden area starting position during accelerating, acceleration cannot be performed. For information on the acceleration forbidden area starting position, refer to the special registers. (3)For deceleration, the speed cannot be lower than the deceleration minimum speed. For information on the deceleration minimum speed, refer to the special registers.

Assignment of control code (Specify with H constant)


H 10: Fixed Control assignment 0: Trapezoidal Control assignment type 0: Type 0 1: Type 1 Interrupt execution assignment 0: Execute in main program. 1: Execute in interrupt program. (The trigger is the level type.) Output assignment 0: Pulse output 1: Calculation only Operation mode assignment 0: Incremental 1: Absolute Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF) *As for the output assignment When starting the instruction with th setting of 1: Calculation only, the pulse output is not performed. When starting the instruction with the assignment of the same channel and the same parameter after executing this instruction once for a channel, it can be started at high speed. (It is the same for the both cases of Pulse output and Calculation only.) However, if a parameter othern than the parameter used for the previous execution is specified, the highspeed startup cannot be performed. Note) The same parameter means that all the parameters other than the output assignment are the same.

Output type
Incremental <Relative control>
The pulses specified for the target value are output. Mode selection CW/CCW Target value
When positive When negative Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

Absolute <Absolute value control>


The pulse that is the difference between the specified target value and the current value is output. Mode selection CW/CCW Target value
When target value is larger than current value When target value is smaller than current value Output from CW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

Addition

Output from CCW

Subtraction

3 507
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

[Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.)

Sample program1: Trapezoidal control type 0, No deceleration stop request, No change of speed
R0 ( DF ) F1 DMV, H10000000, DT0 F1 DMV, K1000, DT2 F1 DMV, K7000, DT4 F1 DMV, K450, DT6 F1 DMV, K300, DT8 R1 F1 DMV, K100000, DT10 ( DF ) F171 SPDH, DT0, K0
R1 1kHz 450ms Frequency 7kHz

Output pulse number


100,000 Time

300ms

Pulse output instruction flag

Data table
DT0 DT2 DT4 DT6 DT8 DT10 Control information Initial speed (Hz) Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Target value (No. of pulses) Trapezoidal control Incremental CW/CCW 1000Hz 7000Hz 450ms 300ms 100,000 pulses

Sample program2: Trapezoidal control type 0, With deceleration stop request, With change of speed
R0 ( DF ) F1 DMV, H10000000, DT0 F1 DMV, K1000, DT2 F1 DMV, K7000, DT4 F1 DMV, K450, DT6 F1 DMV, K300, DT8 R1 R2 F1 DMV, K100000, DT10 ( DF ) ( DF ) F171 SPDH, DT0, K0 F0 MV H120 DT90052 F0 MV H100, DT90052 Pulse output instruction flag
R1 R2 1kHz 450ms 300ms Frequency 7kHz

Output pulse number


100,000 Time

300ms

The deceleration stop is performed according to the decelection time after the detection of deceleration stop request. 3 508
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Data table Refer to the Sample program1.

Sample program3: Trapezoidal control type 0, with change of speed


R0 ( DF ) F1 DMV, H10000000, DT0 F1 DMV, K1000, DT2 F1 DMV, K7000, DT4 F1 DMV, K450, DT8 F1 DMV, K300, DT6 R1 R2 F1 DMV, K100000, DT10 F171 SPDH, DT0, K0 ( DF ) F1 DMV, K5000, DT4
R1 R2 1kHz 450ms Deceleration Frequency 7kHz 5kHz

Output pulse number


100,000

Time 300ms Deceleration stop

When changing the target value, keep the trigger ON. Change of speed

Pulse output instruction flag

Data table
DT0 DT2 DT4 DT6 DT8 DT10 Control information Initial speed (Hz) Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Target value (No. of pulses) Trapezoidal control Incremental CW/CCW 1000Hz 7000Hz 450ms 300ms 100,000 pulses

3 509
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Sample program4: Trapezoidal control type 1, with change of speed


R0
Frequency

( DF )

F1 DMV, H10010000, DT0 F1 DMV, K1000, DT2 F1 DMV, K25000, DT4 F1 DMV, K600, DT8 F1 DMV, K400, DT6 F1 DMV, K100000, DT10 F171 SPDH, DT0, K0

50kHz 25kHz 1kHz 300ms 300ms Output pulse number 100,000 200ms Time

R1 R2

400ms Deceleration stop R1 R2 When changing the target value, keep the trigger ON. Change of speed

( DF )

F1 DMV, K20000, DT4

Pulse output instruction flag

Data table
DT0 DT2 DT4 DT6 DT8 DT10 Control information Initial speed (Hz) Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Target value (No. of pulses) Trapezoidal control Incremental CW/CCW 1000Hz 25000Hz 600ms 400ms 100,000 pulses Acceleration time up to 50kHz Deceleration time from 50kHz

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when each data of [S,S+1] to [S+4,S+5] is out of the specified range. Turns on when [S+2,S+3]>[S+4,S+5]. Turns on when [S10,S+11] is out of the specified range. Turns on when the pulse output has not been set by the system register. Turns on when the interrupt execution has been specified for executing the instruction in the main program.

3 510
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

F171(SPDH)

Pulse output (JOG positioning type 0)

Availability FP0R

Outpus the specified number of pulses and performs the deceleration stops after the position control starting input during the pulse output. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST DF F171 DT K (SPDH) 100 0 R 10

R10

11

DF

F171 SPDH , DT100 , K 0 S n

12

S n

Starting 16bit area for registering data tables Channels intended for pulse output (n=0 to 3)

Operands
Operand S n (*1) I0 to ID Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/ Counter EV N/A N/A Register DT A N/A Index register In (*1) N/A N/A N/A N/A SWR Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the trigger is on, pulses are output from the specified channels. The control code, initial speed, target speed, acceleration time, deceleration time and the target value after the position control starting input is specified by creating data tables [S] to [S+11] using user progrmas. When accelerating, the frequency is changed in the acceleration time specified from the initial speed to the target speed. The pulse output continues until the position control starting input turns on after reaching the target speed. After the position control starting input turned on, the pulse output continues up to the target value, and then decelerates and stops. For using the position control staring input (X0, X1, X2, X3), set the system register 402. When decelerating, the frequency is changed in the deceleration time specified from the target speed. The positioning control can be also started by the control data (bit6) of DT90052. (e.g.) F0(MV) H140, DT90052 The deceleration stop can be requested by the control data (bit5) of DT90052. (e.g.) F0(MV) H120, DT90052 When using the same condition as the table used at the preveious startup, the operation can be started at high speed without calculation. During the pulse output, the pulse output insturction flag corresponding to channel turns on. When the deceleration stop is requested during acceleration, deceleration is performed with the same slope of the deceleration time from the target speed. In this instruction, the operation is processed giving the acceleration/deceleration time priority. The initial speed may be corrected to enable accelerating/decelerating within the specified time. 3 511
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Image of operation: When the target speed does not change


Frequency Target speed Target value Position control starting input Time Deceleration time

Initial speed Acceleratrion Flag Position control starting input Pulse output instruction flag

Image of operation: When the target speed changes


Frequency Target speed Target value Position Time control Deceleration starting input time

Initial speed

Acceleratrion Flag Position control starting input Pulse output instruction flag

When changing the target value, keep the trigger ON.

Precautions during programming


When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding pulse output instruction flag to the channel started is on. When rewriting during RUN is performed, the pulse output will stop. As for the position control starting input, only the rising edge (ON) is detected. The instruction cannot be started when the deceleration stop request flag is on. Note that the methods to stop the pulse output in this instruction are only any of the following operations: Turning on the position control starting input (position control starting flag), requesting the deceleration stop and executing an emergency stop. To restart after stopping the operation, turn off the trrigger once, and then turn it on again. When the instruction is started during the interrupt program, specify the execution in the interrupt program with the control code. Speed cannot be changed when the instruction is executed in the interrupt program.

3 512
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Pulse output channels and areas used


Channel Output Output type No. Position control starting input Pulse output instruction flag Elapsed value area Target value area Correction Acceleration Deceleration speed of forbidden minimum initial area starting speed speed position

ch0

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

CW CCW CW CCW CW CCW CW CCW

PLS SIGN PLS SIGN PLS SIGN PLS SIGN

X0 DT90052 bit6 X1 DT90052 bit6 X2 DT90052 bit6 X3 DT90052 bit6

R9120

DT90400 DT90401 DT90410 DT90411 DT90420 DT90421 DT90430 DT90431

DT90402 DT90403 DT90412 DT90413 DT90422 DT90423 DT90432 DT90433

DT90406

DT90407

DT90408 DT90409 DT90418 DT90419 DT90428 DT90429 DT90438 DT90439

ch1

R9121

DT90416

DT90417

ch2

R9122

DT90426

DT90427

ch3

R9123

DT90436

DT90437

Setting the data table


S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 Control code Initial speed (Hz) Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Target value (No. of pulses)

Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] Acceleration time up to the max. speed 50kHz. Acceleration time range (ms) K1 to K32760 (Unit: ms) Deceleration time from the max. speed 50kHz. Deceleration time range (ms) K1 to K32760 (Unit: ms) Target value range K2,147,483,648 to K2,147,483,647

Note the following characteristics according to the specified initial speed.


(1) When the initial speed is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. If the frequency is higher than that, the speed error will be larger. (2) When the initial speed is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. (3) When the initial speed is 184 or higher, the control up to 50kHz can be performed. The speed error around 50kHz will be smallest.

Change of speed during pulse output


(1) If the target value is set to a value larger than 50kHz, it will be corrected to 50kHz. (2) If the elapsed value crosses over the acceleration forbidden area starting position during accelerating, acceleration cannot be performed. For information on the acceleration forbidden area starting position, refer to the special registers. (3) For deceleration, the speed cannot be lower than the deceleration minimum speed. For information on the deceleration minimum speed, refer to the special registers.

3 513
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Assignment of control code (Specify with H constant)


H 10: Fixed Control assignment 1: JOG positioning Control assignment 2 0: Type 0 Interrupt execution assignment 0: Execute in main program. 1: Execute in interrupt program. (The trigger is the level type.) Output assignment 0: Pulse output 1: Calculation only Operation mode assignment 0: Incremental Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF)

When the target value has been set to 0, it will stop when the position control starting input turns on. (Only V1.06 or later) For reversing the output when the target value has been set to 0, set the output type of control code to 4, 5, 6 instead of 0, 1, 2. *As for the output assignment When starting the instruction with th setting of 1: Calculation only, the pulse output is not performed. When starting the instruction with the assignment of the same channel and the same parameter after executing this instruction once for a channel, it can be started at high speed. (It is the same for the both cases of Pulse output and Calculation only.) However, if a parameter othern than the parameter used for the previous execution is specified, the highspeed startup cannot be performed. Note) The same parameter means that all the parameters other than the output assignment are the same.

Output type
Mode selection CW/CCW Target value
When positive When negative Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

When the target value has been set to 0, the output will be the forward mode when the output type is set to 0, 1, 2. For performing the reverse output, set the type to 4, 5, 6 instead of 0, 1, 2. (V1.06 or later) [Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.)

Sample program
R0 ( DF ) F1 DMV, H10100000, DT0 F1 DMV, K1000, DT2 F1 DMV, K7000, DT4 F1 DMV, K300, DT6 F1 DMV, K450, DT8 R1 R2 F1 DMV, H100000, DT10 ( DF ) ( DF ) F171 SPDH, DT0, K0 F0 MV H140, DT90052 F0 MV H100, DT90052 R2 R1 1kHz 300ms 7kHz Output pulse number 100,000 450ms Time Frequency

Position control starting input

3 514
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when each data of [S,S+1] to [S+4,S+5] is out of the specified range. Turns on when [S+2,S+3]>[S+4,S+5]. Turns on when [S+10,S+11] is out of the specified range. Turns on when the pulse output has not been set by the system register. Turns on when the interrupt execution has been specified for executing the instruction in the main program.

3 515
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F171(SPDH)

Pulse output (JOG positioning type 1)

Availability FP0R

Outputs the specified number of pulses changing the target speed again and performs the deceleration stop after the position control starting input during the pulse output. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST DF F171 DT K (SPDH) 100 0 R 10

R10

11

DF

F171 SPDH , DT100 , K 0 S n

12

S n

Starting 16bit area for registering data tables Channels intended for pulse output (n=0 to 3)

Operands
Operand n S (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register In (*1) N/A N/A N/A N/A N/A N/A SWR SDT Constant K N/A A H N/A A Index modifier A N/A

Description

A: Available N/A: Not Available

When the corresponding control flag is off and the trigger is on, pulses are output from the specified channels. The control code, initial speed, target speed 1, acceleration time, tarte speed 2 after poisition control starting input, change time, deceleration time and the target value is specified by creating data tables [S] to [S+15] using user progrmas. When accelerating, the frequency is changed in the acceleration time specified from the initial speed to the target speed. After the position control starting input turned on, the pulse output continues up to the target value, and then decelerates and stops. For using the position control staring input (X0, X1, X2, X3), set the system register 402. When decelerating, the frequency is changed in the deceleration time specified from the target speed. The positioning control can be also started by the control data (bit6) of DT90052. (e.g.) F0(MV) H140, DT90052 The deceleration stop can be requested by the control data (bit5) of DT90052. (e.g.) F0(MV) H120, DT90052 When using the same condition as the table used at the preveious startup, the operation can be started at high speed without calculation. Method of acceleration/deceleration and initial speed When the deceleration stop is requested during acceleration, deceleration is performed with the same slope of the deceleration time from the target speed. In this instruction, the operation is processed giving the acceleration/deceleration time priority. 3 516
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

The initial speed may be corrected to enable accelerating/decelerating within the specified time.
Frequency Target speed 2 Target speed 1 Initial speed Acceleratrion Flag Position control starting input Change time Time Deceleration time Target value

Note) Note that the position control starting input will be disregarded even if it is turned on during acceleration.

Precautions during programming


When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding control flag to the channel started is on. If rewriting during RUN is performed during pulse output, pulses more than the setting may be output. As for the position control starting input, only the rising edge (ON) is detected. The instruction cannot be started when the deceleration stop request flag is on. Note that the methods to stop the pulse output in this instruction are only any of the following operations: Turning on the position control starting input (position control starting flag), requesting the deceleration stop and executing an emergency stop. The target speed cannot be changed with this instruction. When the instruction is started during the interrupt program, specify the execution in the interrupt program with the control code.

Pules output channels and areas used


Channel No. Output Output type Position control starting input Pulse output instruction flag Elapsed value area Target value area

ch0 ch1 ch2 ch3

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

CW CCW CW CCW CW CCW CW CCW

PLS SIGN PLS SIGN PLS SIGN PLS SIGN

X0 DT90052 bit6 X1 DT90052 bit6 X2 DT90052 bit6 X3 DT90052 bit6

R9120 R9121 R9122 R9123

DT90400 DT90401 DT90410 DT90411 DT90420 DT90421 DT90430 DT90431

DT90402 DT90403 DT90412 DT90413 DT90422 DT90423 DT90432 DT90433

3 517
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Setting the data table


S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 S+12 S+13 S+14 S+15 Control code Initial speed (Hz) Target speed 1 (Hz) Acceleration time (ms) Target speed 2 (Hz) Change time (ms) Deceleration time (ms) Target value (No. of pulses)

Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] Acceleration/deceleration time range (ms) K1 to K32760 (Unit: ms) Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] K1 to K32760 (Unit: ms) K1 to K32760 (Unit: ms) Target value range K2,147,483,648 to K2,147,483,647

Note the following characteristics according to the specified initial speed.


(1) When the initial speed is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. If the frequency is higher than that, the speed error will be larger. (2) When the initial speed is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. (3) When the initial speed is 184 or higher, the control up to 50kHz can be performed. The speed error around 50kHz will be smallest.

3 518
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Assignment of control code (Specify with H constant)


H 10: Fixed Control assignment 1: JOG positioning Control assignment 2 1: Type 1

Interrupt execution assignment 0: Execute in main program. 1: Execute in interrupt program. (The trigger is the level type.)
Output assignment 0: Pulse output 1: Calculation only Operation mode assignment 0: Incremental Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF)

*As for the output assignment When starting the instruction with th setting of 1: Calculation only, the pulse output is not performed. When starting the instruction with the assignment of the same channel and the same parameter after executing this instruction once for a channel, it can be started at high speed. (It is the same for the both cases of Pulse output and Calculation only.) However, if a parameter othern than the parameter used for the previous execution is specified, the highspeed startup cannot be performed. Note) The same parameter means that all the parameters other than the output assignment are the same.

Output type
Incremental <Relative control>
The pulse specified for the target value are output. Mode selection CW/CCW Target value
When positive When negative Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

[Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.)

Sample program
R0 ( DF ) F1 DMV, H10110000, DT0 F1 DMV, K1000, DT2 F1 DMV, K7000, DT4 F1 DMV, K300, DT6 F1 DMV, K10000, DT8 F1 DMV, K150, DT10 F1 DMV, K450, DT12 F1 DMV, K100000, DT14 R1 R2 R1 ( DF ) ( DF ) F171 SPDH, DT0, K0 F0 MV H140, DT90052 F0 MV H140, DT90052 Position control starting input R2 7kHz 1kHz 300ms Output pulse number 100,000 450ms Time Frequency

150ms

3 519
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when each data of [S,S+1] to [S+4,S+5] is out of the specified range. Turns on when [S+8,S+9] is out of the specified range. Turns on when [S+2,S+3]>[S+4,S+5]. Turns on when [S+2,S+3]>[S+8,S+9]. Turns on when [S+14,S+15] is out of the specified range. Turns on when the pulse output has not been set by the system register.

3 520
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

F172 (PLSH)
Outline Program example

Pulse output (with channel specification) (JOG operation)

Availability FP/FPX

Outputs the pulses of the specified parameter from the specified channel for the pulse output.
Boolean Address 10 11 Instruction ST F172 DT K R 10 (PLSH) 10 0

Ladder Diagram

Trigger R10 F172 PLSH, DT 10, K 0 S


S n

10

Starting number for the area that contains the data table Channel that corresponds to the pulse output

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
For FP
Channel no. ch0 Output Y0 Y1 ch2 Y3 Y4 Output method CW CCW CW CCW PLS SIGN PLS SIGN

When the corresponding control flag is off and the execution condition is in the on state, pulses are output from the specified channel. The pulses are output while the execution condition is on. For FPX Ry type (AFPXPLS)
Channel no. ch0 Cassete mounting part 1 ch1 Cassete mounting part 2 Output Y100 Y101 Y200 Y201 Output method CW CCW CW CCW PLS SIGN PLS SIGN

3 521
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Output Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Output method CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz. By specifying either addition counting or subtraction counting in the control code, this instruction can be used as an instruction for JOG operations. Frequency can be changed in each scan, and the target value can be changed asynchronously. However, the control code cannot be changed during instruction execution. If a frequency of 50 kHz or higher is specified, a duty of 1/4 (25%) should be specified. If the frequency for ch2 or ch3 of FPX Tr type is set to 10kHz or more, specify a duty of 1/4 (25%).

Table of areas used


For FP Channel no. ch0 ch2 For FPX Ry type Channel no. ch0 ch1 Control flag R911C R911D Elapsed value DT90348, DT90349 DT90352, DT90353 Control flag R903A R903C Elapsed value DT90044, DT90045 DT90200, DT90201

Note) Ch1 cannot be used for C14R. For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Control flag R911C R911D R911E R911F Elapsed value area DT90348 DT90349 DT90352 DT90353 DT90356 DT90357 DT90360 DT90361 Target value area DT90350 DT90351 DT90354 DT90355 DT90358 DT90359 DT90362 DT90363

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz. 3 522
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Precautions during programming


During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. When using this instruction for FP, the setting for the channels corresponding to system registers no. 400 and no. 401 should be set to Highspeed counter not used. When using this instruction for FPX, set the pulse output by the system register. If a rewrite is executed during RUN while the system is operating, pulse output stops while the program is being rewritten. If the same notation is being used for both the ordinary program and the interrupt program, make sure they are not both executed at the same time. Target value setting can be used in FP V1.4 or more and FPX only. If a value outside of the specified range is written for the frequency area while the instruction is being executed, the frequency output will be adjusted to either to the minimum or the maximum. And when starting execution of the instruction, an operation error occurs. If the control code is changed after the instruction startup, it will be invalid. If the frequency is changed to a value outside the specification range after the instruction startup, an operation error will not occur and the program will run at the minimum or maximum value in the specification range.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on when: Turns on when: The control code or frequency is outside the specification range. (During instruction startup) The specified area is exceeded when an index is modified. The n is outside specification range. With the FPX, the pulse output has not been set by the system register.

3 523
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

Data table settings


Mode with no target value S S+1 S+2 S+3 Control code (*1) (*2) S S+1 S+2 S+3 S+4 S+5 Target value match stop mode Control code (*1) (*2) (*3)

Frequency

Frequency Target value

(*1): Control code specification (specify with an H constant)


H

0: Fixed Target value setting 0: Mode with no target value 1: Target value match stop mode
(Can be specified for only FP V1.4 or more and FPX.)

Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%) Frequency range 0: 1.5 Hz to 9.8 kHz 1: 48 Hz to 100 kHz 2: 191 Hz to 100 kHz Output method 00: No counting 01: No counting 10: Addition counting 12: Addition counting 13: Addition counting 21: Subtraction counting 22: Subtraction counting 23: Subtraction counting CW CCW CW Directional output off Directional output on CCW Directional output off Directional output on

(*2): Frequency (Hz) K constant Frequency range 0: 1.5 Hz to 9.8 kHz [K1 to K9800 (units: Hz)] (Max. error near 9.8 kHz: approx. 0.9 kHz) * Set 1 to specify 1.5 Hz. 1: 48 Hz to 100 kHz [K48 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 3 kHz) 2: 191 Hz to 100 kHz [K191 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 0.8 kHz) For counting method, set the initial instruction execution frequency to 30 kHz or lower. (*3): Target value (Absolute value) (FP V1.4 or more and FPX only) This is used when setting the target value match stop mode.(Absolute only) Designate the target value setting in the range indicated below. If an out of range value is designated, the number of pulses output will be different than the designated value. The target value setting is ignored in the no count mode. Output method
Addition counting Subtraction counting

Range of target values which can be designated


Designate a value larger than the current value Designate a value smaller than the current value

3 524
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

F172(PLSH)

Double word compare: Start equalPulse output (JOG operation type 0 and 1)

Availability FP0R

Performs the pulse output from the specified pulse output channels according to the specified parameters. [Feature] Acceleration time and deceleration time can be set individually. The deceleratio stop is also available. The target speed can be changed. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST F172 DT K R 10 (PLSH) 10 0

R10

DF

F172 PLSH ,

DT10 , S

K0 n

11

S n

Starting 16bit area for registering data tables Channels intended for pulse output (n=0 to 3)

Operands
Operand n S (*1) I0 to ID Relay WX WY WR WR N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register In (*1) N/A N/A N/A N/A N/A N/A SWR SDT Constant K N/A A H N/A A Index modifier A N/A

Description

A: Available N/A: Not Available

When the corresponding pulse output instruction flag is off and the trigger is on, pulses are output from the specified channels. With the JOG operation type , the control code, initial speed, target speed, acceleration time and deceleration time is specified by creating data tables [S] to [S+9] using user programs. With the JOG operation type 1 (with target values), the target value is specified in a range of [S+10] to [S+11] as well as the above items. When accelerating, the frequency is changed in the acceleration time specified from the initial speed to the target speed. When the trigger is turned off after starting the instruction, the deceleration stop is performed. When decelerating, the frequency is changed from the target speed in the specified deceleration time. When the trigger is turned on during deceleration, acceleration is performed again from deceleration.
Frequency
Target speed after change Target speed at the time of start

Time
Pulse output instruction flag Trigger

3 525
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Precautions during programming


When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding pulse output instruction flag to the channel started is on. If rewriting during RUN is perofrmed during the pulse output, the pulse output stops during the program is being rewritten. It is not effecitve if the control code is changed after starting the instruction. It has no effect on the operation.

Pules output channels and areas used


Channel No. Output Output type Pulse output instruction flag Elapsed value area Target value area Correction speed of initial speed Deceleration minimum speed Acceleration forbidden area starting position

ch0 ch1 ch2 ch3

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

CW CCW CW CCW CW CCW CW CCW

PLS SIGN PLS SIGN PLS SIGN PLS SIGN

R9120 R9121 R9122 R9123

DT90400 DT90401 DT90410 DT90411 DT90420 DT90421 DT90430 DT90431

DT90402 DT90403 DT90412 DT90413 DT90422 DT90423 DT90432 DT90433

DT90406 DT90416 DT90426 DT90436

DT90407 DT90417 DT90427 DT90437

DT90408 DT90409 DT90418 DT90419 DT90428 DT90429 DT90438 DT90439

Setting the data table


S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 Control code Initial speed (Hz) Target speed 1 (Hz) Acceleration time (ms) Deceleration time (ms) Target value Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] Acceleration time up to the max. speed 50kHz. Acceleration time range (ms) K1 to K32760 (Unit: ms) Deceleration time from the max. speed 50kHz. Deceleration time range (ms) K1 to K32760 (Unit: ms) Target value range Note: Available for JOG type 1 (with target values) only. K2,147,483,648 to K2,147,483,647 Available for JOG type 1 only

Note the following characteristics according to the specified initial speed.


(1) When the initial speed is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. If the frequency is higher than that, the speed error will be larger. (2) When the initial speed is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. (3) When the initial speed is 184 or higher, the control up to 50kHz can be performed. The speed error around 50kHz will be smallest.

Change of speed during pulse output


(1) With the type 0, if a value larger than the target speed at startup is specified, it will be corrected to the target speed at startup. With the type 1, if the target value is set to a value larger than 50kHz, it will be corrected to 50kHz. (2) If the elapsed value crosses over the acceleration forbidden area starting position during accelerating, acceleration cannot be performed. For information on the acceleration forbidden area starting position, refer to the special registers. 3 526
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

(3) For deceleration, the speed cannot be lower than the deceleration minimum speed. For information on the deceleration minimum speed, refer to the special registers.

Assignment of control code (Specify with H constant)


H 10: Fixed Control assignment 0: JOG Control assignment 2 0: Type 0 (Without target values) 1: Type 1 (With target values) 0: Fixed Output assignment 0: Pulse output 1: Calculation only Movement direction Type 0 (Without target values) 0: Forward 1: Reverse Type 1 (With target values) 0: Incremental 1: Absolute Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF)

*As for the output assignment When starting the instruction with th setting of 1: Calculation only, the pulse output is not performed. When starting the instruction with the assignment of the same channel and the same parameter after executing this instruction once for a channel, it can be started at high speed. (It is the same for the both cases of Pulse output and Calculation only.) However, if a parameter othern than the parameter used for the previous execution is specified, the highspeed startup cannot be performed. Note) The same parameter means that all the parameters other than the output assignment are the same.

Output type 0 (without target values)


Mode selection CW/CCW Operation mode
Forward Reverse Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

Output type 1 (with target values)


Incremental <Relative control>
The pulses specified for the target value are output. Mode selection CW/CCW Target value
When positive When negative Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

3 527
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Absolute <Absolute value control>


The pulse that is the difference between the specified target value and the current value is output. Mode selection CW/CCW Target value
When target value is larger than current value When target value is smaller than current value Output from CW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

Addition

Output from CCW

Subtraction

[Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.)

Method of acceleration/deceleration and initial speed


When the deceleration stop is requested during acceleration, deceleration is performed with the same slope of the deceleration time from the target speed. In this instruction, the operation is processed giving the acceleration/deceleration time priority. The initial speed may be corrected to enable accelerating/decelerating within the specified time.

Sample program
50kHz

25kHz

R0

F1 DMV, H10000000, DT0 F1 DMV, K1000, DT2 F1 DMV, K25000, DT4 F1 DMV, K300, DT6 F1 DMV, K450, DT8

1kHz 150ms 300ms 225ms 450ms

R1

Pulse output instruction flag Flag

F172 PLSH, DT0, K0

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the control code or frequency is out of the settable range (when the instruction is started). Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when the pulse output of the specified channel is not set by the system register.

3 528
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

F173(PWMH)
Outline Program example

PWM output (with channel specification)

Availability FP/FPX/FP0R

Outputs the PWM of the specified parameter from the specified channel for the PWM output.
Boolean Address 10 11 Instruction ST F173 DT K R 10 20 0

Ladder Diagram

Trigger R10 F173 PWMH, DT 20, K 0 S


S n

(PWMH)

10

Starting number for the area that contains the data table Channel targeted by the PWM output

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description

When the corresponding control flag is off and the execution condition is in the on state, a PWM is output from the specified channel for the PWM output. The PWM is output while the execution condition is on. The data table shown at below, indicating the frequency and duty, is created and the values are specified by the user program. The duty, particularly when it is close to the minimum or maximum value, may be off from the specified ratio, depending on the load voltage and load current. The duty can be changed for each separate scan. Control codes, however, cannot be changed while an instruction is being executed.

Table of areas used


For FP Channel no. ch0 ch2 Output Y0 Y3 Control flag R903A R903C

3 529
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

For FPX Ry type (AFPXPLS) Channel no.


ch0 Cassete mounting part 1

Output Y100

Control flag R911C

ch1
Cassete mounting part 2

Y200

R911D

For FPX Tr
Channel no. ch0 ch1 ch2 ch3 Output Y0 Y2 Y4 Y6 Control flag R911C R911D R911E R911F

Note) There is no ch3 for FPXC14T. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz. For FP0R
Channel no. ch0 ch1 ch2 ch3 Output Y0 Y2 Y4 Y6 Pulse I/O instruction flag R9120 R9121 R9122 R9123

Precautions during programming


During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. When using this instruction for FP, the setting for the channels corresponding to system registers no. 400 and no. 401 should be set to Highspeed counter not used. When using this instruction for FPX, set the PWM output by the system register. If a rewrite is executed during RUN while the system is operating, pulse output stops while the program is being rewritten. If the same notation is being used for both the ordinary program and the interrupt program, make sure they are not both executed at the same time. If a value over the specified range is written for the duty area while the instruction is being executed, the duty output will be adjusted to the maximum. And when starting execution of the instruction, an operation error occurs. If the control code is changed after the instruction startup, it does not affect the frequency but the resolution of the duty. If the frequency is changed to a value outside the specification range after the instruction startup, an operation error will not occur and the program will run with the duty of 100 resolution. If the duty is changed to 100% or higher after the instruction startup, an operation error will not occur and the program will run at the maximum value of the specified resolution.

3 530
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified area is exceeded when an index is modified. The n is any value other than 0 or 2. The control code is outside specification range. (During instruction startup) The duty is higher than 100%. (During instruction startup) With the FPX, the PWM output has not been set by the system register.

Data table settings


S S+1 Control code (*1) (*2)

Duty

(*1): Control code specification (specify using K constant) For FP and FPX Resolution of 1000 K K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 K13 K14 K15 K16 K17 K18 K19 Frequency (Hz) 1.5 2.0 4.1 6.1 8.1 9.8 19.5 48.8 97.7 201.6 403.2 500.0 694.4 1.0 k 1.3 k 1.6 k 2.1 k 3.1 k 6.3 k 12.5 k Timing (ms) 666.67 502.51 245.70 163.93 122.85 102.35 51.20 20.48 10.24 4.96 2.48 2.00 1.44 0.96 0.80 0.64 0.48 0.32 0.16 0.08 Resolution of 100 K K20 K21 K22 K23 K24 Frequency (Hz) 15.6 k 20.8 k 25.0 k 31.3 k 41.7 k Timing (ms) 0.06 0.05 0.04 0.03 0.02

Note: When using ch2 or ch3 on FPX Tr type, use the control codes up to K20. (*2): Specification of duty (specify using K constant) If the control code is K0 to K19, the duty is K0 to K999 (0.0% to 99.9%). If the control code is K20 to K24, the duty is K0 to K99 (0% to 99%). Set values are specified in units of 1% (K10) (digits below the decimal point are rounded off). 3 531
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

For FP0R K K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 K13 K14 K15 K16 K17 K18 Other than the above Frequency (Hz) 6 7.5 12.5 25 50 100 200 400 600 800 1000 1200 1600 2000 3000 4800 Period (ms) 166.67 133.33 80.00 40.00 20.00 10.00 5.00 2.50 1.67 1.25 1.00 0.83 0.63 0.50 0.33 0.21

Cannot be specified

3 532
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

F174(SP0H)

Pulse output (with channel specification) (Selectable data table control operation)

Availability FP/FPX

Outputs the pulses from the specified channel for the pulse output according to the specified data table. Program example Outline
Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F174 DT K (SP0H) 100 0 R 10

Trigger 10 R10 DF

F174 SP0H , DT100 , K 0 S n

S n

Starting address of area containing the data table. Channel for pulse output.

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding control flag is off and the execution condition is in the on state, pulses are output from the specified channel (ch0 or ch2) based on the contents set for the data table in which the first address is that specified by S. For FP
Channel no. ch0 Output Y0 Y1 ch2 Y3 Y4 Output method CW CCW CW CCW PLS SIGN PLS SIGN

For FPX Ry type (AFPXPLS)


Channel no. ch0 Cassete mounting part 1 ch1 Cassete mounting part 2 Output Y100 Y101 Y200 Y201 Output method CW CCW CW CCW PLS SIGN PLS SIGN

3 533
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Output Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Output method CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz. When the elapsed value of the highspeed counter reaches the target value specified in the data table, the pulse frequency is switched (interrupt processing is carried out). When the elapsed value agrees with the last target value, the pulse output operation finishes. Use the F0 (MV) instruction to control the highspeed counter to force the pulse output control to stop. If the frequency is set to 50 kHz or more, specify a duty of 1/4 (25%). If the frequency for ch2 or ch3 of FPX Tr type is set to 10kHz or more, specify a duty of 1/4 (25%).

Table of areas used


For FP
Channel no. ch0 ch2 Control flag R903A R903C Elapsed value area DT90044, DT90045 DT90200, DT90201 Target value area DT90046, DT90047 DT90202, DT90203

For FPX Ry type


Channel no. ch0 ch1 Control flag R911C R911D Elapsed value area DT90348, DT90349 DT90352, DT90353 Target value area DT90350, DT90351 DT90354, DT90355

For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Control flag R911C R911D R911E R911F Elapsed value area DT90348 DT90349 DT90352 DT90353 DT90356 DT90357 DT90360 DT90361 Target value area DT90350 DT90351 DT90354 DT90355 DT90358 DT90359 DT90362 DT90363

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz.

3 534
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Precautions during programming


The highspeed counter control flag R903A (R903C) is on from the time that the execution condition for the F174 (SP0H) instruction has gone on until the pulse output stops. During the time that the highspeed counter control flag R903A (R903C) is on, the highspeed counter and pulse output instructions F166 to F176, which use the same control flag, cannot be executed. During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. An operation error occurs if a value that is not within the allowable range is specified for the control code or for frequency 1. (If the data for frequency 1 is 0, the operation is terminated without anything being executed.) Pulse output is stopped if the frequency of the second or a subsequent stage is specified as 0 or as a value outside the allowable range. If the table pointer exceeds the data register DT area during pulse output, pulse output control stops and the highspeed counter control flag R903A (R903C) goes off. Always make sure that the target values are specified within the ranges indicated on the following page. If a value outside the allowable range is specified, the number of pulses output will be different from the specified value. If a periodic interrupt or highspeed counter value interrupt program is run, or the PLC link function is used at the same time, a frequency of 80 kHz or less should be used. Note: With FPX, refer to the table of areas used for the internal relay equivalent to R903A (R903C). When using this instruction for FPX, set the pulse output by the system register.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is other than 0 or 2. The control code or frequency 1 is outside setting range. With the FPX, the pulse output has not been set by the system register.

3 535
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

Setting the data tabler


[S] Control code Frequency 1 Target value 1 (Number of pulses) Frequency 2 Target value 2 (Number of pulses) (*1) (*2) (*3)

[S+2] [S+4] [S+6] [S+8]

[S+2n] [S+2(n+1)] [S+2(n+2)]

Frequency n Target value n (Number of pulses)

K0

End of table (Pulse output stops.)

(*1): Specification of control code H constant Upper word 0: Fixed Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%)
H

Frequency range 0: 1.5 Hz to 9.8 kHz 1: 48 Hz to 100 kHz 2: 191 Hz to 100 kHz Operation mode 0: Incremental Specifies the amount of travel (number of pulses) 1: Absolute Specifies the target value (absolute value) Output method 0: CW (addition counting) 1: CCW (subtraction counting) 2: PLS+SIGN (forward off) (addition counting) 3: PLS+SIGN (reverse on) (subtraction counting) 4: PLS+SIGN (forward on) (addition counting) 5: PLS+SIGN (reverse off) (subtraction counting) (*2): Frequency (Hz) K constant Frequency range 0: 1.5 Hz to 9.8 kHz [K1 to K9800 (units: Hz)] (Max. error near 9.8 kHz: approx. 0.9 kHz) * Set 1 to specify 1.5 Hz. 1: 48 Hz to 100 kHz [K48 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 3 kHz) 2: 191 Hz to 100 kHz [K191 to K100000 (units: Hz)] (Max. error near 100 kHz: approx. 0.8 kHz) Initial speed: Set Frequency 1 to 30 kHz or less. (*3): Target value (K2147483648 to K2147483647) The value of the 32bit data specified for the target value should be within the range indicated in the table below.
Specification of control code Operation mode Output method Incremental Addition counting Subtraction counting Absolute Addition counting Subtraction counting

Range of allowable target values


Specifies a positive value. Specifies a negative value. Specifies a value larger than the current value Specifies a value smaller than the current value

3 536
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

Program example [Operation content]


1. 2. 3. 4. 5. Pulse output from the specified channel ch0 begins at 1,000 Hz when the F174 (SP0H) instruction execution condition (trigger) R10 goes on. At the point when 1,000 pulses have been counted at a frequency of 1,000 Hz, the frequency switches to 2,500 Hz. At the point when 3,000 pulses have been counted at a frequency of 2,500 Hz, the frequency switches to 5,000 Hz. At the point when 8,000 pulses have been counted at a frequency of 5,000 Hz, the frequency switches to 1,000 Hz. At the point when 10,000 pulses have been counted, pulse output stops.

Frequency (speed) [Hz] 5,000 2,500 1,000 01000 3000 Trigger R10 R903A (R903C) 8000 10000

Elapsed value of highspeed counter (Amount of travel)

When the execution condition (trigger) R10 of the F174 (SP0H) instruction goes on, the highspeed counter control flag R903A (R903C) goes on. When the elapsed value reaches 10,000 and pulse output stops, R903A (R903C) goes off. Note: With FPX, refer to the table of areas used for the internal relay equivalent to R903A (R903C). [Settings and program] The frequency range is from 191 Hz to 100 kHz, the duty 1/4 (25%), the operation mode is Incremental, and the output method is CW.
R0 F1 DMV , H 1200, DT100 F1 DMV , K 1000, DT102 F1 DMV , K 1000, DT104 F1 DMV , K 2500, DT106 F1 DMV , K 2000, DT108 F1 DMV , K 5000, DT110 F1 DMV , K 5000, DT112 F1 DMV , K 1000, DT114 F1 DMV , K 2000, DT116 R10 F1 DMV , K DF 0, DT118
Control code: H1200 Frequency 1: 1,000Hz Target value 1: 1,000 pulses Frequency 2: 2,500Hz Target value 2: 2,000 pulses Frequency 3: 5,000Hz Target value 3: 5,000 pulses Frequency 4: 1,000Hz Target value 4: 2,000 pulses Output pulse stops Pulse output control

F174 SP0H,DT100,K0

3 537
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F174(SP0H)

Pulse output (Arbitrary data table control operation)

Availability FP0R

Outputs pulses from the specified pulse output channels according to the specified data table. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST DF F174 DT K (SP0H) 100 0 R 10

R10

11

DF

F174 SP0H , DT100 , K 0 S n

12

S n

Starting 16bit area for registering data tables Channels intended for pulse output (n=0 to 3)

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A EV N/A N/A Register DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding pulse output instruction flag is off and the trigger is on, pulses are output from the specified channels according to the conditions specified in the data table which starts with the address specified by [S]. If the elapsed value of the pulse output reaches the target value specified in the data table, the pulse frequency is changed (by the inerrupt operation). When the elapsed value reaches the final target value, the pulse output stops. Image of operation
Frequency (speed) [Hz] 5000 2500 1000 Flag R10 Pulse output instruction flag R9120 0 1000 3000 8000 Highspeed couonter Elapsed value 10000 (Moving distance)

3 538
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Pules output channels and areas used


Channel No. Output Output type Pulse output instruction flag Elapsed value area Target value area

ch0 ch1 ch2 ch3

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

CW CCW CW CCW CW CCW CW CCW

PLS SIGN PLS SIGN PLS SIGN PLS SIGN

R9120 R9121 R9122 R9123

DT90400 DT90401 DT90410 DT90411 DT90420 DT90421 DT90430 DT90431

DT90402 DT90403 DT90412 DT90413 DT90422 DT90423 DT90432 DT90433

Setting the data table


S S+1 S+2 S+3 S+4 S+5 S+2 S+3 S+4 S+5 Control code *1 Frequency 1 (Hz) *2 Target value 1 (No. of pulses) *3 Frequency 2 (Hz) Target value 2 (No. of pulses)

S+2n S+2n+1 S+2(n+1) S+2(n+1)+1 S+2(n+2) S+2(n+2)+1

Frequency n (Hz) Targe value n (No. of pulses) K0: fixed: Table end

Note: If the frequency n is set to a value larger than 50kHz, it will be corrected to 50kHz.

Note the following characteristics applied according to the value of frequency 1.


(1) When the frequency 1 is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. If the frequency n is set to a value below 6Hz, it will be corrected to 6Hz. (2) When the frequency 1 is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. If the frequency n is set to a value below 46Hz, it will be corrected to 46Hz. (3) When the frequency 1 is 184 or higher, the control up to 50kHz can be performed. If the frequency n is set to a value below 184Hz, it will be corrected to 184Hz.

3 539
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

*1: Assignment of control code (Specify with H constant)


H 10: Fixed Control assignment 0: Arbitrary table control 000: Fixed Operation mode assignment 0: Incremental 1: Absolute Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 1: PLS+SIGN (Forward ON/Reverse OFF)

*2: Velocity range (Frequency) (Hz) <K constant> 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] *3: Target value range (ms) <K constant> K2,147,483,648 to K2,147,483,647 32bit data value specified for the target value should be within the following range. Assignment of control code Operation mode Output type
Incremental Absolute Count: Addition Count: Subtraction Count: Addition Count: Subtraction

Range of settable target values


Spcify a positive value. Specify a negative value. Specify a value larger than the current value. Specify a value smaller than the current value.

Sample program
Description of operation
(1) When the trigger R10 in F174 (SP0H) instruction is on, the pulses are output at 1000 Hz from the specified channel. (2) When 1000 pulses are counted at 1000Hz, the frequency changes to 2500Hz. (3) When 3000 pulses are counted at 2500Hz, the frequency changes to 5000Hz. (4) When 8000 pulses are counted at 5000Hz, the frequency changes to 1000Hz. (5) When 1000 pulses are counted, the pulse output stops.
Frequench (speed) 5000 2500 1000 0 Flag R10 Pulse output instruction flag R9120 1000 3000 8000

10000 (Moving distance)

Highspeed couonter Elapsed value

Note) When the trigger R10 in F174(SP0H) instruction turns on, the pulse output instruction flag will be on. Once the pulse output stops when the elpased value reached 10000, the highspeed counter control flag will be off. 3 540
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Setting and program


Control assignment: Arbitrary table control, operation mode: Incremental, the output type is CW/CCW.
R0 F1 DMV,H F1 DMV, K F1 DMV, K F1 DMV, K F1 DMV, K F1 DMV, K F1 DMV, K F1 DMV, K F1 DMV, K R10 F1 DMV, K ( DF ) 10000000,DT100 1000, DT102 1000, DT104 2500, DT106 3000, DT108 5000, DT110 5000, DT112 1000, DT114 2000, DT116 0, DT118

Control code: H10000000 Frequency 1: 1000 Hz Target value 1: 1000 pulses Frequency 2: 2500 Hz Target value 2: 3000 pulses Frequency 3: 5000 Hz Target value 3: 5000 pulses Frequency 4: 1000 Hz Target value 4: 2000 pulses Stop of pulse output Start of pulse output

F174 SP0H, DT100, K0

Precautions during programming


The pulse output instruction flag is on until the pulse output stops after turning on the trigger in F174(SP0H) instruction. When the frequency 1 is out the settable range, the operation error occurs. (If the data of the frequency 1 is 0, the operation ends without processing anything.) When the second frequency or later is 0 or out of the specified range, the pulse output stops. When the direction is reversed by execuitng the instruction with the specified target value, the pulse output stops. Do not execute this instruction in the normal program and the interrupt program at the same time. When the table point exceeds the data register (DT) area during the pulse output, the pulse output stops and the highspeed counter control flag turns off. The traget value must be specified within the range. If an outlying value is specified, the number of pulses that is different from the specified condition is output.

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when the control code or frequency 1 is out of the specified range.

3 541
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

F175(SPSH)

Pulse output (Linear interpolation)

Availability FP C32T2, C32T2H C28P2, C28P2H/FPX

Pulses are output from channel for 2 pulse output, in accordance with the parameters in the designated data table, so that the path to the target position forms a straight line. Program example Outline
Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F175 DT K (SPSH) 100 0 R 10

Trigger 10 R10 DF

F175 SPSH , DT100 , K 0 S n

S n

Starting address of area containing the data table. 0: Fixed (FP, FPX Ry type) 0 or 2 (FPX Tr type)

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
Pulses are output from channel ch0 (Xaxis) and ch2 (Yaxis) (FPX: ch1) when the corresponding control flag is off and the execution conditions are on. For FP
Channel no. ch0 (for Xaxis) Output Y0 Y1 ch2 (for Yaxis) Y3 Y4 Output method CW CCW CW CCW PLS SIGN PLS SIGN

For FPX Ry type (AFPXPLS)


Channel no. ch0 (for Xaxis) Cassete mounting part 1 ch1 (for Yaxis) Cassete mounting part 2 Output Y100 Y101 Y200 Y201 Output method CW CCW CW CCW PLS SIGN PLS SIGN

For FPX Tr type


Channel no. ch0 (for Xaxis) ( ) ch1 (for Yaxis) ( ) ch2 (for Xaxis) ( ) ch3 (for Yaxis) ( ) Output Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Output method CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN

Note) For the FPX Tr type, the combinations of ch0 (X axis) and ch1 (Y axis), and ch2 (X axis) and ch3 (Y axis) can be used. Note) As there is no ch3 for C14T and C14TD, only the combination of ch0 and ch1 can execute the linear interpolation.

3 542
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX

Highlevel Instructions

The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are specified by creating the data table S to S+11 on the following page using the user program. If the frequency is set to 40 kHz or more, specify a duty of 1/4 (25%). If the frequency for ch2 or ch3 of FPX Tr type is set to 10kHz or more, specify a duty of 1/4 (25%).

Table of areas used


For FP
Channel no. ch0 ch2 Control flag R903A R903C Elapsed value area DT90044, DT90045 DT90200, DT90201 Target value area DT90046, DT90047 DT90202, DT90203

For FPX Ry type


Channel no. ch0 ch1 Control flag R911C R911D Elapsed value area DT90348, DT90349 DT90352, DT90353 Target value area DT90350, DT90351 DT90354, DT90355

For FPX Tr type


Channel no. ch0 ch1 ch2 ch3 Control flag R911C R911D R911E R911F Elapsed value area DT90348 DT90349 DT90352 DT90353 DT90356 DT90357 DT90360 DT90361 Target value area DT90350 DT90351 DT90354 DT90355 DT90358 DT90359 DT90362 DT90363

Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPXPLS) cannot be installed on the FPX Tr type. Note) Use the ch2 and ch3 at up to 20 kHz.

3 543
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX

Precautions during programming


Designate settings for the target value and movement distance so they are within the following range. 8,388,608 to +8,388,607 When using in combination with other positioning instructions like F171, designate so the target value is within the above range, even in those instructions. When using in application requiring precision, check with the actual machine. If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. When using this instruction for FP, set the channels corresponding to system registers 400 and 401 to Not set as highspeed counter. If you perform a rewrite during RUN when pulse output is taking place, more pulses than the setting may be output. When using this instruction for FPX, set the pulse output by the system register.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is other than 0. The data S, S+1 to S+10, S+11 of data table are outside specification range. The composite speed designation satisfies: Initial speed S+2, S+3 > Maximum speed S+4, S+5 The composite speed designation satisfies: Maximum speed S+4, S+5 > 100kHz The composite speed designation satisfies: Maximum speed S+4, S+5 > 20kHz when outputting ch2 or ch3 with FPX Tr type. Incremental mode is designated and the value of current value + movement distance is outside the range 8388608 to +8388607. Absolute mode is designated and the target value is outside the range 8388608 to +8388607. With the FPX, the pulse output has not been set by the system register.

3 544
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP C32T2/FPX

Highlevel Instructions

Setting the data table


[S] [S+2] [S+4] [S+6] [S+8] [S+10] [S+12] [S+14] [S+16] [S+18] [S+20] [S+21] [S+22] [S+23] Control code Composite speed Initial speed Fmin(Hz) Composite speed Maximum speed Fmax(Hz) Acceleration/Deceleration time T (ms) Xaxis (CH0) Target value (Movement distance) Yaxis (FP: CH2, FPX: CH1) Target value (Movement distance) Xaxis (CH0) component speed Initial speed Fxmin Xaxis (CH0) component speed Maximum speed Fxmax Yaxis (FP: CH2, FPX: CH1) component speed Initial speed Fymin Yaxis (FP: CH2, FPX: CH1) component speed Maximum speed Fymax Xaxis (CH0) frequency range Yaxis (FP: CH2, FPX: CH1) frequency range Xaxis (CH0) number of acceleration/deceleration steps Yaxis (FP: CH2, FPX: CH1) number of acceleration/deceleration steps (*6) (*7) (*7) (*5) (*1) (*2) (*2) (*3) (*4) (*4)

Setting area S tti Designated with user program

Operation result storage area Parameters for each axis component, i t calculated due to instruction execution, are stored here.

(*1): Specification of control code (specify with H constant)


H

S+1

0: Fixed Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%) 0: Fixed Operation mode and output method 00: Incremental CW/CCW 02: Incremental PLS + SIGN (forward off / reverse on) 03: Incremental PLS + SIGN (forward on / reverse off) 10: Absolute CW/CCW 12: Absolute PLS + SIGN (forward off / reverse on) 13: Absolute PLS + SIGN (forward on / reverse off) (*2): Composite speed (Initial speed, Maximum speed) (Hz) <K constant> 1.5Hz to 100kHz [K1 to K100000] However, 1.5Hz is for an angle of 0deg or 90deg only. Also, specify K1 when specifying 1.5 Hz. If the component speed drops lower than the minimum speed for each frequency range, then the speed will become the corrected component speed, so be careful. (See *6) When simultaneously using a highspeed counter, periodical interrupt or PLC link, do not set to 60kHz or higher. If initial speed is set equal to maximum speed, pulses will be output with no acceleration/deceleration. Set the composite speed so that component speed of each axis is 1.5 Hz or greater. Composite speed (initial speed): 30 kHz or lower

3 545
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP C32T2/FPX

Note: Cautions regarding specification of composite speed (initial speed) The trajectory might not be linear if the initial composite speeds for CH0 and CH2 are not 1.5 Hz or higher in the formula below (when the formula below cant be worked out). 1.5 (x2+y2) f x x: Short CH of distance between target and current value y: Long CH of distance between target and current value When using ch2, ch3 of FPX Tr type, 1.5Hz to 20kHz [K1 to K20000] (*3): Acceleration/deceleration time (ms) K constant K0 to K32767 If this is 0, pulses will be output for the initial speed (composite speed) as is, with no acceleration/deceleration. (*4): Target value K8388608 to K8388607 When operating only one axis, a) In incremental mode, set the target value for the axis which will not be operated to 0. b) In absolute mode, set the target value for the axis which will not be operated the same as the current value. Note: Infinite feed is not possible during linear interpolation. (*5): Component speed (Initial speed and maximum speed of each axis) This is stored as 2 words in real numbers type.
Xaxis component speed = (Composite speed) x (Xaxis movement distance) (( Xaxis movement distance)2 + ( Yaxis movement distance)2) (Composite speed) x (Yaxis movement distance) (( Xaxis movement distance)2 + ( Yaxis movement distance)2)

Yaxis component speed =

Example: Even if the initial speed is corrected (See *6), the calculation value will be stored as is in the operation result storage area. (*6): Frequency range The system automatically selects the frequency range for each component of each axis. Range 0: 1.5Hz to 9.8kHz Range 1: 48Hz to 100kHz Range 2: 191Hz to 100kHz 9800Hz a) If maximum speed If initial speed < 1.5Hz, initial speed is corrected to 1.5Hz, and range 0 is selected. 1.5Hz, range 0 is selected. If initial speed b) If 9800Hz < maximum speed 100000Hz, If initial speed < 48Hz, initial speed is corrected to 48Hz, and range 0 is selected. initial speed < 191Hz, range 1 is selected. If 48Hz If initial speed 191Hz, range 2 is selected. (*7): Number of acceleration/deceleration steps The system automatically calculates the number of acceleration/deceleration steps in the range 0 to 60 steps. If the operation result is 0, pulses are output for the initial speed (composite speed) as is, with no acceleration/deceleration. The number of acceleration/deceleration steps is found using the formula: acceleration/deceleration time (ms) x component initial speed (Hz).

3 546
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP C32T2/FPX

Highlevel Instructions

Example: With incremental, initial speed 300Hz, maximum speed 5kHz, acceleration/deceleration time 0.5s, CH0 target value 1000, CH2 target value 50 300 1000 = 299.626Hz CH0 component initial speed = (10002 + 502) CH2 component initial speed = 300 50 (10002 + 502) = 14.981Hz 147.8 60 steps 7.4 7 steps

CH0 number of acceleration/deceleration steps = 500 103 299.626 CH2 number of acceleration/deceleration steps = 500 103 14.981 Note: With FPX, CH2 is CH1.

3 547
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

F175(SPSH)

Pulse output (Linear interpolation)

Availability FP0R

Pulses area output from channel for 2 pulse output, in accordance with the parameters in the designated data table, so that the path to the target position forms a straight line. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST DF F175 DT K (SPSH) 100 0 R 10

10

R10

11

DF

F175 SPSH , DT100 , K 0 S n

12

S n

Starting 16bit area for registering data tables Channels intended for pulse output (n=0 to 3)

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding pulse output instruction flag is off and the trigger is on, pulses are output from channel ch0 (Xaxis) and ch2 (Yaxis), or ch3 (X axis) and ch4 (Y axis).
Channel no. ch0 (for Xaxis) ( ) ch2 (for Yaxis) ( ) ch3 (for Xaxis) ( ) ch4 (for Yaxis) ( ) Output Y0 Y1 Y3 Y4 Y5 Y6 Y7 Y8 Output method CW CCW CW CCW CW CCW CW CCW PLS SIGN PLS SIGN PLS SIGN PLS SIGN

The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are specified by creating the data table S to S+11 on the following page using the user program. When the elapsed value reaches the final target value, the pulse output stops.

3 548
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Table of areas used


FP0R
Pulse output channel No. Pulse output instruction flag Elapsed value area Target value area Target value area for match ON/OFF Correction speed of initial speed

ch0 ch1 ch2 ch3

R9120 R9121 R9122 R9123

DT90400 to DT90401 DT90410 to DT90411 DT90420 to DT90421 DT90430 to DT90431

DT90402 to DT90403 DT90412 to DT90413 DT90422 to DT90423 DT90432 to DT90433

DT90404 to DT90405 DT90414 to DT90415 DT90424 to DT90425 DT90434 to DT90435

DT90406 DT90416 DT90426 DT90436

Precautions during programming


Designate settings for the target value and movement distance so they are within the following range. K8,388,608 to +8,388,607 When using in combination with other positioning instructions like F171, designate so the target value is within the above range, even in those instructions. When using in application requiring precision, check with the actual machine. If both the regular program and the inerrupt program contain code for the same channel, make sure both are not executed simultaneously.

Setting of data table


The linear interpolation can be performed with either combination of (CH0 and CH1) or (CH2 and CH3). The acceleration time and deceleration time can be specified individually.
S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 S+12 S+13 S+14 S+15 S+16 S+17 S+18 S+19 S 19 S+20 S+21 Control code Composite speed: Initial speed (Hz) Composite speed: Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Xaxis target value Yaxis target value Xaxis component speed: Initial speed (Hz) Xaxis component speed: Target speed (Hz) Y axis Yaxis component speed: Initial speed (Hz) Yaxis component speed: Target speed (Hz) Operation result storage area (*5) Parameters for each axis component, component calculated due to instruction execution, are stored here execution here. (*1) (*2) (*2) (*3) (*3) (*4) (*4) Setting area Designated with user program D i t d ith

3 549
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

*1: Assignment of control code (Specify with H constant)


H 10: Fixed Control assignment 0: Interpolation Type 0: Linear interpolation 0: Fixed Output assignment 0: Pulse output 1: Calculation only Operation mode assignment 0: Incremental 1: Absolute Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF)

*As for the output assignment When starting the instruction with th setting of 1: Calculation only, the pulse output is not performed. When starting the instruction with the assignment of the same channel and the same parameter after executing this instruction once for a channel, it can be started at high speed. (It is the same for the both cases of Pulse output and Calculation only.) However, if a parameter othern than the parameter used for the previous execution is specified, the highspeed startup cannot be performed. Note) The same parameter means that all the parameters other than the output assignment are the same.

Output type
Incremental <Relative control>
The pulses specified for the target value are output. Mode selection CW/CCW Target value
When positive When negative Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

Absolute <Absolute value control>


The pulse that is the difference between the specified target value and the current value is output. Mode selection CW/CCW Target value
When target value is larger than current value When target value is smaller than current value Output from CW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

Addition

Output from CCW

Subtraction

[Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.)

3 550
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

*2: Composite speed range (Initial speed, Maximum speed ) (Hz) <K constant> 6.0Hz to 50kHz [K6 to K50000] (However, 6.0 Hz is for an angle of 0 deg or 90 dge only. Also, specify K6 when specifying 6.0 Hz.) When specifying K1 to K5, it is the same as 6.0 Hz (K6). If initial speed is set equal to maximum speed, pulses will be output with no acceleration/deceleration. Set the composite speed so that component speed of each axis is 6 Hz or greater. Composite speed (Initial speed): 30Hz or less Note) Cautions regarding specification of composite speed (initial speed) The trafectory might not be linear if the initial composite speeds for CH0 and CH2 are not 6.0 Hz or higher in the formula below. * When the formula below cant be worked out.

x: Short CH of distance between target and current value y: Long CH of distance between target and current value *3: Acceleration time (ms), Deceleration time (ms) <K constant> K0 to K32767 If this is 0, pulses will be output for the initial speed (composite speed) as is, with no acceleration/deceleration. Note: Specify the same value for the acceleration time and deceleration time. *4: Targe value (Movement distance) K8388608 to K8388607 When operating only one axis, a) In increment mode, set the target value for the axis which will not be operated to 0. b) In absolute mode, set the target value for the axis which will not be operated the same as the current value. Note: Infinite feed is not possible during linear interpolation. *5: Component speed (Initial speed and and maximum speed of each axis) This is stored as 2 words in real numbers type.
Xaxis component speed = Yaxis component speed = (Composite speed) x (Xaxis movement distance) ((Xaxis movement distance)2 + (Yaxis movement distance)2 ) (Composite speed) x (Yaxis movement distance) ((Xaxis movement distance)2 + (Yaxis movement distance)2 )

Component speed and correction Note the following characteristics according to the component speed of the initial speed calculated by the above formula *5. (1) When the initial speed is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. (2) When the initial speed is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. (3) When the initial speed is 184 or higher, the control up to 50kHz can be performed. The speed error around 50 kHz will be smallest. Note that the vector of the composite speed may be deviated at the time the pulse output starts or stops when the value has been corrected. Compare with the correction speed of initial speed in the special registers to check whether or not the specified initial speed is corrected. 3 551
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area is exceeded when an index modifier is used. Turns on when the n is other than 0. Turns on when the data S, S+1 to S+!0, S+11 of data table are outside specification range. Turns on when the composite speed designation satisfies: Maximum speed S+4, S+5 > 50kHz Turns on when increment mode is designated and the value of current value + movement distance is outside the range 8388608 to +8388607. Turns on when absolute mode is designated and the target value is outside the range 8388608 to +8388607. The acceleration time and deceleration time has not been set to the same value.

3 552
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP

Highlevel Instructions

F176(SPCH)

Pulse output (Circular interpolation)

Availability FP C32T2, C32T2H C28P2, C28P2H

Outline

Pulses are output from channel ch0 and ch2, in accordance with the parameters in the designated data table, so that the path to the target position forms an circular.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F176 DT K R 10 100 0

Trigger 10 R10 F176 SPCH , DT100 , K 0 S


S n 0: Fixed

(SPCH)

Starting address of area containing the data table.

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
Pulses are output from the channel ch0 (for Xaxis) and ch2 (for Yaxis) when the corresponding control flag turns off and the execution condition (trigger) turns on. For FP
Channel no. ch0 (for Xaxis) ch2 (for Yaxis) Output Y0 Y1 Y3 Y4 CW CCW CW CCW Output method PLS SIGN PLS SIGN

Designate the control code, composite speed, target position and pass position by creating the data table S to S+11 on the next page with the user program.

Table of areas used


Channel no. ch0 ch2 Control flag R903A R903C Elapsed value area DT90044, DT90045 DT90200, DT90201 Target value area DT90046, DT90047 DT90202, DT90203

3 553
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP C32T2/FPX

Flag for circular interpolation


R904E: Circular interpolation control flag
Turns ON when circular interpolation instruction F176 starts up and maintains that state until the target value is reached.

R904F: Set value change confirmation flag


When conducting control with the continuous mode for performing continuous circular interpolation actions, use this after circular interpolation instruction startup when overwriting the next target value.

Precautions during programming


Assume that the execution conditions for this instruction always hold. When the execution conditions are off, pulse output stops. During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. When the target value has not been reached and the execution condition is off, circular interpolation control flag R904E turns on and other positioning instructions F171 to F176 cannot start up. When restarting, use pulse output control instruction F0, below, to reset the pulse output instruction. This operation resets the Control flag for circular interpolation (R904E). Designate settings for the target value and movement distance so they are within the following range. 8,388,608 to +8,388,607 When using in combination with other positioning instructions like F171, designate so the target value is within the above range, even in those instructions. The accuracy of circular interpolation may degrade if the scan time lengthens. If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously. If you make the current position equal the target value when specifying the center position setting method, a circle drawing operation will result. When using in application requiring precision, check with the actual machine. When using this instruction, set the channels corresponding to system registers 400 and 401 to Not set as highspeed counter.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area is exceeded when an index modifier is used. The n is other than 0. The data S, S+1 to S+10, S+11 are outside specification range. Incremental mode is designated and the value of current value + movement distance is outside the range 8388608 to +8388607. Absolute mode is designated and the target value is outside the range 8388608 to +8388607. With pass position setting method, Current position S Target position E Current position S Pass position P Pass position P Target position E Current position S, Pass position P and Target position E approximate a straight line. With center position setting method, Center position O=Target position E Center position O=Current position S

3 554
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP C32T2/FPX

Highlevel Instructions

Setting the data table


Pass position setting method
S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 S+12 S+13 S+14 S+15 S+16 S+17 Control code Composite speed (Frequency) Fv (Hz) Xaxis (CH0) Target position Yaxis (CH2) Target position Xaxis (CH0) Pass position Yaxis (CH2) Pass position Radius Xaxis (CH0) Center position Yaxis (CH0) Center position Operation result storage area
Parameters for each axis component, calculated due to instruction execution, are stored here.

Center position setting method


S S+1 S+2 S+3 Setting area
Designated with user program

(*1) (*2)

Control code Composite speed (Frequency) Fv (Hz) Xaxis (CH0) Target position Yaxis (CH2) Target position Xaxis (CH0) Center position Yaxis (CH2) Center position Radius

(*1) (*2) (*3) (*3) Setting area

S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 S+12 S+13

(*3)

Operation result storage area

(*1): Specification of control code (specify with H constant)


S+1 H S

0: Fixed Operation connection mode(*4) 0: Stop 1: Continue Rotation direction (*5) 0: from CH2CW axis to CH0CW axis 1: from CH0CW axis to CH2CW axis Circular method (*6) 0: Pass position setting method 1: Center position setting method Operation mode and output method 00: Incremental CW/CCW 02: Incremental PLS + SIGN (forward off / reverse on) 03: Incremental PLS + SIGN (forward on / reverse off) 10: Absolute CW/CCW 12: Absolute PLS + SIGN (forward off / reverse on) 13: Absolute PLS + SIGN (forward on / reverse off) (*2): Composite speed (Frequency) K constant 100 Hz to 20 kHz [K100 to K20000] As a guide, keep the composite speed within the range of the formula below. Fv[Hz] <= radius[pulse] x 10/scantime[ms]

3 555
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP C32T2/FPX

(*3): Target position and pass position K8388608 to K8388607 (*4): Operation connection mode Stop: When stop (0) is specified, it will stop when the target position is reached. Continue: When the following circular interpolation data table is overwritten when continue (1) is specified after circular interpolation action begins, the following circular interpolation begins when the first circular interpolation that was started up finishes (target position reached). To finish, specify stop (0) for this flag (operation connection mode) after the last circular interpolation action has started. (*5): Rotation direction Pulses are output according to the designated direction. Operation differs, as indicated below, depending on the pass position and rotation direction setting.
CH2 CW

Direction 1

CH2 CW

Direction 0

CH0 CW

CH0 CW

(*6): Circular method Pass position setting method: The center position and the radius of the circular are calculated by specifying the pass and target positions for the current position. Center position setting method: The radius of the circular is calculated by specifying the center and target positions for the current position.
Direction 1 Direction 0 Current position S (Xs, Ys) Fx r Center position O (Xo, Yo) Fy Fv

Y (CH2)

X (CH0) Pass position P (Xp, Yp) Target position E (Xe, Ye)

Let CH0 be the Xaxis, and CH2 be the Yaxis. Fv: Fx: Fy: r: Composite speed Xaxis component speed Yaxis component speed Radius |YeYo| r O (Xo, Yo): Center point (Center position) S (Xs, Ys): Start point (Current position) P (Xp, Yp): Pass point (Pass position) E (Xe, Ye): End point (Target position) Fy= Fv cos = Fv |XeXo| r

Fx= Fv sin = Fv

3 556
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

F177(HOME)

Pulse output (Home return)

Availability FP0R

Performs the home return operation on the specified pulse output channels. Program example Outline
Ladder Diagram Boolean Address 10 Instruction ST DF F177 DT K (HOME) 100 2 R 10

10

R10

11

DF

F177 HOME , DT100 , K 2 S n

12

S n

Starting 16bit area for registering data tables Channels intended for pulse output

Operands
Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register I N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available

Description
When the corresponding pulse output instruction flag is off and the flag is on, pulses are output from the specified channels to perform the home return operation. * For using the pulse output function, it is required to set how to use input/output by system registers. * C10 and C14 is relay output type, therefore, pulse output cannot be performed.

Description of operation mode


Home return (Type 0) : The home input is available in all sections. Home return (Type 1) : The home input is available only in the section of creep speed.
Frequency Near home input F0(MV) H110, DT90052 (In case of ch0) Creep speed Home input X4 (In case of ch0) Time Type 1: Home input is available only in the section of creep speed.

Type 0: Home input is available in all sections.

3 557
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Table of areas used


FP0R
Pulse output Output channel No. Output type Near home Home input input Deviation counter clear Pulse output instruction C16 C31,T32,F32 flag Elapsed value area Target value area

ch0 ch1 ch2 ch3

Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

CW CCW CW CCW CW CCW CW CCW

PLS SIGN PLS SIGN PLS SIGN PLS SIGN

X4 X5 X6 X7

Y6 Y7

Y8 Y9 YA YB

R9120 R9121 R9122 R9123

DT90400 DT90401 DT90410 DT90411 DT90420 DT90421 DT90430 DT90431

DT90402 DT90403 DT90412 DT90413 DT90422 DT90423 DT90432 DT90433

DT90052 <bit4>

* In case of C16 type Note1: As Y6 and Y7 of CH3 is also used for the deviation counter clear output of CH0/1, either one of those functions can be used. * In case of C32, T32, F32 Note1: As X4, X5, X6 and X7 for the home return is also used for the hgihspeed counter, either one of those functions can be used.
S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 S+12 S+13 Control code Initial speed Target speed (Hz) Acceleration time (ms) Deceleration time (ms) Creep speed (Hz) Deviation counter clear Signal output time Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] Acceleration time up to the target speed: Acceleration time range (ms) K1 to K32760 (Unit: ms) Deceleration time from the target speed: Deceleration time range (ms) K1 to K32760 (Unit: ms) Speed range (frequency) (Hz) S f 1Hz to 50kHz [K1 to k50000 (Unit: Hz)] k0 to k200 k0 = Not output deviation counter clear signal. Kn = n*0.5ms

Note the following characteristics according to the specified initial speed. (1) When the initial speed is 1 or higher, and lower than 46Hz, the control up to the maximum frequency to the degree of 10kHz can be performed. If the frequency is higher than that, the speed error will be larger. (2) When the initial speed is 46 or higher, and lower than 184Hz, the control up to 50kHz can be performed. (3) When the initial speed is 184 or higher, the control up to 50kHz can be performed. The speed error around 50kHz will be smallest.

3 558
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

Assignment of control code (Specify with H constant)


H
10: Fixed Control assignment 0: Home return Control assignment type 0: Home return type 0 0: Home return type 1 00: Fixed Operation mode assignment 0: Forward 1: Reverse Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF)

Output type
Mode selection CW/CCW Operation mode
Forward Reverse Output from CW Output from CCW

PLS+SIGN Forward OFF Reverse ON

PLS+SIGN Forward ON Reverse OFF

Elapsed value
Addition Subtraction

Pulse output when Pulse output when direction output is off direction output is on Pulse output when Pulse output when direction output is on direction output is off

[Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.)

3 559
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Precautions during programming


Even in the state that the home input turns on, once this instruction is executed, the pulse output starts. If the near home input becomes effective during the acceleration, the deceleration operation will start. When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding control flags to each channel are on. If rewriting during RUN is performed during pulse output, pulses more than the setting may be output. When performing the software reset, count prohibition, pulse output stop or near home operation, refer to the F0(MV) instruction, pulse output.

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. Turns on when n is out of the specified range. Turns on when each data of [S,S+1] to [S+4,S+5] is out of the specified range. Turns on when initial speed [S+2,S+3] > target value [S+4,S+5].

3 560
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

F178(PLSM)

Availability

Input pulse measurement

FP0R

Outline

Measures the number of pulses and the pulse period of the specified highspeed counter channel when using the highspeed counter function. Program example
Ladder Diagram Boolean Address 10 Instruction ST F178 DT DT DT R 3 100 101 200

10

R3

11

(PLSM)

DF

F178 PLSM , DT100 , DT101 , DT200 S1 S2 D

S1 S2 D

Specification of channel No. and No. of moving average. Counting period Starting address of the destination area

Operands
Operand S1 S2 D (*1) I0 to ID A A N/A Relay WX WY WR WR A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A Index register In (*1) A A A N/A N/A N/A N/A N/A N/A SWR SDT Constant K A A N/A H A A N/A Index modifier A A A

Description

A: Available N/A: Not Available

The number of pulses or the pulse period of the specified highspeed counter channel is measured based on the control data specified by [S1]. In the measurement of the number of pulses, the number of pulses of the specified highspeed counter counted during the period specified by S2 is counted. The average of the number of moving average is calculated with the specified period and stored in D and D+1. When the number of average is n, 1 is output during the (n*counting period) time after the execution of the instruction. In the pulse period measurement in 1us unit, a period of 1 pulse right after the execution of this instruction is counted and stored in D+2 and D+3. In the pulse period measurement in 1ms unit, the measured value is stored in D+4 and D+5 every time the measurement of a period of 1 pulse completes. The same channel cannot be specified at the same time with other highspeed counter control instructions <F165(CAM0), F166(HC1S), F167(HC1R)>. An exclusive control is implemented by the highspeed counter control flags (R9110 to R9115). The number of channels that the instruction can be executed simultaneously is two. The trigger should be always ON while the pulse is being measured with this instruction. Turning OFF the trigger stops the measurement.

3 561
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Specification of each item


Specifying the channel number and number of moving average [S1] Specify the channel number of the highspeed counter and number of moving average. If necessary, specify the measurement of pulse period.
Setting of measurement limit for measuring period in 1ms unit 0: No measurement limit process 1:100ms 2:200ms 3:300ms 4:500ms 5:1s 6:2s 7:5s 8:10s 9:60s A: Undefined any more S1 n

Measurement of No. of moving Channel No. average H1 to H5 H0 to H5 pulse period H0 to H1 0: Pulse period is not measured. 1: Pulse period is measured in 1us unit. 2: Pulse period is measured in 1ms unit. 3: Pulse period is measured in 1us unit and 1 ms unit.

Measurement limit process for period measurement


The measurement limit process is a function which sets the measurement value to 1 when the period measurement has not completed in a given amount of time.
When measuring period in 1us unit

When measurement timer overflow has occurred The measurement value is set to 1 when a short period could be measured although a time more than 174ms has elapsed after the previous measurement request. When measurement has not completed The measurement value is set to 1 when measurement has not completed although a time more than 350ms has elapsed after the previous request. Even when measurement has completed after that, the result is disregarded and measurement is requested again.
When measuring period in 1ms unit

The elapsed value is set to 1 when the result of checking the period measurement counter _plsCycleTime0 has exceeded the measurement limit specified for the above n. Even when measurement has completed after that, the data is disregarded and measurement is requested again. Specify the counting period for the number of pulses. [S2] Specify it in 1ms unit. K1 to K5000 (1ms to 5s) Specifying the starting number of the destination area where the pulse is output. [D] Specify the starting number of the destination area where the pulse is output.
D, D+2, D+4 D+1 D+3 D+5 No. of pulses (Moving average value) Pulse period (1us unit) Pulse period (1ms unit) The latest value is stored with the measurement period specified by S2. The period of 1 pulse right after this instruction is executed is stored. The latest value is updated every time the period of 1 pulse is measured after the execution of this instruction.

3 562
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R

Highlevel Instructions

A maximum of approx. 174.7 ms can be measured in 1us unit. A maximum of approx. 49.7 days can be measured in 1ms unit.

Period measurement data


When measurement starts, 1 is set. When measurement limit is exceeded, 1 is set.

Precautions during programming


The same channel cannot be specified at the same time with other highspeed counter control instructions <F165(CAM0), F166(HC1S), F167(HC1R)>. An exclusive control is implemented by the highspeed counter control flags (R9110 to R9115). Once the instruction is executed, the pulse measurement function will be effective until the control is cleared with F0(MV) S, DT90052 instruction. The number of channels that the instruction can be executed simultaneously is two. F178 instruction cannot be executed if the highspeed counter function is not used. Do not execute this instruction in the normal program and the interrupt program at the same time.

FP0R
Highspeed counter channel No. Control flag Elapsed value area Target value area

ch0 ch1 ch2 ch3 ch4 ch5

R9110 R9111 R9112 R9113 R9114 R9115

DT90300 to DT90301 DT90304 to DT90305 DT90308 to DT90309 DT90312 to DT90313 DT90316 to DT90317 DT90320 to DT90321

DT90302 to DT90303 DT90306 to DT90307 DT90310 to DT90311 DT90314 to DT90315 DT90318 to DT90319 DT90322 to DT90323

Example of input pulse measurement setting


[Condition]
(1) Set the channel number to 0 and the number of moving average to 5. Specify the pulse period measurement in 1us unit. (2) Set the counting period to 10ms.
R9013 F0 MV , H F0 MV , K R3 150, 10, DT100 DT101 Specification of highspeed counter channel 0, No. of moving average: 5 times, specification of pulse period measurement (in 1us unit) Period of counting the number of pulses Start of input pulse measurement

F178 PLSM, DT100, DT101, DT200

Execution of program
When the internal relay R3 is ON, the operation is performed as follows. When pulses are input with a freuqency at 10kHz.
DT200 to DT201 No. of pulses (Moving average value) 100 pulses Calculates the number of input pulses every 10ms, and calculates the average of the past 5 times with a period of counting. 100 s (The value is k100.) Becomes 0 ms.

DT202 to DT203 DT204 to DT205

Pulse period in 1us unit Pulse period in 1ms unit

Note: The final numbers of actual measured values may vary due to measurement error.

3 563
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP0R

Flag conditions

Error flag (R9007): Error flag (R9008): Turns on when the area specified using the index modifier exceeds the limit. [S1] Turns on when the specified channel is out of the specified range. [S1] Turns on when the number of moving average is out of the specified range. [S2] Turns on when the counting period is out of the specified range. [D] Turns on when the range data to be stored exceeds the area. Turns on when the same channel has been already controlled with the same sorf of instruction. Turns on when the number of execution channels is 3 or more. Turns on when the highspeed counter has not been set for the specified channel by the system register.

3 564
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FPe

Highlevel Instructions

F180 (SCR)
Outline Program example

Availability

FPe screen display registration

FPe

Instruction to register the screen displayed in the N mode and S mode.


Boolean Address 10 11 Instruction ST F180 H DT DT DT R 0 (SCR) 0 10 100 101

Ladder Diagram

Trigger R0 F180 SCR, H0, DT 10, DT100, DT 101 S1


S1 S2 S3 S4

10

S2

S3

S4

FPe screen mode and number (Specify between 0 and 3.) Starting address of area specified for the FPe display method Area for storing data to be displayed in the upper of the FPe Area for storing data to be displayed in the lower of the FPe

Note: A special data register cannot be specified for S4.

Operands
Operand S1 S2 S3 S4 A A A N/A Relay WX WY WR A A A A A A A A Timer/Counter Register SV A A A A EV A A A A DT A A A A Index register IX A N/A A A IY A N/A A A Constant K A N/A N/A N/A H A N/A N/A N/A Index modifier A A A A A: Available N/A: Not Available

Description
Register FPe screens specified with S1 with the method whereby S2 to S2+2 is specified. For S3, specify the address where data for display in the upper is stored. For S4, specify the address where data for display in the lower is stored. When this instruction is executed, the registered screen is displayed in the FPe panel. To switch screens, use the mode switch on the FPe, or instruction F180 or F181. Specify the screens for setting with S1. Specify the display method with S2, S2+1 and S2+2. Specify the data to be displayed in the upper with S3. Specify the data to be displayed in the lower with S4. Note) For the numeric data display of S3 and S4, only 16bit data is available.

Precautions during programming


This instruction cannot be used during the interrupt program.

3 565
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FPe

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The value of S1 or S2 exceeds the limit of specified range.

How to specify S1
Specify the type of FPe mode. Value specified for S1
H0 H1 H2 H3

Type of mode
N mode first screen N mode second screen S mode first screen S mode second screen

How to specify S2, S2+1, S2+2


With S2, S2+1 and S2+2 specify the display method of the screen specified with S1. By writing the data below, the screen display method is specified in a 3word range from the area specified with S2. For example, when DT10 is specified for S2, DT10 to DT12 becomes the area below.

S2: First word


Specifies the method in which all units are displayed.
15 12 11 87 43 0

Undefined (bits 15 to 10) [Specify 0] Lower display setting (bit 9) [0: display, 1: no display] Upper display setting (bit 8) [0: display, 1: no display]

Unit display setting (bits 7 to 0) [0: no display, 1: display] bit 0: Unit PV bit 1: Unit SV bit 2: Unit s bit 3: Unit m bit 4: Unit h bit 5: Unit C bit 6: Unit F bit 7: Unit

3 566
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FPe

Highlevel Instructions

S2+1: Second word


Specifies the method for displaying data in the upper. The bits shown in the figure below are allocated. Please specify with the H constant.

S2+2: Third word


Specifies the method for displaying data in the lower. The bits shown in the figure below are allocated. Please specify with the H constant.
15 12 11 87 43 0

Digit delete designation (bits 12 to 8) [0: display, 1: no display] bit 8: 1st last digit bit 9: 2nd last digit bit 10: 3rd last digit bit 11: 4th last digit bit 12: 5th last digit Color designation (bits 14 and 13) 00: Undefined (When specifying, Green) 01: Green 10: Red 11: Orange Zero suppress (bit 15) [0: Yes, 1: No]

Decimal place display position (bits 4 to 0) [0: no display, 1: display] bit 0: 2nd last digit bit 1: 3rd last digit bit 2: 4th last digit bit 3: 5th last digit bit 4: 3rd first digit Data display format (bits 7 to 5) 000: 5digit decimal with sign 001: 4digit hexadecimal or 4digit BCD display 010: bit display 011: 5character ASCII data display 100: 7segment data display 101: Undefined Undefined for 101 and later will be 110: Undefined error if specifying undefined data 111: Undefined

Remarks) If displaying decimal point in the format of 5digit decimal with sign, the value(s) before the decimal point should be displayed. Example: To change the color to red, put 10 for bits 14 and 13. Specify in this way: 0100 0000 0000 0000 H4000.

3 567
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FPe

F181 (DSP)
Outline Program example

Availability

FPe screen display switching

FPe

Specify the screen to be displayed on the FPe.


Boolean Address 10 11 Instruction ST F181 DT R 0 (DSP) 0

Ladder Diagram

Trigger R0 F181 DSP, DT 0 S


S

10

FPe screen mode and number (Specify between 0 and 7.)

Operands
Operand S A Relay WX WY WR A N/A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K A H A Index modifier A A: Available N/A: Not Available

Description
Switches the FPe screen to the screen of the mode specified with S.

How to specify S
Specify the type of FPe mode. Value specified for S
K0 K1 K2 K3 K4 K5 K6 K7

Type of mode
N mode first screen N mode second screen S mode first screen S mode second screen R mode first screen R mode second screen I mode first screen I mode second screen

Precautions during programming


If specifying the value other than 0 to 7 for S, an operation error will occur. This instruction cannot be used during the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The value of S is number except 0 to 7.

3 568
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FPe

Highlevel Instructions

Availability

F182 (FILTR)
Outline Program example

Time constant processing

FPX V2.0 or more FP V3.10 or more FP0R

The filter processing is executed for the specified bits and the bitwise results are output.
Boolean Address 10 11 Instruction ST F182 WX DT DT WR R 0 (FILTR) 0 1 2 10

Ladder Diagram

Trigger R0 F182 FILTR, WX0, DT 1, DT2, WR10 S1


S1 S2 S3 D

10

S2

S3

16bit area for storing object data for filter processing 16bit equivalent constant or 16bit area for storing object bits for filter processing 16bit equivalent constant or 16bit area for storing filter processing time 16bit area for storing filter processing results

Operands
Relay Operand WX WY WR WL S1 S2 S3 N (*1) I0 to ID A A A N/A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A Timer/Counter Register Index register In (*1) A A A A Constant SWR SDT K A A A N/A A A A N/A N/A A A N/A H N/A A A N/A Index modifier N/A N/A N/A N/A A: Available N/A: Not Available

Operation
In the 16bit data stored in the area specified by S1, the bits of 0 specified by S2 are output directly, and the bits of 1 are output by performing the filter processing for the time specified by S3 (0 to 30000 in msec unit). The results are stored in the area specified by D in bit unit. (The bit positions are the same as S1.)

The bit position of S1 and D corresponds respectively.

3 569
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FPe

Precautions during programming


When the system detects a leading edge of the trigger, all the bits of the input specified by S1 is unconditionally output. Max. 1 scan time error in the filter processing time occurs occasionally.

Explanation of example
The changes in values of R0 or X0 to XF, when the conditions prior to the execution of this instruction (R0=0) are as below, are explained with a time chart. WX0 (Filter processing input data) = HA9BC DT1 (Filter processing object bit) = H0001 DT2 8Filter processing time) = k500 WR10 (Filter processing result) = HFFFF

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The filter processing time specified by S3 is smaller than k0 or larger than k30000.

3 570
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions 5

F183 (DSTM)

Auxiliary timer (32-bit )

Outline Sets the 32bit ONdelay timer for 0.01 s units (0.01 to 21474836.47 s) Program example
Ladder Diagram Boolean Address 10 Instruction ST F183 DT DT 16 OT R R 0 10 5 5

Trigger 10 R0 F183 DSTM , DT10 , DT 5 S


S D

R5 D

11

(DSTM)

32-bit equivalent constant or lower 16-bit area of 32bit data for timer set value 16-bit area for timer elapsed value

Operands
Relay Operand WX WY WR S D A N/A A A A A SV A A EV A A DT A A Timer/Counter Register Index register IX (*1) A N/A IY N/A N/A Constant K A N/A H A N/A Index modifier N/A N/A A: Available N/A: Not Available

(*1) With the FP0R, FP, FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.

Explanation of example
When the execution condition (trigger) has been satisfied, the auxiliary timer is activated, and the time equal to the values stored in data registers DT10 and DT11 x 0.01 seconds has elapsed, R5 goes on.

Description
This functions as a 32bit additiontype On Delay timer set in 0.01second units. When the execution condition (trigger) is on, the elapsed time is added, and when the elapsed value (D + 1, D) (32 bits) exceeds the set value, the relays being used are turned on by the OT instruction which comes next in the program. When the execution condition (trigger) is off, the elapsed value area is cleared to 0, and relays being used are turned off by the OT instruction. When the time set for the special internal relay R900D has elapsed, the relay is turned on. R900D can also be used as a timer contact. (R900D is off when the execution condition (trigger) is off and while addition is being carried out.)
R0 R900D F183 DSTM, DT10, DT5 R5

Operation is the same as that in the example shown above.

3 571
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Timer set time


The timer setting is entered as a value of 0.01 x (timer set value). The timer set value is specified as a K constant within the range of K1 to K2147483647. The F183 (DSTM) is set between 0.01 and 21,474,836.47 seconds, in units of 0.01 seconds. If the set value is K500, the set time will be 0.01 x 500 = 5 seconds.

Precautions during programming


The area in which the set value is stored must be set so that the area specified for the elapsed value does not overlap any areas reserved for other timer or counter instructions, or memory areas used for highlevel instruction operations. Because addition is carried out when operations are carried out, the program should be set up so that operations are carried out every scan. (In cases such as programs where division is carried out, or for jump or loop instructions, where several operations are carried out during one scan, or where it was not possible to carry out any operation during the scan, correct results cannot be obtained.)

How the Auxiliary Timer Works


1

When the execution condition (trigger) changes from off to on, values of 0 are sent to the elapsed value area (D + 1, D).
R0 R5 F183 DSTM, K500, DT5 0
1

R900D F0 MV, DT50, WR50


2

Sent to (D + 1, D)

DT5, DT6 0

If the execution condition (trigger) stays on, the values in the elapsed value area (D + 1, D) are added.
R0 R5 F183 DSTM, K500, DT5 DT5, DT6 K500
2

R900D F0 MV, DT50, WR50

0 1 2

Addition

next page

3 572
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If the values in the elapsed value area (D +1, D) reach (S + 1, S), relays being used are turned on by the OT instruction which comes next in the program. The special internal relay R900D also goes on at this point.
R0 R5 F183 DSTM, K500, DT5 DT5 K500

R900D F0 MV, DT50, WR50


3

Addition completed

Elapsed value (D+1, D)

Set value (S+1, S)

R0

on off

R5 on (R900D) off

Precautions When Using R900D


If R900D is used and multiple auxiliary timers are being used, always use R900D in the line following the auxiliary timer instruction.
X0 R900D F183 DSTM, WR1, DT5 Y0 Pair

X1 R900D

F183 DSTM, WR10, DT10 Y1 Pair

When timer a , which is activated by X0: on, expires, Y0 goes on. When timer expires, Y1 goes on. If written as indicated below, R900D will not function correctly.
X0 X1 F183 DSTM, DT0, DT5 F183 DSTM, DT20, DT10

, which is activated by X1: on,

R900D R900D

Y0 Y1

3 573
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 574
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F190 (MV3) P190 (PMV3)


Outline

Three 16-bit data move

Copies three 16-bit data to the specified 48-bit area (3 words). For the FP0R/FP/FPX, the P type highlevel instruction P190 (PMV3) is not available.
Boolean Address 10 11 Instruction ST F190 DT DT DT DT R 0 (MV3) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F190 MV3, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (source) Starting 16-bit area of 48-bit area (3 words) (destination)

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A A Constant H A A A A f N/A N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

A: Available N/A: Not Available

3 575
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When trigger R0 turns on, the contents of data register DT10 are copied to DT40. the contents of data register DT20 are copied to DT41. the contents of data register DT30 are copied to DT42. [S3]16 bits [S2]16 bits [S1]16 bits

Contents of DT30 Contents of DT20 Contents of DT10

[D] DT42 DT41 DT40

Description
The 16-bit data or 16-bit equivalent constant specified by S1, S2 and S3 is copied to the area (3 words) specified by D when the trigger turns on.

Related instruction
To transfer two types of 16-bit data at once, use the F7 (MV2) instruction.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 576
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F191 (DMV3) Three 32-bit data move P191 (PDMV3)


Outline Copies three 32-bit data to the specified 96-bit area (6 words). For the FP0R/FP/FPX, the P type highlevel instruction P191 (PDMV3) is not available.
Boolean Address 10 11 Instruction ST DT R 0 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F191 DMV3, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

F191 (DMV3) DT DT DT

S2

S3

32-bit equivalent constant or lower 16-bit area of 32-bit data (source) 32-bit equivalent constant or lower 16-bit area of 32-bit data (source) 32-bit equivalent constant or lower 16-bit area of 32-bit data (source) Starting 16-bit area of 6 words (96-bit area) (destination)

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H f Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

3 577
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When trigger R0 turns on, the contents of deta register DT11 and DT10 are copied to data registers DT41 and DT40. the contents of data register DT21 and DT20 are copied to DT43 and DT42. the contents of data register DT31 and DT30 are copied to DT45 and DT44. Higher 16-bit area [S3] Contents of DT31 Contents of DT30 Lower 16-bit area [S2] Contents of DT21 Contents of DT20 Higher 16-bit area Lower 16-bit area [S1] Contents of DT11 Contents of DT10 Higher 16-bit area Lower 16-bit area

[D] DT45 DT44 DT43 DT42 DT41 DT40

Description
The 32-bit data or 32-bit equivalent constant specified by S1, S2 and S3 is copied to the area (6 words) specified by D when the trigger turns on.

Related instruction
To transfer two types of 32-bit data at once, use the F8 (DMV2) instruction.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 578
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F215 (DAND) 32-bit data AND P215 (PDAND)


Outline Performs bit-wise AND operation on two 32-bit data items. For the FP0R/FP/FPX, the P type highlevel instruction P215 (PDAND) is not available.
Boolean Address 10 11 Instruction ST F215 DT DT DT R 0 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F215 DAND, DT10, DT20, DT30 S1


S1 S2 D

(DAND)

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data 32-bit equivalent constant or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing AND operation result

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
15 0 [DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 [DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 AND operation 15 0 [DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 [DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

15 0 [DT30] 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 [DT31] 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1

3 579
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs AND operation on each bit in the 32-bit equivalent constant or 32-bit data specified by S1+1 and S1 and S2+1 and S2 when the trigger turns on. The AND operation result is stored in the 32-bit area specified by D.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 580
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F216 (DOR) P216 (PDOR)


Outline

32-bit data OR

Performs bit-wise OR operation on two 32-bit data items. For the FP0R/FP/FPX, the P type highlevel instruction P216 (PDOR) is not available.
Boolean Address 10 11 Instruction ST F216 DT DT DT R 0 (DOR) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F216 DOR, DT10, DT20, DT30 S1


S1 S2 D

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data 32-bit equivalent constant or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing OR operation result

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
15 0 [DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 [DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 OR operation 15 0 [DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 [DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

15 0 [DT30] 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 [DT31] 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1

3 581
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs OR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by S1+1 and S1 and S2+1 and S2 when the trigger turns on. The OR operation result is stored in the 32-bit area specified by D.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 582
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F217 (DXOR) 32-bit data XOR P217 (PDXOR)


Outline Performs bit-wise exclusive OR operation on two 32-bit data items. For the FP0R/FP/FPX, the P type highlevel instruction P217 (PDXOR) is not available.
Boolean Address 10 11 Instruction ST F217 DT DT DT R 0 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F217 DXOR, DT10, DT20, DT30 S1


S1 S2 D

(DXOR)

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data 32-bit equivalent constant or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing exclusive OR operation result

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
[S1]: HC6A99621 15 0 [DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 [DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 [S2]: H00FFFF00 Exclusive OR 15 0 [DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 [DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 [D]: H6921C656 15 0 [DT30] 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 1 [DT31] 1 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0

3 583
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs exclusive OR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by S1+1 and S1 and S2+1 and S2 when the trigger turns on. The exclusive OR operation result is stored in the 32-bit area specified by D. You can use this instruction to check how many bits in two 32-bit data items are the same.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 584
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F218 (DXNR) 32-bit data XNR P218 (PDXNR)


Outline Performs bit-wise exclusive NOR operation on two 32-bit data items. For the FP0R/FP/FPX, the P type highlevel instruction P218 (PDXNR) is not available.
Boolean Address 10 11 Instruction ST F218 DT DT DT R 0 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F218 DXNR, DT10, DT20, DT30 S1


S1 S2 D

(DXNR)

S2

32-bit equivalent constant or lower 16-bit area of 32-bit data 32-bit equivalent constant or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing exclusive NOR operation result

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
[S1]: HC6A99621 15 0 [DT10] 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 [DT11] 1 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 Exclusive NOR [S2]: H00FFFF00 15 0 [DT20] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 [DT21] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 [D]: H39A996DE 15 0 [DT30] 1 0 0 1 0 1 1 0 1 1 0 1 1 1 1 0 [DT31] 0 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1

3 585
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Performs exclusive NOR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by S1+1 and S1 and S2+1 and S2 when the trigger turns on. The exclusive NOR operation result is stored in the 32-bit area specified by D. You can use this instruction to check how many bits in two 32-bit data items are the same.

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 586
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F219 (DUNI) P219 (PDUNI)


Outline

32-bit data unites

Unites two 32-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P219 (PDUNI) is not available.
Boolean Address 10 11 Instruction ST F219 DT DT DT DT R 0 (DUNI) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F219 DUNI, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

32-bit equivalent constant or lower 16-bit area of 32-bit data 32-bit equivalent constant or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data which stores master data for combination or 32-bit equivalent constant Lower 16-bit area of 32-bit data for storing calculated result

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

3 587
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
[S1+1, S1]: HCCCCAAAA [DT10] [DT11] [S3+1, S3]:HF0F0F00F [DT30] [DT31] HC0C0A00A [S2+1, S2]:H33335555 [DT20] [DT21] Inverted [S3+1, S3]:H0F0F0FF0 [Inverted DT30] [Inverted DT31] H03030550

[D+1, D]:HC3C3A55A [DT40] [DT41]

Description
The two groups of double word data specified by S1+1 and S1 and S2+1 and S2 are combined by bit unit processing using the master data specified by S3+1 and S3 and stored in the 32bit area specified by D. ([S1+1, S1] AND [S3+1, S3]) OR ([S2+1, S2] AND [S3+1, S3]) [D+1, D] When [S3+1 and S3]) is H0, ([S2+1, S2] [D+1, D] When [S3+1, S3]) is HFFFFFFFF, ([S1+1, S1] [D+1, D]

Flag conditions

Error flag (R9007): Error flag (R9008): = flag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as 0.

3 588
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FPX

Highlevel Instructions

F230 (TMSEC) Time data P230 (PTMSEC)


Outline

second conversion

Availability FP2/FP2SH/FPX FP 32k/FP0R

The specified time data (a date and time) is changed into the number of seconds.
With FP2/FP2SH, this function is available from Ver. 1.50 or later.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F230 DT DT R 0 10 20

Trigger R0 F230 TMSEC, DT 10, DT 20 S


S D

(TMSEC)

10

Area in which the input time data stored Area in which the converted second information stored (32 bits)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A Constant K N/A N/A H N/A N/A Index modifier A A A: Available N/A: Not Available

Explanation of example
When the internal relay (R0) is on, conversion to the number of seconds from standard time is performed for the time data of the data registers DT10 to DT12, and the conversion result is stored in DT20 and DT21.
ex.)
(higher) (lower)

DT10 DT11

H37 H03

H26 H12

H12 DT12 H02 (DEC.3,02 12:37:26) (2002)


ex.)

H039CDD06 DT20 (Binary value) DT21 (60,611,846 seconds)

(higher)

(lower)

DT10 DT11 DT12

H59 H31 H00

H59 H23 H12

HBC19137F DT20 (Binary value) DT21 (3,155,759,999 seconds)

(DEC.31,00 23:59:59) (2100)

3 589
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
1) 2) Conversion to the number of seconds from standard time *1 is performed for the input time data [S ~ S+2], and a conversion result is stored in [D, D+1] by the 32bit binary. The conversion is in consideration of the leap year. 1 minute 60 seconds 1 hour 60 minutes 1 day 24 hours 1 year (leap year) 366 days 1 year (except a leap year) 365 days A leap year (4 multiple years) Feb.29 Time data (S) must be specified in the data sequence of BCD, and the value within the limits must be registered.

3)

*1: Standard time is 00:0000 on January 1, 01. Moreover, a conversion result is output with a binary value.
Time data (S) (BCD)
(higher) (lower)

S: S+1: S+2:

Minutes (H0059) Days (H01H31) Years (H00H99)

Seconds (H00H59) Hours (H00H23) Months (H01H12)

Second data (D)

D: D+1:

Seconds data (H00000000 HBC19137F)

The correspondence table of Time data and Second conversion 2001 : : : : : : : : 2099 2100 : 2100 Time data (S) 01/01/01 00:00:00 01/01/01 00:00:01 : 01/01/01 00:01:00 : 01/01/01 01:00:00 : 01/01/02 00:00:00 : 99/12/31 23:59:59 00/01/01 00:00:00 : 00/12/31 23:59:59 Seconds data (D) H00000000 H00000001 : H0000003C : H00000E10 : H00015180 : HBA368E7F HBA368E80 : HBC19137F

Flag conditions

Error flag (R9007) (R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when values other than BCD are specified for [S]. It turns on, when the value which exceeds the range in the time data of [S] is specified. It turns on, when the data of [S] exceeds the area.

3 590
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FPX

Highlevel Instructions

F231 (SECTM) Second P231 (PSECTM)


Outline

time data conversion

Availability FP2/FP2SH/FPX FP 32k/FP0R

The specified number of seconds is changed into time data (a date and time).
With FP2/FP2SH, this function is available from Ver. 1.50 or later.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F231 DT DT R 10 0 10

Trigger R0 F231 SECTM, DT 0, DT 10 S


S D

(SECTM)

10

Area in which the number of seconds stored (32 bits) Head area in which time data stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A N/A Constant H N/A N/A f N/A N/A Index modifier A A A: Available N/A: Not Available

Explanation of example
When the internal relay (R0) is on, the number of seconds for the data registers DT0 and DT1 is converted to the time data based on the standard time, and stored in DT10 to 12.
ex.)
(higher) (lower)

DT0 DT1

H039D0A6A (Binary value) (60,623,466)

H51 H03 H02

H06 H15 H12

DT10 DT11 DT12

(Dec.3,02 15:51:06) (2002)


ex.)
(higher) (lower)

DT0 DT1 (3,155,759,999 seconds)

HBC19137F (Binary value)

H59 H31 H00

H59 H23 H12

DT10 DT11 DT12

(Dec.31,00 23:59:59) (2100)

3 591
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
1) 2) The input number of seconds (S) is converted to the time data based on standard time *1, and stored in (D). The conversion is in consideration of the leap year. 1 minute 60 seconds 1 hour 60 minutes 1 day 24 hours 1 year (leap year) 366 days 1 year (except a leap year) 365 days A leap year (4 multiple years) Feb.29 The range which can specify the number of seconds (S) is 100 years which can be expressed by time data. H00000000 HBC19137F Normal conversion HBC191380 HFFFFFFFF Conversion error

3)

*1: Standard time is 00:0000 on January 1, 01.


Second data (S)

S: S+1:

Seconds data

(lower) (higher)

(H00000000 HBC19137F)

Time data (D) (BCD)


(higher) (lower)

D: D+1: D+2:

Minutes (H00H59) Days (H01H31) Years (H00H99)

Seconds (H00H59) Hours (H00H23) Months (H01H12)

Total Second Conversion Second data (S) H00000000 H00000001 : H0000003C : H00000E10 : H00015180 : HBA368E7F HBA368E80 : HBC19137F Time data (D) 01/01/01 00:00:00 01/01/01 00:00:01 : 01/01/01 00:01:00 : 01/01/01 01:00:00 : 01/01/02 00:00:00 : 99/12/31 23:59:59 00/01/01 00:00:00 : 00/12/31 23:59:59 2001 : : : : : : : : 2099 : : 2100

Flag conditions

Error flag (R9007) (R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when the number of seconds (S) is (S) >=HBC191380. It turns on, when the data memory of [D] exceeds the area.

3 592
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F235 (GRY) P235 (PGRY)


Outline

16-bit data Gray code

Converts 16-bit data to gray code. For the FP0R/FP/FPX, the P type highlevel instruction P235 (PGRY) is not available.
Boolean Address 0 1 Instruction ST F235 DT DT R 0 (GRY) 10 20

Program example
Ladder Diagram

Trigger R0 0 F235 GRY, DT10, DT20 S


S D

16-bit equivalent constant or 16-bit area to be converted (source) 16-bit area for storing gray codes (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Description
Converts the 16-bit data specified by S to gray codes when the trigger turns on. The converted result is stored in the 16-bit area specified by D. For detailed information about the gray code page 3 597

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 593
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F236 (DGRY) 32-bit data Gray code P236 (PDGRY)


Outline Converts 32-bit binary data to gray code. For the FP0R/FP/FPX, the P type highlevel instruction P236 (PDGRY) is not available.
Boolean Address 0 1 Instruction ST F236 DT DT R 0 10 20

Program example
Ladder Diagram

Trigger R0 0 F236 DGRY, DT10, DT20 S


S D

(DGRY)

32-bit equivalent constant or lower 16-bit area of 32-bit data to be converted (source) Lower 16-bit area of 32-bit data for storing gray code (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Description
Converts the 32-bit data specified by S to gray code when the trigger turns on. The converted data is stored in D+1 and D. For detailed information about the gray code page 3 597

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 594
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F237 (GBIN) P237 (PGBIN)


Outline

16-bit Gray code 16-bit binary data

Converts 16-bit gray code to 16-bit binary data. For the FP0R/FP/FPX, the P type highlevel instruction P237 (PGBIN) is not available.
Boolean Address 0 1 Instruction ST F237 DT DT R 0 (GBIN) 10 20

Program example
Ladder Diagram

Trigger R0 0 F237 GBIN, DT10, S


S D

DT20 D

16-bit area for gray code (source) 16-bit area for storing converted data (destination)

Operands
Operand S D A Relay WX WY WR WL A A A A A Timer/Counter SV A A EV A A Register DT LD FL A A A A A A Index register I A A Constant K A H A f N/A Index Integer modifier device A A N/A N/A

N/A A

N/A N/A N/A

A: Available N/A: Not Available

Description
Converts the gray codes in 16-bit are specified by S to 16-bit data when the trigger turns on. The converted result is stored in the area specified by D. For detailed information about the gray code page 3 597

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 595
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F238 (DGBIN) P238 (PDGBIN)


Outline

32-bit Gray code 32-bit binary data

Converts gray code to 32-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P238 (PDGBIN) is not available.
Boolean Address 0 1 Instruction ST F238 DT DT R 0 10 20

Program example
Ladder Diagram

Trigger R0 0 F238 DGBIN, DT10, S


S D

(DGBIN)

DT20 D

Lower 16-bit area of 32-bit data for gray code (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Description
Converts gray code to 32-bit data when the trigger turns on. The converted result is stored in the 32-bit area specified by D+1 and D. For detailed information about the gray code page 3 597

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 596
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Binary/Hexadecimal/BCD/Gray Code Expressions


Decimal
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 E E E 63 E E 255

Binary data
0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0010 0000 0000 0000 0011 0000 0000 0000 0100 0000 0000 0000 0101 0000 0000 0000 0110 0000 0000 0000 0111 0000 0000 0000 1000 0000 0000 0000 1001 0000 0000 0000 1010 0000 0000 0000 1011 0000 0000 0000 1100 0000 0000 0000 1101 0000 0000 0000 1110 0000 0000 0000 1111 0000 0000 0001 0000 0000 0000 0001 0001 0000 0000 0001 0010 0000 0000 0001 0011 0000 0000 0001 0100 0000 0000 0001 0101 0000 0000 0001 0110 0000 0000 0001 0111 0000 0000 0001 1000 0000 0000 0001 1001 0000 0000 0001 1010 0000 0000 0001 1011 0000 0000 0001 1100 0000 0000 0001 1101 0000 0000 0001 1110 0000 0000 0001 1111

Gray code
0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0011 0000 0000 0000 0010 0000 0000 0000 0110 0000 0000 0000 0111 0000 0000 0000 0101 0000 0000 0000 0100 0000 0000 0000 1100 0000 0000 0000 1101 0000 0000 0000 1111 0000 0000 0000 1110 0000 0000 0000 1010 0000 0000 0000 1011 0000 0000 0000 1001 0000 0000 0000 1000 0000 0000 0001 1000 0000 0000 0001 1001 0000 0000 0001 1011 0000 0000 0001 1010 0000 0000 0001 1110 0000 0000 0001 1111 0000 0000 0001 1101 0000 0000 0001 1100 0000 0000 0001 0100 0000 0000 0001 0101 0000 0000 0001 0111 0000 0000 0001 0110 0000 0000 0001 0010 0000 0000 0001 0011 0000 0000 0001 0001 0000 0000 0001 0000

0000 0000 0011 1111


0000 0000 0010 0000


0000 0000 1111 1111

0000 0000 1000 0000

3 597
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 598
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F240 (COLM) P240(PCOLM)


Outline

Bit line to bit column conversion

Converts a selected bit line to a bit column. For the FP0R/FP/FPX, the P type highlevel instruction P240 (PCOLM) is not available.
Boolean Address 10 11 Instruction ST F240 DT K DT R 0 10 10 20

Program example
Ladder Diagram

Trigger R0 10 F240 COLM, DT10, S


S n D

(COLM)

K10, n

DT20 D

16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area to specify bit position Starting address of area which will be rewritten with bit column.

Operands
Operand S n D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f N/A N/A Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

3 599
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When the specified bit position n = 10 S 15 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 15 D D+1 D+2 D+3 D+4 D+5 D+6 D+7 D+8 D+9 D+10 D+11 D+12 D+13 D+14 D+15 10 1 0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 0

Description
The bit data at the position specified by n of the 16-word data area with the head address D is rewritten using the 16-bit data of the area specified by S. The contents of the bits of the 16-word data area with head address D that are not specified do not change. n can be between 0 and 15.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If the specified bit position [n] is not in the range 0 n 15. If the result of the conversion overflows the storage area specified with D.

3 600
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F241 (LINE) P241(PLINE)


Outline

Bit column to bit line conversion

Converts a specified bit column to a bit line. For the FP0R/FP/FPX, the P type highlevel instruction P241 (PLINE) is not available.
Boolean Address 10 11 Instruction ST F241 DT K DT R 0 (LINE) 10 10 20

Program example
Ladder Diagram

Trigger R0 10 F241 LINE, DT10, S


S n D

K10, DT20 n D

Starting address of area where bit column will be read. 16-bit equivalent constant or 16-bit area to specify bit position 16-bit area for storing converted data (destination)

Operands
Operand S n D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A A A N/A

N/A N/A N/A

A: Available N/A: Not Available

3 601
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
When the specified bit position n = 10 15 S S+1 S+2 S+3 S+4 S+5 S+6 S+7 S+8 S+9 S+10 S+11 S+12 S+13 S+14 S+15 D 10 1 0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 15 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 0

Description
Reads the bit data at the position specified by n from the area specified by S and stores it in the area specified by D. n can be set between 0 and 15.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. n 15. If the specified bit position [n] is not in the range 0 If the conversion range specified with S overflows the area.

3 602
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

F250 (BTOA)

Availability

Binary

ASCII conversion

FPX/FP 32k/FP0R

Outline

Converts 16bit/32bit binary data to ASCII code.


Boolean Address 10 11 Instruction ST M DT DT DT R 0 16D 10 20 100

Program example
Ladder Diagram

Trigger R0
M

F250(BTOA)

10

F250 BTOA, 16D, DT10, DT20, DT100 S1


S1 S2 N D

S2

Control string Starting 16bit area for storing binary data Conversion method Starting 16bit area for storing ASCII codes of converted result

Operands
Operand S1 S2 N D Relay WX WY WR WL A A A N/A A A A A A A A A A A A A Timer/Counter Register SV A A A A EV A A A A DT A A A A LD A A A A Index register IX A A A A IY A A A A Constant K N/A N/A A N/A H N/A N/A A N/A M A N/A N/A N/A Index modifier A A A A A: Available N/A: Not Available

Operation
Converts the binary data stored in the area specified by S2 to ASCII codes using the conversion method of N according to 4 control characters specified by S1. The converted result is stored in the area specified by D.

Specifying the various items


Specifying control strings and the meanings [S1] M 16D M 32D M 16+H M 32+H M 16H M 32H Converts 16bit data to decimal ASCII codes. Converts 32bit data to decimal ASCII codes. Converts 16bit data to hexadecimal ASCII codes. (Normal direction) Converts 32bit data to hexadecimal ASCII codes. (Normal direction) Converts 16bit data to hexadecimal ASCII codes. (Reverse direction) Converts 32bit data to hexadecimal ASCII codes. (Reverse direction) *The details of the normal and reverse directions are described later.

3 603
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Specifying the conversion method [N] Example of converting 16bit data (K1234 and K56) to decimal ASCII codes

R1 ( DF ) F251 ATOB, F250 BTOA,

M D16, DT 10, DT20, , DT100 16D, S2 , H 214 D

Notes
About the digit number of ASCII data When converting 16bit data to hexadecimal ASCII codes Specified range: H1 to 4 When less than H4, the specified number of digits is stored from the lower bytes. If the digit number of original data is larger with the specification less than H4, it is an error. When converting 32bit data to hexadecimal ASCII codes Specified range: H1 to 8 When less than H8, the specified number of digits is stored from the lower bytes. If the digit number of original data is larger with the specification less than H8, it is an error. When converting to decimal ASCII codes Specified range: H1 to F Source data is treated as signed binary data. When it is a negative number, the minus sign is added. When the number of digit of ASCII codes is larger than the converted result, the space _ is stored in the extra smaller addresses.

3 604
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

About normal direction and reverse direction (only when converting to hexadecimal ASCII data)

Conversion examples
Converts 16bit data (K1234 and K56) to decimal ASCII codes. DT10 = K 1234 DT11 = K 56 1234__56

When No. of converted data is 2, Starting position for storing is 0, Size of the area for storing is 4.

R0 ( DF ) F250 BTOA, F251 ATOB,

M 16D, DT10 , HDT20, , DT100 D16, DT 10, 204 DT 100

3 605
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Converts 32bit data (K1234 and K56789) to decimal ASCII codes. DT1011 = K 1234 DT1213 = K 56789st ___1234__56789

When No. of converted data is 2, Starting position for storing is 1, Size of the area for storing is 7.

R0 ( DF ) F250 BTOA, F251 ATOB,

M 32D, DT10 , HDT20, , DT100 D16, DT 10, 217 DT 100

Converts 16bit data (H0123 and H89AB) to hexadecimal ASCII codes. DT10 = H 123 DT11 = H 89AB 2301AB89

When No. of converted data is 2, Starting position for storing is 1, Size of the area for storing is 4. (Normal direction)

R0 ( DF ) F250 BTOA, F251 ATOB,

M 16+H, DT10 , H 214 , DT100 D16, DT 10, DT20, DT 100

For the reverse direction (when 16+H is 16H)

3 606
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Converts 32bit data (H00000123 and H0089ABCD) to hexadecimal ASCII codes (Normal direction) DT1011 = H 123 DT1213 = H 89ABCD 230100CDAB89

When No. of converted data is 2, Starting position for storing is 0, Size of the area for storing is 6.

R0 ( DF ) F250 BTOA, F251 ATOB,

M 32+H, DT10 , H 206 , DT100 D16, DT 10, DT20, DT 100

For the reverse direction (when 32+H is 32H)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when Turns on for an instant when There is an error in the control string specified by S1. The direction of converted data is changed to the normal direction when the conversion format specified by S1 is in decimal. The size of the area for storing ASCII codes specified by N exceeds the rated value when the conversion format specified by S1 is in hexadecimal. (Rated value for 16bit data: 4) (Rated value for 32bit data: 8) The No. of the converted data specified by N is 0. The converted result exceeds the area for storing ASCII codes specified by N. The converted result exceeds the area. The area specified using the index modifier exceeds the limit.

3 607
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

F251 (ATOB)

Availability

ASCII

Binary conversion

FPX/FP 32k/FP0R

Outline

Converts ASCII code to 16bit/32bit binary data.


Boolean Address 10 11 Instruction ST M DT DT DT R 0 D16 10 20 100

Program example
Ladder Diagram

Trigger R0
M

F251(ATOB)

10

F251 ATOB, D16, DT10, DT20, DT100 S1


S1 S2 N D

S2

Control string Starting 16bit area for storing ASCII codes Conversion method Starting 16bit area for storing binary data of converted result

Operands
Operand S1 S2 N D Relay WX WY WR WL A A A N/A A A A A A A A A A A A A Timer/Counter Register SV A A A A EV A A A A DT A A A A LD A A A A Index register IX A A A A IY A A A A Constant K N/A N/A A N/A H N/A N/A A N/A M A N/A N/A N/A Index modifier A A A A A: Available N/A: Not Available

Operation
Converts the ASCII codes stored in the area specified by S2 to binary data using the conversion method of N according to 4 control characters specified by S1. The converted result is stored in the area specified by D.

Specifying the various items


Specifying control strings and the meanings [S1] Ranges of treated data M D16 Converts decimal ASCII codes to 16bit data. 32,768 to +32767 M D32 Converts decimal ASCII codes to 32bit data. 2,147,483,648 to +2,147,483,647 M H+16 Converts hexadecimal ASCII codes to 16bit data. (Normal direction) 0 to FFFF M H+32 Converts hexadecimal ASCII codes to 32bit data. (Normal direction) 0 to FFFFFFFF M H16 Converts hexadecimal ASCII codes to 16bit data. (Reverse direction) 0 to FFFF M H32 Converts hexadecimal ASCII codes to 32bit data. (Reverse direction) 0 to FFFFFFFF *The details of the normal and reverse directions are described later. 3 608
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Specifying the conversion method [N] Example of converting the ASCII data string 123456789012 to decimal 3 digits x 4 data

R0 ( DF ) F251 ATOB,

D16, DT 10, H 413 , DT100 S2 , DT20, D

When converting by the above program:

About normal direction and reverse direction The conversions in the normal direction and reverse direction are available for hexadecimal ASCII data. Example of converting 0123456789ABCDEF.

3 609
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Conversion examples
Examples of converting to decimal 3 digits x 4 data (when no comma , exists) Converts to 16bit data. 123456789012 DT100 DT100 DT102 DT103 = = = = K K K K 123 456 789 12

When No. of numeric data is 4, Starting position for reading is 1, Digit No. of numeric data is 3.

R0 ( DF ) F251 ATOB,

M D16, DT10 , HDT20, , DT 100 D16, DT 10, 413 DT100

Examples of converting to hexadecimal 4 digits x 3 data Converts to 16bit data in normal direction. 001209AB000E DT100 = DT101 = DT102 = H 1200 H AB09 H 0E00

When No. of numeric data is 3, Starting position for reading is 1, Digit No. of numeric data is 4.

R0 ( DF ) F251 ATOB,

M H+16, DT10 , HDT20, , DT100 D16, DT 10, 314 DT 100

3 610
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

Example of converting to decimal number x 4 data (in case of commadeliminated , data) 12,345,6789,0, * The last of character strings is a comma. DT100 DT101 DT102 DT103 = = = = K K K K 12 345 6789 0

When No. of numeric data is 4, Starting position for reading is 1, Digit No. of numeric data is 4. (Converts to 16bit data) * Specify the maximum digit number.

R0 ( DF ) F251 ATOB,

M D16, DT10 , HDT20, , DT 100 D16, DT 10, 414 DT100

Example of converting to decimal 5 digits with a decimal point x 2 data (when no comma exists) 1234.50006.7 DT100 = DT101 = K K 12345 67

When No. of numeric data is 2, Starting position for reading is 0, Digit No. of numeric data is 6, and converting to 16bit data. *A decimal point is also counted as a digit.

R0 ( DF ) F251 ATOB,

M D16, DT10 , HDT20, , DT 100 D16, DT 10, 206 DT100

Example of converting to decimal number with a decimal point x 2 data (in case of commadeliminated , data) 1234.5,6.7, * The last of character strings is a comma. DT100 = DT101 = K K 12345 67

When No. of numeric data is 2, Starting position for reading is 0, Digit No. of numeric data is 6, and converting to 16bit data. *A decimal point is also counted as a digit.

R0 ( DF ) F251 ATOB,

M D16, DT10 , HDT20, , DT 100 D16, DT 10, 206 DT100

3 611
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Particular examples
If there is numeric data larger than the specified digit number between commas. (Example: Decimal number x 4, the digit number of the numeric data is 4) 1234,567890,12,345 K 1234 K 5678 K 90 K 12 K 345

The overflowed numbers become one numeric data. It is ignored.

If there is no value between commas (Example: Decimal number x 4) 123,456,,78 Operation error

If there is only a decimal point between commas (Example: Decimal number with a decimal point x 3) 1234.5,.,6.7 Operation error *If any number exists like 2. or .2, the data will be converted.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when Turns on for an instant when There is an error in the control string specified by S1. The direction of converted data is changed to the normal direction when the conversion format specified by S1 is in decimal. The size of the area for storing ASCII codes specified by N exceeds the rated value when the conversion format specified by S1 is in hexadecimal. (Rated value for 16bit data: 4) (Rated value for 32bit data: 8) Any code other than 0 to F, symbols, space, dot, comma exists in ASCII code specified by S2. The No. of the converted blocks specified by N is 0. The size of the area for storing ASCII codes specified by N is 0. The ASCII code to be converted exceeds the area. The converted result exceeds the area. The converted result exceeds the converted data scale specified by N. The area specified using the index modifier exceeds the limit.

3 612
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP/FPX/FP0R

Highlevel Instructions

F252 (ACHK)

Availability

ASCII data check

FPX (V2.00 or more) FP 32k/FP0R

Outline

Checks whether the specified ASCII data is correct or not.


Boolean Address 0 1 Instruction ST R 0 F252(ACHK) M D16 DT 10 DT 20 ST R 0 AN R 900B F251(ATOB) M DT DT DT D16 10 20 100

Program example
Ladder Diagram

R0 0 F252 ACHK,

M D16 , DT 10, DT20 S1 S2 N 1

R0 11 1

R900B

11 12 14

F251 ATOB,

D16, DT 10, DT20,

DT100

S1 S2 N

Control string data or 16bit are for storing control strings Starting 16bit area for storing ASCII code 16bit equivalent constant or 16bit area for storing conversion method

Operands
Relay Operand WX WY WR WL S1 S2 N (*1) I0 to ID A A A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register Index register In (*1) A A A Constant SWR SDT K A A A A A A N/A N/A A H N/A A M Index modifier A A A

N/A N/A A N/A

A: Available N/A: Not Available

Operation
Checks whether the ASCII codes stored in the area specified by S2 can be converted correctly or not using the conversion method of N according to 4 control characters specified by S1. Checks whether the character strings can be converted by F251 (ATOB) instruction. Checks data before converting the data by F251 (ATOB) instruction. If an error is found in the data, controls not to execute F251 (ATOB) instruction. Specify the same values for S1, S2 and N as F251 (ATOB) instruction. If the results are correct, the special internal relay (R900B) turns on. If the results are incorrect, the special internal relay (R900B) turns off.

Specifying the various items


The way to specify S1, S2 and N is the same as F251 (ATOB) instruction. Refer to the explanation described in F251 (ATOB) ASCII Binary conversion.

3 613
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FP/FPX/FP0R

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when Turns on for an instant when There is an error in the control string specified by S1. The direction of converted data is changed to the normal direction when the conversion format specified by S1 is in decimal. The size of the area for storing ASCII codes specified by N exceeds the rated value when the conversion format specified by S1 is in hexadecimal. (Rated value for 16bit data: 4) (Rated value for 32bit data: 8) The No. of the converted blocks specified by N is 0. The size of the area for storing ASCII codes specified by N is 0. The ASCII code to be converted exceeds the area. The area specified using the index modifier exceeds the limit.

3 614
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Overview of Character String Instructions F257 (SCMP) to F265 (SREP)


Configuration of character string instruction data tables
Data tables for character strings show the character string size, the number of characters, and the character data.
15 0 Character string size No. of characters Character 2 (Byte 1) Character 4 (Byte 3) Character 6 (Byte 5) Character 1 (Byte 0) Character 3 (Byte 2) Character 5 (Byte 4) S S+1 S+2 S+3 S+4

Max. number of characters that can be stored Number of characters stored in the character string

Character data

Higher 16 bits Lower 16 bits

Example: The example shows a character string data table specifying the following: Character string size: 10. Number of characters: 5. Character data: ABCDE.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 5 B D A C E

Higher Lower 16 bits 16 bits

3 615
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

How data tables are set


Specify the values for the character string size and number of characters. The F0 (MV) instruction is used to specify values. Specify the characters. The F95 (ASC) instruction is used to specify characters.

Example: The example shows (character string size 16 characters, no specification of characters) for DT0.
R0 F0(MV) , K16, DT0

Character string size

Example: The example shows a data table specifying the following for DT0: (character string size 20 characters, number of characters 12 characters, and character data ABCDEFGHIJKL).
R0 F0(MV), K20, DT0

Character string size (20 characters)


F0(MV), K12, DT1

Number of characters (12 characters)


F95 ASC, M ABCDEFGHIJKL, DT2

Character data

3 616
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F257 (SCMP) P257 (PSCMP)


Outline

Comparing character strings

These instructions compare two specified character strings and output the judgment results to a special internal relay.
With the FP0R/FP/FPX, the differential execution type instruction P257 (PSCMP) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F257 DT DT R 10 0 10

Trigger R10 F257 SCMP, DT 0, DT 10 S1


S1 S2

(SCMP)

10

S2

Character string 1 for comparison Character string 2 for comparison

Operands
Relay Operand WX WY WR WL S1 S2 A A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register I (*2) A A K N/A N/A Constant H N/A N/A f N/A N/A M N/A N/A Index modifier A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

Explanation of example
When internal relay R10 is on, data register DT1 and DT11 are compared. In this case, it is determined that S1 < S2, and R900C goes on.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 (Character string size) 4 (Number of characters) B A (Byte 1) (Byte 0) D C (Byte 3) (Byte 2) (Byte 5) (Byte 7) (Byte 9) Higher 16 bits (Byte 4) (Byte 6) (Byte 8) Lower 16 bits

DT10 DT11 DT12 DT13 DT14 DT15

8 (Character string size) 5 (Number of characters) B A (Byte 1) (Byte 0) D C (Byte 3) (Byte 2) E (Byte 5) (Byte 4) (Byte 7) Higher 16 bits (Byte 6) Lower 16 bits

3 617
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The character string specified for S1 is compared to that specified for S2, and the judgment result is output to special internal relays R9009 to R900C (judgment flags for comparison instructions). R9009 to R900C are assigned based on whether S1 or S2 is larger, as shown in the table below. Relationship of S1 and S2 Flag R900A > S1<S2 S1=S2 S1>S2 OFF OFF ON R900B = OFF ON OFF R900C < ON OFF OFF R9009 Carry Fluctuates OFF Fluctuates

Precautions during programming


If the number of characters is different, the greater/lesser relationship is as shown below. S1 ABCDE ABCD B Greater/lesser = < > S2 ABCDE ABCDE ABCDE

Comparison of character strings is performed in sequence from byte 0, one character at a time. If one character string has fewer characters than the other, it may still be handled as larger if a large character code is used when the comparison is made. Example: B > ABCDE To specify a character string, indicate the number of the area in which the character size and number of characters have been specified. see page 3 615. For detailed information about the table configuartion of data area

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified range is exceeded when an index is modified. The number of characters is larger than the character string size.

3 618
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F258 (SADD) P258 (PSADD)


Outline

Character string coupling

These instructions couple one character string with another.


With the FP0R/FP/FPX, the differential execution type instruction P258 (PSADD) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F258 DT DT DT R 10 0 10 20

Trigger R10 F258 SADD, DT 0, DT 10, DT 20 S1


S1 S2 D

(SADD)

10

S2

Character string to be coupled Character string to be coupled Area in which the coupled character strings are stored

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I (*2) A A A K N/A N/A N/A Constant H N/A N/A N/A f N/A N/A N/A M N/A N/A N/A Index modifier A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 619
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The character string specified for S1 is coupled to that specified for S2, and the result is stored in the character string specified by D. At the starting address of the area for storing results D, designate the character string size using the user program.

Explanation of example
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 5 B D A C E

DT10 DT11 DT12 DT13 DT14 DT15 DT16

10 3 2 1 3

Higher Lower 16 bits 16 bits


DT20 DT21 DT22 DT24

Higher Lower 16 bits 16 bits Designate with the user program

10 8 B A C E 2

DT23 D

1 DT25 3
DT26

Area where operation results are stored

Higher Lower 16 bits 16 bits

Precautions during programming


If the result of the coupling operation is larger than the character string size of D, only as many characters as will fit in D are stored.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The specified range is exceeded when an index is modified. The number of characters is larger than the character string size. Carry flag (R9009): Turns on for an instant when the operation result is larger than the character string size of D

3 620
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F259 (LEN) P259 (PLEN)


Outline

Number of characters in a character string

These instructions determine the number of characters in a character string.


With the FP0R/FP/FPX, the differential execution type instruction P259 (PLEN) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F259 DT DT R 10 (LEN) 0 100

Trigger R10 F259 LEN, DT 0, DT 100 S


S D

10

Character string Area in which the coupled character strings are stored

Operands
Relay Operand WX WY WR WL S D A A A A A A A A SV A A EV A A DT A A LD A A Timer/Counter Register FL (*1) A A Index register I (*2) A A K N/A N/A Constant H N/A N/A f N/A N/A M N/A N/A Index modifier A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 621
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
DT0 DT1

10 8 A C E 2 =
DT100

B D DT4 1 DT5 3
DT2 DT3 DT6

Higher Lower 16 bits 16 bits

Description
The number of characters in the character string specified by S is determined, and the result is stored in D.

Precautions during programming


If the number of characters is larger than the character size string, an operation error occurs.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified range is exceeded when an index is modified. The number of characters is larger than the character string size.

3 622
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F260 (SSRC) P260 (PSSRC)


Outline

Search for character string

These instructions search for a specified character string.


With the FP0R/FP/FPX, the differential execution type instruction P260 (PSSRC) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F260 DT DT DT R 10 0 10 120

Trigger R10 F260 SSRC, DT 0, DT 10, DT 120 S1


S1 S2 D

(SSRC)

10

S2

Area in which the character data to be searched is stored (character string or character constant) Character string to be searched Area in which the results of the search are stored

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I (*2) A A A K N/A N/A N/A Constant H N/A N/A N/A f N/A N/A N/A M N/A N/A N/A Index modifier A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 623
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The DT0 character is searched from the character string of DT10, and the result is stored in DT120.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

Characters for search 10 (Character string size) 3 (Number of characters) F E (Byte 1) (Byte 0) G (Byte 3) (Byte 2) (Byte 5) (Byte 7) (Byte 9) Higher 16 bits
DT120 DT121

DT10 DT11

Search

DT12 DT13 DT14 DT15 DT16

(Byte 4) (Byte 6) (Byte 8) Lower 16 bits 1 5

Table of found characters 10 (Character string size) 8 (Number of characters) B A (Byte 1) (Byte 0) D C (Byte 3) (Byte 2) F E (Byte 5) (Byte 4) G H (Byte 7) (Byte 6) (Byte 9) Higher 16 bits (Byte 8) Lower 16 bits

Number of matching character data Position of first matching data

Description
The character data specified by S1 is searched using the character string specified by S2. The number of characters that are the same, as resulting from the search, is stored in D, and the first detected relative position (byte unit) is stored in D + 1.

Precautions during programming


Specify a number of characters such that S1 is less than or equal to S2. For the number of characters S1 + 1 in the character string on the search side, designate the number of characters for performing search.
Example: 4 (Character string size) 1 (Number of characters) B D A C

When the number of characters is 1, the system searches the character A. When the number of characters is 2, the characters AB are searched as one unit.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified range is exceeded when an index is modified. The number of characters is larger than the character string size.

3 624
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F261 (RIGHT) P261 (PRIGHT)


Outline

Retrieving data from character strings (right side)

These instructions retrieve a specified number of characters from the right side of the character string.
With the FP0R/FP/FPX, the differential execution type instruction P261 (PRIGHT) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F261 DT K DT R 10 0 5 20

Trigger R10 F261 RIGHT, DT 0, K 5, DT 20 S1


S1 S2 D

(RIGHT)

10

S2

Character string Area in which the character string is stored, or constant data Area in which the results of the search are stored

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I (*2) A A A K N/A A N/A Constant H N/A A N/A f N/A N/A N/A M N/A N/A N/A Index modifier A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 625
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
A character is retrieved from the end of the character string of DT0, and is sent to DT20.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 8 B D 1 3 A C E 2

DT20 DT21 DT22 DT23 DT24 DT25 DT26

10 5 E 2 D 1 3

Designate with the user program

Area where operation results are stored

Higher Lower 16 bits 16 bits

Higher Lower 16 bits 16 bits

Description
The number of characters specified by S2 is searched starting from the right side (the end of the character data) of the character string specified by S1, and is sent to the character string specified by D. At the starting address of the area for storing results D, designate the character string size using the user program.

Precautions during programming


The character data from D prior to the operation is cleared. If the number of characters specified by S2 is larger than the number of characters in the character string specified by S1, the number of characters of the character string specified by S1 is sent. If the number of characters specified by S2 is larger than the size of the character string of D, data equal to the size of the character string specified by D is sent.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The specified range is exceeded when an index is modified. The number of characters is larger than the character string size. Carry flag (R9009): Turns on for an instant when the result of the operation is larger than the size of the character string specified by D.

3 626
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F262 (LEFT) P262 (PLEFT)


Outline

Retrieving data from character strings (left side)

These instructions retrieve a specified number of characters from the left side of the character string.
With the FP0R/FP/FPX, the differential execution type instruction P262 (PLEFT) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F262 DT K DT R 10 (LEFT) 0 5 20

Trigger R10 F262 LEFT, DT 0, K 5, DT 20 S1


S1 S2 D

10

S2

Character string Area in which the character string is stored, or constant data Area in which the character string is stored

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I (*2) A A A K N/A A N/A Constant H N/A A N/A f N/A N/A N/A M N/A N/A N/A Index modifier A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 627
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
A character is retrieved from the beginning of the character string of DT0, and is sent to DT20.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 8 B D 1 3 A C E 2

DT20 DT21 DT22 DT23 DT24 DT25 DT26

10 5 B D A C E

Designate with the user program

Area where operation results are stored

Higher Lower 16 bits 16 bits

Higher Lower 16 bits 16 bits

Description
The number of characters specified by S2 is searched starting from the left side (the beginning of the character data) of the character string specified by S1, and is sent to the character string specified by D. At the starting address of the area for storing results D, designate the character string size using the user program.

Precautions during programming


The character data from D prior to the operation is cleared. If the number of characters specified by S2 is larger than the number of characters in the character string specified by S1, the number of characters of the character string specified by S1 is sent. If the number of characters specified by S2 is larger than the size of the character string of D, data equal to the size of the character string specified by D is sent.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The specified range is exceeded when an index is modified. The number of characters is larger than the character string size. Carry flag (R9009): Turns on for an instant when the result of the operation is larger than the size of the character string specified by D.

3 628
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F263 (MIDR) P263 (PMIDR)


Outline

Retrieving a character string from a character string

These instructions retrieve a character string consisting of a specified number of characters from the specified position in the character string.
With the FP0R/FP/FPX, the differential execution type instruction P263 (PMIDR) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F263 DT K K DT R 10 (MIDR) 0 1 3 20

Trigger R10 F263 MIDR, DT 0, K 1, K 3, DT 20 S1


S1 S2 S3 D

10

S2 S3

Character string Area in which the character string position is stored, or constant data Area in which the number of characters is stored, or constant data Area in which the character string is stored

Operands
Relay Operand WX WY WR WL S1 S2 S3 D A A A N/A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A Timer/Counter Register FL (*1) A A A A Index register I (*2) A A A A K N/A A A N/A Constant H N/A A A N/A f N/A N/A N/A N/A M N/A N/A N/A N/A Index modifier A A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 629
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Three characters are retrieved from the position byte 1 (second character) of the character string of DT0, and are sent to DT20.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 8 B D 1 3 A C E 2

DT20 DT21 DT22 DT23 DT24 DT25 DT26

10 3 C B D

Designate with the user program

Area where operation results are stored

Higher Lower 16 bits 16 bits

Higher Lower 16 bits 16 bits

Description
The number of characters specified by S3 is retrieved starting from the position specified by S2 in the character string specified by S1, and is sent to the character string specified by D. At the starting address of the area for storing results D, designate the character string size using the user program.

Precautions during programming


The character data from D prior to the operation is cleared. If the number of characters specified by S3 is larger than the number of characters in the character string specified by S1 from the position specified by S2, the number of characters of the character string specified by S1 is sent. If the number of characters of the operation result is larger than the size of the character string of D, data equal to the size of the character string specified by D is sent. The position specified by S2 sets the least significant byte as K0 (byte 0), and the positions are counted in the order of 0, 1, 2, etc., starting from the least significant byte.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The specified range is exceeded when an index is modified. The number of characters is larger than the character string size The number of characters of S1 is larger than the number of characters of S2 Carry flag (R9009): Turns on for an instant when the result of the operation is larger than the size of the character string specified by D

3 630
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F264 (MIDW) P264 (PMIDW)


Outline

Writing a character string to a character string

These instructions write a specified number of characters from a character string to a specified position in the character string.
With the FP0R/FP/FPX, the differential execution type instruction P264 (PMIDW) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F264 DT K DT K R 10 0 3 20 1

Trigger R10 F264 MIDW, DT 0, K 3, DT 20, K 1 S1


S1 S2 D n

(MIDW)

10

S2

Character string Area in which the character string position is stored, or constant data Starting address of the area in which the character string is stored Area in which the position of the character string is stored, or constant data

Operands
Relay Operand WX WY WR WL S1 S2 D n A A N/A A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A Timer/Counter Register FL (*1) A A A A Index register I (*2) A A A A K N/A A A A Constant H N/A A N/A A f N/A N/A N/A N/A M A N/A N/A N/A Index modifier A A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 631
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
Three characters are retrieved from the character string of DT0, and are sent to the position byte 1 (second character) of the character string block of DT20.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 8 B D F H Higher 16 bits A C E G Lower 16 bits 10 8 2 (Byte 1) 4 (Byte 3) 6 (Byte 5) 8 (Byte 7) (Byte 9) Higher 16 bits 1 (Byte 0) 3 (Byte 2) 5 (Byte 4) 7 (Byte 6) (Byte 8) Lower 16 bits
DT24 DT25 DT26 DT20 DT21 DT22 DT23

10 3 A (Byte 1) C (Byte 3) 6 (Byte 5) 8 (Byte 7) (Byte 9) Higher 16 bits 1 (Byte 0) B (Byte 2) 5 (Byte 4) 7 (Byte 6) (Byte 8) Lower 16 bits

Designate with the user program

DT20 DT21 DT22 DT23 DT24 DT25 DT26

Area where operation results are stored

Description
The number of characters specified by S2 is retrieved from the character string specified by S1, and is sent to the n position of the character string specified by D.

Precautions during programming


The character data from D prior to the operation is not cleared (it is overwritten). If the number of characters specified by S2 is larger than the number of characters in the character string specified by S1, the number of characters of the character string specified by S1 is sent. If the position of n is larger than the number of characters of the character string of D, an operation error occurs. If the number of characters in the operation result is larger than the size of the character string in D, then replacement is done only within a range the size of the character string in D. The position specified by n sets the least significant byte as K0 (byte 0), and the positions are counted in the order of 0, 1, 2, etc., starting from the least significant byte.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified range is exceeded when an index is modified. The number of characters is larger than the character string size The number of characters of D is larger than the number of characters of n Carry flag (R9009): Turns on for an instant when the result of the operation is larger than the size of the character string specified by D

3 632
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F265 (SREP) P265 (PSREP)


Outline

Replacing character strings

These instructions replace a specified number of characters in a character string with the same number of different characters, starting from a specified position.
With the FP0R/FP/FPX, the differential execution type instruction P265 (PSREP) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F265 DT DT K K R 10 0 20 1 3

Trigger R10 F265 SREP, DT 0, DT 20, K 1, K 3 S


S D p n

(SREP)

10

Replacement character string Starting address of the area in which the character string is stored Area storing the head byte position of the character to be replaced, or constant data Area storing the number of characters to be replaced from the source data, or constant data

Operands
Relay Operand WX WY WR WL S D P n A N/A A A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A Timer/Counter Register FL (*1) A A A A Index register I (*2) A A A A K N/A N/A A A Constant H N/A N/A A A f N/A N/A N/A N/A M A N/A N/A N/A Index modifier A A A A

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

A: Available N/A: Not Available

3 633
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of example
The DT0 character string is replaced with the number of characters in DT1 (5 characters) from byte p=1 in DT20. In this case, n=3 characters of the data stored in the source are deleted in the replacement.
DT0 DT1 DT2 DT3 DT4 DT5 DT6

10 8 B D F H Higher 16 bits A C E G Lower 16 bits 10 8 2 (Byte 1) 4 (Byte 3) 6 (Byte 5) 8 (Byte 7) (Byte 9) Higher 16 bits 1 (Byte 0) 3 (Byte 2) 5 (Byte 4) 7 (Byte 6) (Byte 8) Lower 16 bits
DT24 DT25 DT26 DT20 DT21 DT22 DT23

10 8 A (Byte 1) C (Byte 3) 6 (Byte 5) 8 (Byte 7) (Byte 9) Higher 16 bits 1 (Byte 0) B (Byte 2) 5 (Byte 4) 7 (Byte 6) (Byte 8) Lower 16 bits

Designate with the user program

DT20 DT21 DT22 DT23 DT24 DT25 DT26

Area where operation results are stored

Description
The character string specified by S replaces the character string specified by D, for the number of characters specified by n, starting from the position specified by P.

Precautions during programming


The character data from D prior to the operation is not cleared (it is overwritten). If the number of characters in n is larger than the number of characters in the character string S subsequent to the point designated with p, replacement is done for the number of characters in the character string S subsequent to the point designated with p. If the position specified by p is larger than the number of characters in the character string specified by n, an operation error occurs. The position specified by p sets the least significant byte as K0 (byte 0), and the positions are counted in the order of 0, 1, 2, etc., starting from the least significant byte.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when:

The specified range is exceeded when an index is modified. The number of characters is larger than the character string size The number of characters of D is larger than the number of characters of n Carry flag (R9009): Turns on for an instant when the result of the operation is larger than the size of the character string specified by D 3 634
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F270 (MAX) P270(PMAX)


Outline

Maximum value search in 16-bit data table

Searches for a maximum value in a table of 16-bit areas. For the FP0R/FP/FPX, the P type highlevel instruction P270 (PMAX) is not available.
Boolean Address 10 11 Instruction ST F270 DT DT DT R 0 (MAX) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F270 MAX, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Starting 16-bit area of data table Ending 16-bit area of data table Lower 16-bit area of 32-bit data for storing maximum value and relative address

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
This instruction searches for the maximum value in the 16-bit data table between the area selected with S1 and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored in D+1. 16-bit data table
S1: S1+1: 0 1 2 3 4 D: D+1:

Maximum value Relative address

S2:

Relative address

If there are several values which are a maximum value, the relative address of the first value found searching from S1 is stored in D+1.

3 635
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precaution during programming


Even if D+1 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different.

3 636
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F271 (DMAX) P271(PDMAX)


Outline

Maximum value search in 32-bit data table

Searches for a maximum value in a table of 32-bit areas. For the FP0R/FP/FPX, the P type highlevel instruction P271 (PDMAX) is not available.
Boolean Address 10 11 Instruction ST F271 DT DT DT R 0 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F271 DMAX, DT10, S1


S1 S2 D

(DMAX)

DT20, S2

DT30 D

Starting 16-bit area of 32-bit data table Ending 16-bit area of double word (32-bit) Starting 16-bit area for storing maximum value and relative address (3 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
This instruction searches for the maximum value in the double word data table between the area selected with S1 and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored in D+2. Double word data table
S1: S1+2: S1+3:

Lower word

0 1

D: D+2:

Lower word

S1+1: Higher word

D+1: Higher word

Maximum value Relative address

S2: Lower word S2+1: Higher word

Relative address

3 637
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table
S1: S1+1: S1+2: S1+3:

Lower word 0 Higher word


1

D: D+1: D+2:

Lower word Higher word

Maximum value Relative address

S21:

Lower word

S2: Higher word

Relative address

If there are several values which are a maximum value, the relative address of the first value found searching from S1 is stored in D+2.

Precaution during programming


Even if D+2 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different.

3 638
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F272 (MIN) P272 (PMIN)


Outline

Minimum value search in 16-bit data table

Searches for a minimum value in a table of 16-bit areas. For the FP0R/FP/FPX, the P type highlevel instruction P272 (PMIN) is not available.
Boolean Address 10 11 Instruction ST F272 DT DT DT R 0 (MIN) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F272 MIN, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Starting 16-bit area of data table Ending 16-bit area of data table Starting 16-bit area for storing minimum value and relative address (2 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
This instruction searches for the minimum value in the 16-bit data table between the area selected with S1 and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored in D+1. Word data table
S1: S1+1: 0 1 2 3 4 D: D+1:

Minimum value Relative address

S2:

Relative address If there are several values which are a minimum value, the relative address of the first value found searching from S1 is stored in D+1.

3 639
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precaution during programming


Even if D+1 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different.

3 640
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F273 (DMIN) Minimum value search in 32-bit data table P273 (PDMIN)
Outline Searches for a minimum value in a table of 32-bit areas. For the FP0R/FP/FPX, the P type highlevel instruction P273 (PDMIN) is not available.
Boolean Address 10 11 Instruction ST F273 DT DT DT R 0 (DMIN) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F273 DMIN, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Starting 16-bit area of 32-bit data table Ending 16-bit area of double word (32-bit) Starting 16-bit area for storing minimum value and relative address (3 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
This instruction searches for the minimum value in the double word data table between the area selected with S1 and the area selected with S2, and stores it in the area selected with D. The address relative to S1 is stored in D+2. Double word data table
S1: S1+2: S1+3:

Lower word

0 1

D: D+2:

Lower word

S1+1: Higher word

D+1: Higher word

Minimum value Relative address

S2: Lower word S2+1: Higher word

Relative address

3 641
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table
S1: S1+1: S1+2: S1+3:

Lower word 0 Higher word


1

D: D+1: D+2:

Lower word Higher word

Minimum value Relative address

S21:

Lower word

S2: Higher word

Relative address

If there are several values which are a minimum value, the relative address of the first value found searching from S1 is stored in D+2.

Precaution during programming


Even if D+2 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different.

3 642
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F275 (MEAN) P275(PMEAN)


Outline

Total and mean numbers calculation in 16-bit data table

Calculates the total and mean numbers in the specified word data table. For the FP0R/FP/FPX, the P type highlevel instruction P275 (PMEAN) is not available.
Boolean Address 10 11 Instruction ST F275 DT DT DT X 10 10 20 30

Program example
Ladder Diagram

Trigger R10 10 F275 MEAN, DT10, S1


S1 S2 D

(MEAN)

DT20, S2

DT30 D

Starting 16-bit area of data table Ending 16-bit area of data table Starting 16-bit for storing total and mean numbers (3 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
The total value and the average value of the word data (signed) from the area selected with S1 to the area selected with S2 are obtained and stored in the area selected with D.
15 D D+1 D+2 0

Total (32 bits) Mean (16 bits)

Decimals of the average value are rounded off so that the average value is an integer.

3 643
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precaution during programming


Even if D+2 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. Carry flag (R9009): Turns on for an instant when overflows/underflows while calculating.

3 644
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F276 (DMEAN) Total and mean numbers calculation in 32-bit data table P276(PDMEAN)
Outline Calculates the total and mean numbers in the specified double word data table. For the FP0R/FP/FPX, the P type highlevel instruction P276 (PDMEAN) is not available.
Boolean Address 10 11 Instruction ST F276 DT DT DT R 0 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F276 DMEAN, DT10, DT20, DT30 S1


S1 S2 D

(DMEAN)

S2

Starting 16-bit area of 32-bit data table Ending 16-bit area of double word (32-bit) Starting 16-bit area for storing total and mean numbers (5 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
The total value and the average value of the double word data (signed) from the area selected with S1 to the area selected with S2 are obtained and stored in the area selected with D.
15 D D+1 D+2 D+3 D+4 D+5 0

Total (64 bits)

Mean (32 bits)

3 645
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table
S1: S1+2: S1+3:

Lower word 0
1

S1+1: Higher word

Specified areas
Lower word n

S21:

S2: Higher word

Decimals of the average value are rounded off so that the average value is an integer.

Precaution during programming


Even if D + 5 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. Carry flag (R9009): Turns on for an instant when overflows/underflows while calculating.

3 646
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F277 (SORT) Sort data in 16-bit data table P277 (PSORT) (in smaller or larger number order)
Outline Sorts a string of data words. For the FP0R/FP/FPX, the P type highlevel instruction P277 (PSORT) is not available.
Boolean Address 10 11 Instruction ST F277 DT DT K R 0 (SORT) 10 19 0

Program example
Ladder Diagram

Trigger R0 10 F277 SORT, DT10, S1


S1 S2 S3

DT19, S2

K0 S3

Starting 16-bit area of sort data Ending 16-bit area of sort data Constant or area where sort condition is stored.

Operands
Operand S1 S2 S3 N/A N/A A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A A A N/A

A: Available N/A: Not Available

Explanation of example
When the S3 is K0 (ascending order)
DT10 11 12 13 14 15 16 17 18 19 K300 K10 K3 K1 K1000 K30 K100 K30 K1 K3 DT10 11 12 13 14 15 16 17 18 19 K30 K3 K1 K1 K3 K10 K30 K100 K300 K1000

When the S3 is K1 (descending order)


DT10 11 12 13 14 15 16 17 18 19 K300 K10 K3 K1 K1000 K30 K100 K30 K1 K3 DT10 11 12 13 14 15 16 17 18 19 K1000 K300 K100 K30 K10 K3 K1 K1 K3 K30

3 647
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The data words (signed) from the area specified by S1 to the area specified by S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first) depending on the condition set with S3. If S1 = S2, sorting does not take place. The sort condition is specified as follows in S3: K0: Ascending order K1: Descending order Double sorting is used for the sorting method. Data is sorted from S1 to S2 in order following the sorting procedure. Note that the number of word comparisons increases in proportion to the square of the number of words, thus more time will be required for execution when there are a large number of words.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different.

3 648
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F278 (DSORT) Sort data in 32-bit data table P278 (PDSORT) (in smaller or larger number order)
Outline Sorts a string of data double words. For the FP0R/FP/FPX, the P type highlevel instruction P278 (PDSORT) is not available.
Boolean Address 10 11 Instruction ST F278 DT DT K R 0 10 19 0

Program example
Ladder Diagram

Trigger R0 10 F278 DSORT, DT10, S1


S1 S2 S3

(DSORT)

DT19, S2

K0 S3

Starting 16-bit area of sort data (2 words) Ending 16-bit area of sort data (2 words) Constant or area where sort condition is stored.

Operands
Operand S1 S2 S3 N/A N/A A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A A A N/A

A: Available N/A: Not Available

Explanation of example
When the S3 is K0 (ascending order)
DT10, 11 12, 13 14, 15 16, 17 18, 19 K25000 K4000 K1500 K2600 K100000 DT10, 11 12, 13 14, 15 16, 17 18, 19 K4000 K2600 K1500 K25000 K100000

When the S3 is K1 (descending order)


DT10, 11 12, 13 14, 15 16, 17 18, 19 K25000 K4000 K1500 K2600 K100000 DT10, 11 12, 13 14, 15 16, 17 18, 19 K100000 K25000 K1500 K2600 K4000

3 649
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The double data words (signed) from the area specified by S1 to the area specified by S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first) depending on the condition set with S3. If S1 = S2, sorting does not take place. The sort condition is specified as follows in S3: K0: Ascending order K1: Descending order Double sorting is used for the sorting method. Data is sorted from S1 to S2 in order following the sorting procedure. Note that the number of word comparisons increases in proportion to the square of the number of words, thus more time will be required for execution when there are a large number of words. If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table
S1: S1+2: S1+3:

Lower word 0
1

S1+1: Higher word

Specified areas

S21:

Lower word n S2: Higher word

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different.

3 650
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F282 (SCAL) P282 (PSCAL)


Outline

Scaling of 16bit data

The output value Y is found for the input value X by performing scaling for the given data table.
With the FP0R/FP/FPX, the differential execution type instruction P282 (PSCAL) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F282 DT DT DT R 10 (SCAL) 0 10 120

Trigger R10 F282 SCAL, DT 0, DT 10, DT 120 S


S1 S2 D

10

S2

16bit data of the source corresponding to the input value X, or area storing data Starting address of data table used for scaling (linearization) Area where output result Y is stored

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I (*2) A A A K A N/A N/A Constant H A N/A N/A f N/A N/A N/A Index modifier A A A A: Available N/A: Not Available

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

Explanation of example
The output value Y for the input value X stored in DT0 is found by accessing the data table starting from DT10, and the result is stored in DT120.

3 651
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The output value for the input value X is found by performing scaling according to the data table, where the 16bit data designated in S1 is designated in S2. The number n of items in the data table is determined by the value n designated for the head S2 of the data table.
Configuration of the data table used for scaling When S2 = DT10 and n = K10

S2: S2+1: S2+2: S2+3: S2+n1: S2+n: S2+n+1: S2+n+2: S2+n+3: S2+2n1: S2+2n:
Output value

n x1 x2 x3 xn1 xn y1 y2 y3 yn1 yn

DT10 DT11 DT12 DT13 DT19 DT20 DT21 DT22 DT23 DT29 DT30

(x4,y4)

(xn1,yn1)

(xn,yn)

Y=D (x3,y3) (x2,y2) X=S1

(x1,y1)

Input value

Precautions during programming


Make xt greater than xt1. xt and yt should be created as 16bit data to indicate which line is specified. If X(S1) is a value smaller than x1, the value of Y(D) will be the value of y1. If X(S1) is larger than xn, Y(D) will be the value of yn. The maximum value of n is 99.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified range is exceeded when an index is modified. The n specified by S2 is smaller than 2, or if the n is larger than 99 The data table specified by S2 exceeds the available area Xn are not in ascending order

3 652
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F283 (DSCAL) Scaling of 32bit data P283 (PDSCAL)


Outline The output value Y is found for the input value X by performing scaling for the given data table.
With the FP0R/FP/FPX, the differential execution type instruction P283 (PDSCAL) cannot be specified.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F283 DT DT DT R 10 0 10 120

Trigger R10 F283 DSCAL, DT 0, DT 10, DT 120 S


S1 S2 D

(DSCAL)

10

S2

32bit data of the source corresponding to the input value X, or area storing data Starting address of data table used for scaling (linearization) Area where output result Y is stored

Operands
Relay Operand WX WY WR WL S1 S2 D A A N/A A A A A A A A A A SV A A A EV A A A DT A A A LD A A A Timer/Counter Register FL (*1) A A A Index register I (*2) A A A K A N/A N/A Constant H A N/A N/A f N/A N/A N/A Index modifier A A A A: Available N/A: Not Available

(*1) Cannot be specified with FP0R, FP and FPX. (*2) I0 to ID

Explanation of example
The output value Y for the input value X stored in DT0 is found by accessing the data table starting from DT10, and the result is stored in DT120 and DT121.

3 653
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The output value for the input value X is found by performing scaling according to the data table, where the 32bit data designated in S1 is designated in S2. The number n of items in the data table is determined by the value n designated for the head S2 of the data table.
Configuration of the data table used for scaling When S2 = DT10 and n = K10

S2: S2+1: S2+2: S2+3: S2+4: S2+2n1: S2+2n: S2+2n+1: S2+2n+2: S2+2n+3: S2+2n+4: S2+4n1: S2+4n:
Output value

n+1 x1 x2

DT10 DT11 DT12 DT13 DT14 DT29 DT30 DT31 DT32 DT33 DT34 DT49 DT50

xn y1 y2

yn

(x4,y4)

(xn1,yn1)

(xn,yn)

Y=D (x3,y3) (x2,y2) X=S1

(x1,y1)

Input value

Precautions during programming


Make xt greater than xt1. xt and yt should be created as 32bit data to indicate which line is specified. If X(S1) is a value smaller than x1, the value of Y(D) will be the value of y1. If X(S1) is larger than xn, Y(D) will be the value of yn. The maximum value of n is 99.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The specified range is exceeded when an index is modified. The n specified by S2 is smaller than 2, or if the n is larger than 99 The data table specified by S2 exceeds the available area Xn are not in ascending order

3 654
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FPe

Highlevel Instructions

Availability

F284 (RAMP)
Outline

Inclination output of 16bit data

FPX V2.0 or more FP V3.10 or more FP0R

Executes the linear output according to the elapsed time from the start by performing scaling with the output initial value, target value and time range.
Boolean Address 10 11 Instruction ST F284 DT DT DT DT R 0 0 1 2 10

Program example
Ladder Diagram

Trigger R0 F284 RAMP, DT0, DT 1, DT2, DT10 S1


S1 S2 S3 D

(RAMP)

10

S2

S3

16bit equivalent constant or 16bit area for storing initial values 16bit equivalent constant or 16bit area for storing target values 16bit equivalent constant or 16bit area for storing time range Area where output result is stored

Operands
Relay Operand WX WY WR WL S1 S2 S3 N (*1) I0 to ID A A A N/A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A Timer/Counter Register Index register In (*1) A A A A Constant SWR SDT K A A A N/A A A A N/A A A A N/A H A A A N/A Index modifier A A A A A: Available N/A: Not Available

Operation
Executes the linear output according to the elapsed time from the start by performing scaling with the 16bit output initial value specified by S1, the 16bit output target value specified by S2 and the 16bit output time range (ms unit) specified by S3.

Precautions during programming


Max. 1 scan time error in the output time range occurs occasionally.

3 655
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

FPe

Explanation of example
When specifying each value as below by the program:

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: the area specified using the index modifier exceeds the limit. the output time range specified by S3 is smaller than k1 or larger than k30000.

3 656
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F285 (LIMT) P285 (PLIMT)


Outline

16-bit data upper and lower limit control

This instruction carries out upper and lower limit control for 16-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P285 (PLIMT) is not available.
Boolean Address 10 11 Instruction ST F285 DT DT DT DT R 0 (LIMT) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F285 LIMT, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

The area where the lower limit is stored or the lower limit data. The area where the upper limit is stored or the upper limit data. The area where the input value is stored or the input value data. The area where the output value is stored

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

3 657
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The 16-bit output value stored in the area specified by D is controlled based on whether or not the 16-bit input value specified by S3 falls within the range bounded by the upper and lower limits set in S2 and S1. The output value is determined based on the following conditions: When the lower limit S1 is greater than the input value S3, the lower limit value S1 is stored in D as the output value. When the upper limit S2 is less than the input value S3, the upper limit value S2 is stored in D as the output value. When Lower limit S1 Input value S3 Upper limit S2, the input value S3 is stored in D as the output value. Output value D Lower limit S1
[S2]

Input value S3 Upper limit S2

[S1]

To perform upper limit control only, set K32768 (or H8000) for the lower limit S1. To perform lower limit control only, set K32767 (or H7FFF) for the upper limit S2.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. Turns on when the result of processing is between the upper and lower limits.

3 658
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F286 (DLIMT) 32-bit data upper and lower limit control P286 (PDLIMT)
Outline This instruction carries out upper and lower limit control for 32-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P286 (PDLIMT) is not available.
Boolean Address 10 11 Instruction ST F286 DT DT DT DT R 0 (DLIMT) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F286 DLIMT, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

The area where the lower limit is stored or the lower limit data. (2 words) The area where the upper limit is stored or the upper limit data. (2 words) The area where the input value is stored or the input value data. (2 words) The area where the output value is stored. (2 words)

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

3 659
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The output value (double words data) stored in the area specified by D is controlled based on whether or not the input value (double words data) specified by S3 falls within the range bounded by the upper and lower limits set in S2 and S1. The output value is determined based on the following conditions: When the lower limits S1+1 and S1 are greater than the input value S3+1 and S3, the lower limit value S1+1 and S1 are stored in D+1 and D as the output value. When the upper limits S2+1 and S2 are less than the input value S3+1 and S3, the upper limit value S2+1 and S2 are stored in D+1 and D as the output value. When Lower limit S1+1 and S1 Input value S3+1 and S3 Upper limit S2+1 and S2, the input value S3+1 and S3 are stored in D+1 and D as the output value. Output value D+1 and D (S2+1, S2) Lower limit S1+1 and S1 Input value S3+1 and S3 Upper limit S2+1 and S2 (S1+1, S1)

To perform upper limit control only, set K2147483648 (or H80000000) for the lower limit S1+1 and S1. To perform lower limit control only, set K2147483647 (or H7FFFFFFF) for the upper limit S2+1 and S2.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. Turns on when the result of processing is between the upper and lower limits.

3 660
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F287 (BAND) 16-bit data deadband control P287 (PBAND)


Outline This instruction carries out dead-band control for 16-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P287 (PBAND) is not available.
Boolean Address 10 11 Instruction ST F287 DT DT DT DT R 0 (BAND) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F287 BAND, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

The area where the lower limit is stored or the lower limit data. The area where the upper limit is stored or the upper limit data. The area where the input value is stored or the input value data. The area where the output value is stored

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
When the DT10 is K100 and DT20 is K100.
Value of DT30 K300 K200 Value of DT40 K200 K100 K0 K100 K200

K100 to K100 K200 K300

3 661
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The output value (word data) stored in the area specified by D is controlled based on whether or not the input value (word data) specified by S3 falls within the dead-band bounded by the upper and lower limits set in S1 and S2. The output value is determined based on the following conditions: When the lower limit S1 is greater than the input value S3, the input value S3 minus the lower limit value S1 is stored in D as the output value. When the upper limit S2 is less than the input value S3, the input value S3 minus the upper limit value S2 is stored in D as the output value. When Lower limit S1 Input value S3 Upper limit S2, zero is stored in D as the output value. Output value D

Lower limit of deadband S1


0

Input value S3 Upper limit of deadband S2

In this range, zero is output.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. Carry flag (R9009): Turns on for an instant when the calculated result is overflowed or underflowed. = flag (R900B): Turns on when the input value is recognized as 0.

3 662
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F288 (DBAND) 32-bit data deadband control P288 (PDBAND)


Outline This instruction carries out dead-band control for 32-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P288 (PDBAND) is not available.
Boolean Address 10 11 Instruction ST F288 DT DT DT DT R 0 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F288 DBAND, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

(DBAND)

S2

S3

The area where the lower limit is stored or the lower limit data. (2 words) The area where the upper limit is stored or the upper limit data. (2 words) The area where the input value is stored or the input value data. (2 words) The area where the output value is stored. (2 words)

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
When DT10 and DT11 is K10000and DT20 and DT21 is K10000.
Value of DT30 and DT31 K30000 K20000 K10000 to K10000 K20000 K30000 Value of DT40 and DT41 K20000 K10000 K0 K10000 K20000

3 663
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The output value (double word data) stored in the area specified by D is controlled based on whether or not the input value (double word data) specified by S3 falls within the dead-band bounded by the upper and lower limits set in S1 and S2. The output value is determined based on the following conditions: When the lower limit S1+1 and S1 are greater than the input value S3+1 and S3, the input value S3+1 and S3 minus the lower limit value S1+1 and S1 are stored in D+1 and D as the output value. When the upper limit S2+1 and S2 are less than the input value S3+1 and S3, the input value S3+1 and S3 minus the upper limit value S2+1 and S2 are stored in D+1 and D as the output value. When Lower limit S1+1 and S1 and D as the output value. Input value S3+1 and S3 Upper limit S2+1 and S2, zero is stored in D+1

Output value D+1 and D

Lower limit of deadband S1+1 and S1


0

Input value S3+1 and S3 Upper limit of deadband S2+1 and S2

In this range, zero is output.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. Carry flag (R9009): Turns on for an instant when the calculated result is overflowed or underflowed. = flag (R900B): Turns on when the input value is recognized as 0.

3 664
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F289 (ZONE) 16-bit data zone control P289 (PZONE)


Outline This instruction carries out zone control for 16-bit data. For the FP0R/FP/FPX, the P type highlevel instruction P289 (PZONE) is not available.
Boolean Address 10 11 Instruction ST F289 DT DT DT DT R 0 (ZONE) 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F289 ZONE, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

Area where negative bias value is stored or negative bias value data Area where positive bias value is stored or positive bias value data Area where input value is stored or input value data Area where output value is stored

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
When the DT10 is K100 and DT20 is K100.
Value of DT30 K300 K200 K100 K0 K100 K200 K300 Value of DT40 K400 K300 K200 K0 K200 K300 K400

3 665
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The bias value specified by S1 or S2 is added to the input value (word data) specified by S3, and the output value is stored in the area specified by D. The output value is determined by the following conditions: When the input value S3 is less than zero, the input value S3 plus the negative bias value S1 is stored in D as the output value. When the input value S3 equals zero, zero is stored in D as the output value. When the input value S3 is greater than zero, the input value S3 plus the positive bias value S2 is stored in D as the output value. Output value D
Positive bias value S2

Input value S3
Negative bias value S1

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Turns on for an instant when the calculated result is overflowed or underflowed. = flag (R900B): Turns on for an instant when the input value S3 is recognized as 0.

3 666
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F290 (DZONE) 32-bit data zone control P290 (PDZONE)


Outline This instruction carries out zone control for 32-bit data. (double words) For the FP0R/FP/FPX, the P type highlevel Instruction P290 (PDZONE) is not available.
Boolean Address 10 11 Instruction ST F290 DT DT DT DT R 0 10 20 30 40

Program example
Ladder Diagram

Trigger R0 10 F290 DZONE, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

(DZONE)

S2

S3

Area where negative bias value is stored or negative bias value data (double words) Area where positive bias value is stored or positive bias value data (double words) Area where input value is stored or input value data (double words) Area (double words) where output value is stored

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f N/A N/A N/A Index Integer modifier device A A A A N/A N/A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
When the DT10 and DT11 is K10000 and the DT20 and DT21 is K10000.
Value of DT30 and DT31 Value of DT40 and DT41 K40000 K30000 K20000 K10000 K0 K10000 K20000 K30000 K30000 K20000 K0 K20000 K30000 K40000

3 667
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The bias value specified by S1 or S2 is added to the input value (double word data) specified by S3, and the output value is stored in the area specified by D. The output value is determined by the following conditions: When the input value S3+1 and S3 are less than zero, the input value S3+1 and S3 plus the negative bias value S1+1 and S1 are stored in D+1 and D as the output value. When the input value S3+1 and S3 equals zero, zero is stored in D+1 and D as the output value. When the input value S3+1 and S3 is greater than zero, the input value S3+1 and S3 plus the positive bias value S2+1 and S2 are stored in D+1 and D as the output value. Output value D+1 and D
Positive bias value S2+1 and S2

Input value S3+1 and S3


Negative bias value S1+1 and S1

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Turns on for an instant when the calculated result is overflowed or underflowed. = flag (R900B): Turns on for an instant when the input value S3 is recognized as 0.

3 668
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F300 (BSIN) P300 (PBSIN)


Outline

BCD type Sine operation

Triangle functions, calculates trigonometric functions and the sine [SIN( )] of BCD code angular data, and stores it as BCD.
Boolean Address 10 11 Instruction ST F300 DT DT R 0 (BSIN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F300 BSIN, DT10, S


S D

DT20 D

Area where angle data is stored or angle data Starting 16-bit area where calculated result is stored (3 words)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Calculates the SIN ( ) of the angle 45 degrees.
DT10:

H45

DT20: DT21: DT22:

H0 H0 H7071 H270

Calculates the SIN ( ) of the angle 270 degrees.


DT10:

DT20: DT21: DT22:

H1 H1 H0

3 669
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The SIN([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the 3-word area beginning at D. SIN[S] [D] [D+1]. [D+2] D: Sign D+1: Integer value D+2: Decimal Select a BCD value for S within the range 0 to 360 in units of 1 degree. Be sure to specify the value using BCD H data. The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative. The result of processing stored in D+1 and D+2 is a BCD value within the range 1.0000 to 1.0000. The decimal stored in D+2 is rounded off to four digits.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data specified in S is not BCD value. If data specified in S is not within 0 to 360. Turns on when result of processing is recognized as 0.

3 670
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F301 (BCOS) BCD type Cosine operation P301(PBCOS)


Outline Triangle functions, calculates trigonometric functions and the cosine [COS ( )] of BCD code angular data, and stores it as BCD.
Boolean Address 10 11 Instruction ST F301 DT DT R 0 (BCOS) 10 20

Program example
Ladder Diagram

Trigger R0 10 F301 BCOS, DT10, S


S D

DT20 D

Area where angle data is stored or angle data Starting 16-bit area where calculated result is stored (3 words)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Calculates the COS ( ) of the angle 30 degrees.
DT10:

H30

DT20: DT21: DT22:

H0 H0 H8660 H135

Calculates the COS ( ) of the angle 135 degrees.


DT10:

DT20: DT21: DT22:

H1 H1 H7071

3 671
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The COS([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the 3-word area beginning at D. COS[S] [D] [D+1]. [D+2] D: Sign D+1: Integer value D+2: Decimal Select a BCD value for S within the range 0 to 360 in units of 1 degree. Be sure to specify the value using BCD H data. The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative. The result of processing stored in D+1 and D+2 is a BCD value within the range 1.0000 to 1.0000. The decimal stored in D+2 is rounded off to four digits.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data specified in S is not BCD value. If data specified in S is not within 0 to 360. Turns on when result of processing is recognized as 0.

= flag (R900B):

3 672
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F302 (BTAN) P302 (PBTAN)


Outline

BCD type Tangent operation

Triangle functions, calculates trigonometric functions and the tangent [TAN ( )] of BCD code angular data, and stores it as BCD.
Boolean Address 10 11 Instruction ST F302 DT DT R 0 (BTAN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F302 BTAN, DT10, S


S D

DT20 D

Area where angle data is stored or angle data Starting 16-bit area where calculated result is stored (3 words)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Calculates the TAN ( ) of the angle 60 degrees.
DT10:

H60

DT20: DT21: DT22:

H0 H1 H7321 H135

Calculates the TAN ( ) of the angle 135 degrees.


DT10:

DT20: DT21: DT22:

H1 H1 H0

3 673
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The TAN([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the 3-word area beginning at D. TAN[S] [D] [D+1]. [D+2] D: Sign D+1: Integer value D+2: Decimal Select a BCD value for S within the range 0 to 360 in units of 1 degree. Be sure to specify the value using BCD H data. The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative. The result of processing stored in D+1 and D+2 is a BCD value within the range 57.2900 to 57.2900. The decimal stored in D+2 is rounded off to four digits.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data specified in S is not BCD value. If data specified in S is not within 0 to 360. If data specified in S is 90 to 270. Turns on when result of processing is recognized as 0.

= flag (R900B):

3 674
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F303 (BASIN) BCD type Arcsine operation P303 (PBASIN)


Outline Triangle functions, This instruction calculates arcsine [SIN1 ( )].
Boolean Address 10 11 Instruction ST F303 DT DT R 0 (BASIN) 20 10

Program example
Ladder Diagram

Trigger R0 10 F303 BASIN, DT20, S


S D

DT10 D

Starting 16-bit area where angle data is stored or angle data (3 words) Area where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Calculates the arc SIN of the value 0.7071.
DT20: DT21: DT22:

H0 H0 H7071

DT10:

H45

Calculates the arc SIN of the value 0.5.


DT20: DT21: DT22:

H1 H0 H5000

DT10:

H330

3 675
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

SIN1 (the arcsine) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored in D. SIN1 ([S] [S+1]. [S+2]) [D] S: Sign S+1: Integer value S+2: Decimal Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is negative. Set the integer and decimal parts of the data each within a range of 0 to 1.0000 in S+1 and S+2. The result of the calculation will be stored in D as a BCD value within the range 0 to 90 or 270 to 360 (in degrees).

Description

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data specified in S+2, S+1 and S are not BCD value. If data specified in S+2, S+1 and S are not within 1.0000 to 1.0000. Turns on when result of processing is recognized as 0.

3 676
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F304 (BACOS) P304 (PBACOS)


Outline Program example

BCD type Arccosine operation

Triangle functions, This instruction calculates arccosine [COS1 ( )].


Boolean Address 10 11 Instruction ST F304 DT DT R 0 20 10

Ladder Diagram

Trigger R0 10 F304 BACOS, DT20, S


S D

(BACOS)

DT10 D

Starting 16-bit area where angle data is stored or angle data (3 words) Area where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Calculates the arc COS of the value 0.8660.
DT20: DT21: DT22:

H0 H0 H8660

DT10:

H30

Calculates the arc COS of the value 0.5.


DT20: DT21: DT22:

H1 H0 H5000

DT10:

H120

3 677
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description

COS1 (the arccosine) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored in D. COS1 ([S][S+1]. [S+2]) [D] S: Sign S+1: Integer value S+2: Decimal Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is negative. Set the integer and decimal parts of the data each within a range of 0 to 1.0000 in S+1 and S+2. The result of the calculation will be stored in D as a BCD value within the range 0 to 180 (in degrees).

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data specified in S+2, S+1 and S are not BCD value. If data specified in S+2, S+1 and S are not within 1.0000 to 1.0000. Turns on when result of processing is recognized as 0.

= flag (R900B):

3 678
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F305 (BATAN) P305 (PBATAN)


Outline Program example

BCD type Arctangent operation

Triangle functions, This instruction calculates arctangent [TAN1 ( )].


Boolean Address 10 11 Instruction ST F305 DT DT R 0 20 10

Ladder Diagram

Trigger R0 10 F305 BATAN, DT20, S


S D

(BATAN)

DT10 D

Starting 16-bit area where angle data is stored or angle data (3 words) Area where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
Calculates the arc TAN of the value 1.7321.
DT20: DT21: DT22:

H0 H0 H7321

DT10:

H60

Calculates the arc TAN of the value 1.


DT20: DT21: DT22:

H1 H1 H0

DT10:

H315

3 679
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

TAN1 (the arctangent) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored in D. TAN1 ([S][S+1]. [S+2]) [D] S: Sign S+1: Integer value S+2: Decimal Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is negative. Set the integer and decimal parts of the data each within a range of 0 to 9999.9999 in S+1 and S+2. The result of the calculation will be stored in D as a BCD value within the range 0 to 90 or 270 to 360 (in degrees).

Description

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data specified in S+2, S+1 and S are not BCD value. Turns on when result of processing is recognized as 0.

3 680
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F309 (FMV) P309 (PFMV)


Outline

Floating point data move

Copies floating point data (32 bits) to the specified 32-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P309 (PFMV) is not available.
Boolean Address 10 11 Instruction ST F309 f DT R 0 (FMV) 1.234 10

Program example
Ladder Diagram

Trigger R0 10 F309 FMV, f 1.234, DT10 S


S D

Floating point data (32 bits) or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 32-bit area (destination)

Operands
Operand S D Relay WX WY WR WL N/A N/A N/A N/A N/A A A A Timer/Counter SV N/A A EV N/A A Register DT LD FL Index register I N/A A K Constant H f A Index Integer modifier device N/A A N/A N/A

N/A N/A N/A A A A

N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
The floating point data f 1.234 are copied to data registers DT11 and DT10 when trigger R0 turns on.
DT10: DT11: (f1.234)

3 681
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The floating point data (32 bits) specified by S is copied to the 32-bit area specified by D when the trigger turns on. Floating point data

Real number data


DT: D+1:

15

Lower word Higher word

Range of real number data which can be set are as follows: Positive: f0.0000001 to f9999999 Negative: f9999999 to f0.000001

Precaution during programming


For FP0, this instruction F309 (FMV) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 682
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F310 (F+) P310 (PF+)


Outline

Floating point data addition

Adds two real number data items and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P310 (PF+) is not available.
Boolean Address 10 11 Instruction ST F310 DT DT DT R 0 (F+) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F310 F+, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Real number data (2 words) or lower 16-bit area of 32-bit data (for augend) Real number data (2 words) or lower 16-bit area of 32-bit data (for addend) Lower 16-bit area of 32-bit data (for result)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f A A Index Integer modifier device A* A* A A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The real number data (2 words) specified by S1 and S2 are added together when the trigger turns on. The added result is stored in D+1 and D. [S1+1, S1] + [S2+1, S2] [D+1, D] Specifying the integer device with [S1] and[S2], the integer data is internally converted to real numbers before operations continue.
R0 F310 F+, % DT 0, % DT 2, DT 4

3 683
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F310 F+, DT 0, DT 2, % DT 4

When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Program example
The f4.554 is stored to DT30 and DT31 when the R0 turns on.
R0 F310 F+, f1.414, f3.14, DT30

The f135.795 is stored to DT30 and DT31 when the R0 turns on.
R0 F309 FMV, f12.345 DT10 F309 FMV, f12.345, DT20 F310 F+, DT10, DT20, DT30

Precaution during programming


For FP0, this instruction F310 (F+) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1 and S1 and S2+1 and S2. If result of processing is outside integer range when integer device is specified in D+1 and D. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 684
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F311 (F) P311 (PF)


Outline

Floating point data subtraction

Subtracts real nuumber data from the minuend and stores the result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P311 (PF) is not available.
Boolean Address 10 11 Instruction ST F311 DT DT DT R 0 (F) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F311 F, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Real number data (2 words) or lower 16-bit area of 32-bit data (for minuend) Real number data (2 words) or lower 16-bit area of 32-bit data (for subtrahend) Lower 16-bit area of 32-bit data (for result)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f A A Index Integer modifier device A* A* A A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
Subtracts the real number data (2 words) specified by S2 from the real number data (32-bit) specified by S1 when the trigger turns on. The subtracted result is stored in D+1 and D. [S1+1, S1] [S2+1, S2] [D+1, D] Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue.
R0 F311 F, % DT 0, % DT 2, DT 4

3 685
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F311 F, DT 0, DT 2, % DT 4

When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Program example
The f0.445 is stored to DT30 and DT31 when the R0 turns on.
R0 F311 F, f1, f0.555, DT30

The f100.15 is stored to DT30 and DT31 when the R0 turns on.
R0 F309 FMV, f100.1, DT10 F309 FMV, f0.05, DT20 F311 F, DT10, DT20, DT30

Precaution during programming


For FP0, this instruction F311 (F) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1 and S1 and S2+1 and S2. If result of processing is outside integer range when integer device is specified in D+1 and D. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 686
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F312 (F*) P312 (PF*)


Outline

Floating point data multiplication

Multiplies two real number data items and stores the result in the specified 32-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instructions are not available.
Boolean Address 10 11 Instruction ST F312 DT DT DT R 0 (F*) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F312 F*, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplicand) Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 32-bit data (for result)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f A A Index Integer modifier device A* A* A A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
Multiplies the real number data (2 words) specified by S1 and the one specified by S2 when the trigger turns on. The multiplied result is stored in D+1 and D (32-bit area). [S1+1, S1] [S2+1, S2] [D+1, D] Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue.
R0 F312 F*, % DT 0, % DT 2, DT 4

3 687
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F312 F*, DT 0, DT 2, % DT 4

When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Program example
The f123.4000 is stored to DT30 and DT31 when the R0 turns on.
R0 F312 F*, f1.234, f100, DT30

Precaution during programming


For FP, this instruction F312 (F*) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1 and S1 and S2+1 and S2. If result of processing is outside integer range when integer device is specified in D+1 and D. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 688
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F313 (F%) P313 (PF%)


Outline

Floating point data division

Divides real number data by the divisor and stores the divided result in the specified 32-bit area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P313 (PF%) is not available.
Boolean Address 10 11 Instruction ST F313 DT DT DT R 0 (F%) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F313 F%, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Real number data (2 words) or lower 16-bit area of 32-bit data (for dividend) Real number data (2 words) or lower 16-bit area of 32-bit data (for divisor) Lower 16-bit area of 32-bit data (for result)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f A A Index Integer modifier device A* A* A A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The real number data (2 words) specified by S1 is divided by the real number data (2 words) specified by S2 when the trigger turns on. The result is stored in D+1 and D. [S1+1, S1] [S2+1, S2] [D+1, D] Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue.
R0 F313 F%, % DT 0, % DT 2, DT4

3 689
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F313 F%, DT 0, DT 2, % DT 4

When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Program example
The f5.432100 is stored to DT30 and DT31 when the R0 turns on.
R0 F312 F%, f54.321, f10, DT30

Precaution during programming


For FP, this instruction F313 (F%) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1 and S1 and S2+1 and S2. If result of processing is outside integer range when integer device is specified in D+1 and D. The real number data (floating point data) for the divisor specified by S2 is 0.0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 690
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F314 (SIN) P314 (PSIN)


Outline

Floating point data Sine operation

Triangle functions, This instruction calculates sine [SIN ( )]. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P314 (PSIN) is not available.
Boolean Address 10 11 Instruction ST F314 DT DT R 0 (SIN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F314 SIN, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The SIN([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result stored in D+1 and D. SIN ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F314 SIN, % DT 0, DT 4

3 691
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F314 SIN, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

Program example
The f0.4999999 is stored to DT20 and DT21 when the R0 turns on.
R0

Radians of 30 deg.
F314 SIN, f0.5235987, DT20

Precautions during programming


The accuracy of the calculation decreases as the absolute value of the angle data specified in S+1 and S increases. We recommend that angle data be set within the following range: 2 (radians) [S+1, S] 2 (radians) For FP0, this instruction F314 (SIN) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. If result of processing is outside integer range when integer device is specified in D+1 and D. Absolute value of S+1 and S is 52707176 or greater. Carry flag (R9009): Turns on for an instant when the result is overflowed. = flag (R900B): Turns on when result of processing is recognized as 0.

3 692
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F315 (COS) P315 (PCOS)


Outline

Floating point data Cosine operation

Triangle functions, This instruction calculates cosine [COS ( )]. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P315 (PCOS) is not available.
Boolean Address 10 11 Instruction ST F315 DT DT R 0 (COS) 10 20

Program example
Ladder Diagram

Trigger R0 10 F315 COS, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The COS ([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result stored in D+1 and D. COS ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F315 COS, % DT 0, DT 4

3 693
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F315 COS, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

Program example
The f0.7071068 is stored to DT20 and DT21 when the R0 turns on. Radians of 45
R0 F315 COS, f0.7853981, DT20

Precautions during programming


The accuracy of the calculation decreases as the absolute value of the angle data specified in S and S+1 increases. We recommend that angle data be set within the following range: 2 (radians) [S+1, S] 2 (radians) For FP0, this instruction F315 (COS) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. If result of processing is outside integer range when integer device is specified in D+1 and D. Absolute value of S+1 and S is 52707176 or greater. Carry flag (R9009): Turns on for an instant when the result is overflowed. = flag (R900B): Turns on when result of processing is recognized as 0.

3 694
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F316 (TAN) P316 (PTAN)


Outline

Floating point data Tangent operation

Triangle functions, This instruction calculates tangent [TAN ( )]. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P316 (PTAN) is not available.
Boolean Address 10 11 Instruction ST F316 DT DT R 0 (TAN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F316 TAN, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The TAN([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result stored in D+1 and D. TAN ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F316 TAN, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F316 TAN, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 695
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f1.732048 is stored to DT20 and DT22 when the R0 turns on. Radians of 60
R0 F316 TAN, f1.047197, DT20

Precautions during programming


The accuracy of the calculation decreases as the absolute value of the angle data specified in S+1 and S increases. We recommend that angle data be set within the following range: 2 (radians) [S+1, S] 2 (radians) For FP0, this instruction F316 (TAN) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. If result of processing is outside integer range when integer device is specified in D+1 and D. Absolute value of S+1 and S is 52707176 or greater. Carry flag (R9009): Turns on for an instant when the result is overflowed. = flag (R900B): Turns on when result of processing is recognized as 0.

3 696
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F317 (ASIN) P317 (PASIN)


Outline

Floating point data Arcsine operation

Triangle functions, This instruction calculates arcsine [SIN1 ( )]. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P317 (PASIN) is not available.
Boolean Address 10 11 Instruction ST F317 DT DT R 0 (ASIN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F317 ASIN, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
SIN of the value specified in S+1 and S is calculated, and the result [an angle (radians)] is stored in D+1 and D. SIN1 ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F317 ASIN, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F317 ASIN, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 697
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f0.5235986 (radians of 30 degrees) is stored to DT20 and DT21 when the R0 turns on.
R0 F317 ASIN, f0.4999999, DT20

Precautions during programming


D+1 and D is stored within the following range: /2 (radians) [D+1, D] /2 (radians) For FP0, this instruction F317 (ASIN) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. S+1 and S is not within the range 1.0 [S+1, S] 1.0

If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 698
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F318 (ACOS) Floating point data Arccosine operation P318 (PACOS)


Outline Triangle functions, This instruction calculates arccosine [COS1 ( )]. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P318 (PACOS) is not available.
Boolean Address 10 11 Instruction ST DT DT R 0 10 20

Program example
Ladder Diagram

Trigger R0 10 F318 ACOS, DT10, S


S D

F318 (ACOS)

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
COS of the value specified in S+1 and S is calculated, and the result [an angle data (units and radians)] is stored in D+1 and D. COS1 ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F318 ACOS, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F318 ACOS, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 699
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f0.7853980 (radians of 45 degrees) is stored to DT20 and DT21 when the R0 turns on.
R0 F318 ACOS, f0.7071069, DT20

Precautions during programming


D+1 and D is stored within the following range: 0.0 (radians) [D+1, D] (radians) For FP0, this instruction F318 (ACOS) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. S+1 and S is not within the range 1.0 [S+1, S] 1.0

If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 700
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F319 (ATAN) P319 (PATAN)


Outline

Floating point data Arctangent operation

Triangle functions, This instruction calculates arctangent [TAN1 ( )]. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P319 (PATAN) is not available.
Boolean Address 10 11 Instruction ST F319 DT DT R 0 (ATAN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F319 ATAN, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description

TAN1 (the arctangent) of the value specified in S+1 and S is calculated, and the result [an angle data (units and radians)] is stored in D+1 and D. TAN1 ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F319 ATAN, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F319 ATAN, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 701
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f1.047197 (radians of 60 degres) is stored to DT20 and DT21 when the R0 turns on.
R0 F319 ATAN, f1.73205, DT20

Precautions during programming


D+1 and D is stored within the following range: /2 (radians) < [D+1, D] < /2 (radians) For FP0, this instruction F319 (ATAN) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 702
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F320 (LN) P320 (PLN)


Outline

Floating point data natural logarithm

This instruction calculates a natural logarithm LN( ). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P320 (PLN) is not available.
Boolean Address 10 11 Instruction ST F320 DT DT R 0 (LN) 10 20

Program example
Ladder Diagram

Trigger R0 10 F320 LN, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The natural logarithm LN(S+1 and S) is calculated of the data specified in S+1 and S, and the result is stored in D+1 and D. LN ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F320 LN, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F320 LN, DT 0, % DT 4

3 703
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f1.6094379 is stored to DT20 and DT21 when the R0 turns on.
R0 F320 LN, K 5, DT20

The f0.3160815 is stored to DT30 and DT31 when the R0 turns on.
R0 F320 LN, f0.729, DT30

Precaution during programming


For FP0, this instruction F320 (LN) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The S+1 and S is not greater than zero. If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 704
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F321 (EXP) P321 (PEXP)


Outline

Floating point data exponent

This instruction calculates the exponent of a floating point real number EXP( ). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P321 (PEXP) is not available.
Boolean Address 10 11 Instruction ST F321 DT DT R 0 (EXP) 10 20

Program example
Ladder Diagram

Trigger R0 10 F321 EXP, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The exponent EXP(S+1 and S) is calculated from the real number data specified in S+1 and S, and the result is stored in D+1 and D. EXP ([S+1, S]) [D+1, D] The calculation is performed with the exponent base (e) equal to 2.718282. Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F321 EXP, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F321 EXP, DT 0, % DT 4

3 705
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f7.389056 is stored to DT20 and DT21 when the R0 turns on.
R0 F321 EXP, K 2, DT20

The f221.406402 is stored to DT30 and DT31 when the R0 turns on.
R0 F321 EXP, f5.4, DT30

Precaution during programming


For FP0, this instruction F321 (EXP) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 706
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F322 (LOG) P322 (PLOG)


Outline

Floating point data logarithm

This instruction calculates the logarithm of a floating point real number LOG( ). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P322 (PLOG) is not available.
Boolean Address 10 11 Instruction ST F322 DT DT R 0 (LOG) 10 20

Program example
Ladder Diagram

Trigger R0 10 F322 LOG, DT10, S


S D

DT20 D

Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The logarithm LOG(S+1 and S) is calculated of the data specified in S+1 and S, and the result is stored in D+1 and D. LOG ([S+1, S]) [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F322 LOG, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F322 LOG, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 707
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f1.30103 is stored to DT20 and DT21 when the R0 turns on.
R0 F322 LOG, K20, DT20

The f0.0108932 is stored to DT30 and DT31 when the R0 turns on.
R0 F322 LOG, f1.0254, DT30

Precaution during programming


For FP0, this instruction F322 (LOG) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The S+1 and S is not greater than zero. If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 708
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F323 (PWR) P323 (PPWR)


Outline

Floating point data power

This instruction raises a floating point real number to the specified power. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P323 (PPWR) is not available.
Boolean Address 10 11 Instruction ST F323 DT DT DT R 0 (PWR) 10 20 30

Program example
Ladder Diagram

Trigger R0 10 F323 PWR, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplicand) Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 32-bit data (for result)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A Constant H A A f A A Index Integer modifier device A* A* A A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The real number data specified by S1+1 and S1 is raised to the power specified by the real number data of S2+1 and S2, and the result is stored in D+1 and D. [S1+1, S] ^ [S2+1, S2] [D+1, D] Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue.
R0 F323 PWR, % DT 0, % DT 2, DT 4

3 709
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F323 PWR, DT 0, DT 2, % DT4

When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

Program example
The f625.0 is stored to DT20 and DT21 when the R0 turns on.
R0 F323 PWR, K 5, K 4, DT20

The f30.51758 is stored to DT30 and DT31 when the R0 turns on.
R0 F323 PWR, f3.125, K 3, DT30

Precaution during programming


For FP0, this instruction F323 (PWR) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1 and S1 and S2+1 and S2. The power of negative number data is not an integer If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 710
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F324 (FSQR) Floating point data square root P324 (PFSQR)


Outline Takes the square root of the specified real number data and stores result in the specified area. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P324 (PFSQR) is not available.
Boolean Address 10 11 Instruction ST F324 DT DT R 0 (FSQR) 10 20

Program example
Ladder Diagram

Trigger R0 10 F324 FSQR, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit area for storing data to be calculated Lower 16-bit area of 32-bit area for storing the calculated result

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Description
The square root of real number data specified by S is calculated and stored in the 32-bit area specified by D. [S1+1, S] [D+1, D] Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F324 FSQR, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F324 FSQR, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 711
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f1.41421 is stored to DT20 and DT21 when the R0 turns on.
R0 F324 FSQR, K 2, DT20

Precaution during programming


For FP0, this instruction F324 (FSQR) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The S+1 and S is not greater than zero. If result of processing is outside integer range when integer device is specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 712
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F325 (FLT) P325 (PFLT)


Outline

16-bit integer data Floating point real number data

Converts 16-bit integer data to floating point real number data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P325 (PFLT) is not available.
Boolean Address 10 11 Instruction ST F325 DT DT R 0 (FLT) 10 20

Program example
Ladder Diagram

Trigger R0 10 F325 FLT, DT10, S


S D

DT20 D

16-bit integer data or 16-bit area for storing integer data (source) Lower 16-bit area of floating point real number data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A A A

N/A N/A N/A

A: Available N/A: Not Available

Description
Converts the 16-bit integer data with sign specified by S to real number data when the trigger turns on. The converted data is stored in D. Signed 16-bit integer data
15 0

S:

Floating point real number data D: D+1:

15

Lower word Higher word

Precaution during programming


For FP0, this instruction F325 (FLT) cannot be programmed in the interrupt program.

3 713
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008): =lag (R900B):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the converted data is recognized as 0.

3 714
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F326 (DFLT) P326 (PDFLT)


Outline

32-bit integer data Floating point real number data

Converts 32-bit integer data to floating point real number data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P326 (PDFLT) is not available.
Boolean Address 10 11 Instruction ST F326 DT DT R 0 (DFLT) 10 20

Program example
Ladder Diagram

Trigger R0 10 F326 DFLT, DT10, S


S D

DT20 D

32-bit integer data or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 32-bit data floating point real number (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f N/A Index Integer modifier device A A N/A N/A

N/A N/A N/A

A: Available N/A: Not Available

Description
Converts the 32-bit integer data with sign specified by S to real number data when the trigger turns on. The converted data is stored in D+1 and D. 32-bit integer data with sign
15 0

S: S+1:

Lower word Higher word

Floating point real number data

D: D+1:

15

Lower word Higher word

Precaution during programming


For FP0, this instruction F326 (DFLT) cannot be programmed in the interrupt program.

3 715
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. = flag (R900B): Turns on for an instant when the converted data is recognized as 0. Carry flag (R9009): There are too many significant digits in mantissa of converted real number data.

3 716
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F327 (INT) P327 (PINT)


Outline

Floating point real number data 16-bit integer data (largest integer not exceeding the floating point real number data)

Converts real number data to 16-bit integer data (the largest integer not exceeding the floating point real number data). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P327 (PINT) is not available.
Boolean Address 10 11 Instruction ST F327 DT DT R 0 (INT) 10 20

Program example
Ladder Diagram

Trigger R0 10 F327 INT, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) 16-bit area for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 1.234 is in DT10 and DT11, as shown below. DT10: DT11: (f1.234)

DT20: DT10: DT11:

(K1)

When the real number data 1.234 is in DT10 and DT11, as shown below. (f1.234)

DT20:

(K2) 3 717

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts real number data range: (+32767.99 to 32767.99) specified by S to signed 16-bit integer data (the largest integer not exceeding the floating point data) when the trigger turns on. The converted data is stored in D. Real number data
15 0

S: S+1:

Lower word Higher word

Signed 16-bit integer data

15

D:

Precaution during programming


For FP0, this instruction F327 (INT) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The converted data exceeds the range of 16-bit integer data. Turns on for an instant when the converted data is recognized as 0.

= flag (R900B):

3 718
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F328 (DINT) P328 (PDINT)


Outline

Floating point real number data 32-bit integer data (largest integer not exceeding the floating point real number data)

Converts real number data to 32-bit integer data (the largest integer not exceeding the floating point real number data). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P328 (PDINT) is not available.
Boolean Address 10 11 Instruction ST F328 DT DT R 0 (DINT) 10 20

Program example
Ladder Diagram

Trigger R0 10 F328 DINT, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 12345.67 is in DT10 and DT11, as shown below. DT10: DT11: (f12345.67)

DT20: DT21:

(K12345)

When the real number data 12345.67 is in DT10 and DT11, as shown below. DT10: DT11: (f12345.67)

DT20: DT21:

(K12346)

3 719
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts real number data (range: +2147483000 to 2147483000) specified by S+1 and S to signed 32-bit integer data (the largest integer not exceeding the floating point data) when the trigger turns on. The converted data is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Signed 32-bit integer data

D: D+1:

Lower word Higher word

Precaution during programming


For FP0, this instruction F328 (DINT) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The converted data exceeds the range of 32-bit integer data. Turns on for an instant when the converted data is recognized as 0.

= flag (R900B):

3 720
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F329 (FIX) P329 (PFIX)


Outline

Floating point real number data 16-bit integer data (rounding the first decimal point down to integer)

Converts real number data to 16-bit integer data (rounding the first decimal point down to integer). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P329 (PFIX) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F329 DT DT R 0 (FIX) 10 20

Trigger R0 10 F329 FIX, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 1.234567 is in DT10 and DT11, as shown below. DT10: DT11: (f1.234567)

DT20:

(K1)

When the real number data 1.234567 is in DT10 and DT11, as shown below. DT10: DT11: (f1.234567)

DT20:

(K1)

3 721
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts real number data (range: 32767.99 to 32768.99) specified by S to signed 16-bit integer data (rounding the first decimal point down to integer) when the trigger turns on. The converted data is stored in D. Real number data
15 0

S: S+1:

Lower word Higher word

Signed 16-bit integer data

15

D:

Precaution during programming


For FP0, this instruction F329 (FIX) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The converted data exceeds the range of 16-bit integer data. Turns on for an instant when the converted data is recognized as 0.

3 722
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F330 (DFIX) P330 (PDFIX)


Outline

Floating point real number data 32-bit integer data (rounding the first decimal point down to integer)

Converts real number data to 32-bit integer data (rounding the first decimal point down to integer). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P330 (PDFIX) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F330 DT DT R 0 (DFIX) 10 20

Trigger R0 10 F330 DFIX, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 123456.7 is in DT10 and DT11, as shown below. DT10: DT11: (f123456.7)

DT20: DT21:

(K123456)

When the real number data 123456.7 is in DT10 and DT11, as shown below. DT10: DT11: (f123456.7)

DT20: DT21:

(K123456)

3 723
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts real number data (range: 2,147,483,000 to 2,147,483,000) specified by S+1 and S to signed 32-bit integer data (rounding the first decimal point down to integer) when the trigger turns on. The converted data is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Signed 32-bit integer data

D: D+1:

Lower word Higher word

Precaution during programming


For FP0, this instruction F330 (DFIX) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The converted data exceeds the range of 32-bit integer data. Turns on for an instant when the converted data is recognized as 0.

= flag (R900B):

3 724
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F331 (ROFF) P331 (PROFF)


Outline

Floating point real number data 16-bit integer data (rounding the first decimal point off to integer)

Converts real number data to 16-bit integer data (rounding the first decimal point off to integer). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P331 (PROFF) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F331 DT DT R 0 (ROFF) 10 20

Trigger R0 10 F331 ROFF, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) 16-bit area for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20:

(K1235)

When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20:

(K1235)

3 725
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts real number data (range: +32767.49 to 32768.49) specified by S to signed 16-bit integer data (rounding the first decimal point off to integer) when the trigger turns on. The converted data is stored in D. Real number data
15 0

S: S+1:

Lower word Higher word

Signed 16-bit integer data

15

D:

Precaution during programming


For FP0, this instruction F331 (ROFF) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The converted data exceeds the range of 16-bit integer data. Turns on for an instant when the converted data is recognized as 0.

3 726
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F332 (DROFF) P332 (PDROFF)


Outline

Floating point real number data 32-bit integer data (rounding the first decimal point off to integer)

Converts real number data to 32-bit integer data (rounding the first decimal point off to integer). For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P332 (PDROFF) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F332 DT DT R 0 10 20

Trigger R0 10 F332 DROFF, DT10, S


S D

(DROFF)

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 45678.51 is in DT10 and DT11, as shown below. DT10: DT11: (f45678.51)

DT20: DT21:

(K45679)

When the real number data 45678.51 is in DT10 and DT11, as shown below. DT10: DT11: (f45678.51)

DT20: DT21:

(K45679)

3 727
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Converts real number data (range: 2,147,483,000 to 2,147,483,000) specified by S+1 and S to signed 32-bit integer data (rounding the first decimal point off to integer) when the trigger turns on. The converted data is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Signed 32-bit integer data

D: D+1:

Lower word Higher word

Precaution during programming


For FP0, this instruction F332 (DROFF) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. The converted data exceeds the range of 32-bit integer data. Turns on for an instant when the converted data is recognized as 0.

3 728
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F333 (FINT) P333 (PFINT)


Outline

Floating point real number data rounding the first decimal point down

This instruction rounds down the decimal part of real number data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P333 (PFINT) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F333 DT DT R 0 (FINT) 10 20

Trigger R0 10 F333 FINT, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20: DT21:

(f1234.000)

When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20: DT21:

(f1235.000)

3 729
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The decimal part of the real number data specified in S+1 and S is rounded down, and the result is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Real number data

D: D+1:

Lower word Higher word

Precaution during programming


For FP0, this instruction F333 (FINT) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 730
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F334 (FRINT) P334 (PFRINT)


Outline

Floating point real number data rounding the first decimal point off

This instruction rounds off the decimal part of real number data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P334 (PFRINT) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F334 DT DT R 0 (FRINT) 10 20

Trigger R0 10 F334 FRINT, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K N/A Constant H A f A Index Integer modifier device A* A N/A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20: DT21:

(f1235.000)

When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20: DT21:

(f1235.000)

3 731
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The decimal part of the real number data stored in S+1 and S is rounded off, and the result is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Real number data

D: D+1:

Lower word Higher word

Precaution during programming


For FP0, this instruction F334 (FRINT) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 732
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F335 (F+/) P335 (PF+/)


Outline

Floating point real number data sign changes (negative/positive conversion)

This instruction changes the sign of real number data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P335 (PF+/) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F335 DT DT R 0 (F+/) 10 20

Trigger R0 10 F335 F+/, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Explanation of example
When the real number data 60000.00 is in DT10 and DT11, as shown below. DT10: DT11: (f60000.00)

DT20: DT21:

(f60000.00)

When the real number data 30000.00 is in DT10 and DT11, as shown below. DT10: DT11: (f30000.00)

DT20: DT21:

(f30000.00)

3 733
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The real number data stored in S+1 and S is changed sign bit, and the result is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Real number data

D: D+1:

Lower word Higher word

Precaution during programming


For FP0, this instruction F335 (F+/) cannot be programmed in the interrupt program.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 734
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F336 (FABS) P336 (PFABS)


Outline

Floating point real number data absolute

Takes absolute value of real number data. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P336 (PFABS) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F336 DT DT R 0 (FABS) 10 20

Trigger R0 10 F336 FABS, DT10, S


S D

DT20 D

Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination)

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A N/A

N/A N/A N/A

A: Available N/A: Not Available

* Index modification of a real number is not possible.

Explanation of example
When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20: DT21:

(f1234.567)

When the real number data 1234.567 is in DT10 and DT11, as shown below. DT10: DT11: (f1234.567)

DT20: DT21:

(f1234.567)

3 735
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
Takes the absolute value of real number data specified by S when the trigger turns on. The result (absolute value) is stored in D+1 and D. Real number data
15 0

S: S+1:
15

Lower word Higher word


0

Real number data

D: D+1:

Lower word Higher word

Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in [S], the operations are the same as when a integer device is specified.

Precaution during programming


For FP0, this instruction F336 (FABS) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 736
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F337 (RAD) P337 (PRAD)


Outline

Floating point real number data conversion of angle units (Degrees Radians)

This instruction converts the units of an angle from degrees to radians. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P337 (PRAD) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F337 DT DT R 0 (RAD) 10 20

Trigger R0 10 F337 RAD, DT10, S


S D

DT20 D

Angle data (degrees) (2 words) or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing converted data

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A N/A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Description
The data in degrees of an angle specified in S+1 and S is converted to radians (real number data) and the result is stored in D+1 and D. Angle data (degrees) (Real number data)
15 0

S: S+1:
15

Lower word Higher word


0

Angle data (radians) (Real number data)

D: D+1:

Lower word Higher word

Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S, the operations are the same as when a integer device is specified.

3 737
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
The f0.7853981 is stored to DT20 and DT21 when the R0 turns on.
R0 F337 RAD, f45, DT20

Precaution during programming


For FP0, this instruction F337 (RAD) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 738
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F338 (DEG) P338 (PDEG)


Outline

Floating point real number data conversion of angle units (Radians Degrees)

Converts the units of an angle from radians to degrees. For the FP0R/FP/FPX/FP0/FPe, the P type highlevel instruction P338 (PDEG) is not available. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F338 DT DT R 0 (DEG) 10 20

Trigger R0 10 F338 DEG, DT10, S


S D

DT20 D

Angle data (radians) (2 words) or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing converted data

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A Constant H A f A Index Integer modifier device A* A A A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Description
The angle data in radians (real number data) specified in S+1 and S is converted to angle data in degrees and the result is stored in D+1 and D. Angle data (radians) (Real number data)
15 0

S: S+1:
15

Lower word Higher word


0

Angle data (degrees) (Real number data)

D: D+1:

Lower word Higher word

3 739
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
R0 F338 DEG, % DT 0, DT 4

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F338 DEG, DT 0, % DT 4

When the constant K is specified in S, the operations are the same as when a integer device is specified.

Program example
The f30.00000 is stored to DT20 and DT21 when the R0 turns on.
R0 F338 DEG, f0.5235987, DT20

Precautions during programming


When the constant or integer device is specified in S, the integer device cannot be set in D. For FP0, this instruction F338 (DEG) cannot be programmed in the interrupt program.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S+1 and S. If result of processing is outside integer range when integer device specified in D+1 and D. = flag (R900B): Turns on when result of processing is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 740
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F345 (FCMP) Floating point real number data comparison P345 (PFCMP)
Outline Compares one real number data (floating point data) item with another. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST DT DT R 0 10 20

Trigger R0 10 F345 FCMP, DT10, S1


S1 S2

F345 (FCMP)

DT20 S2

Real number data (2 words) or lower 16-bit area of 32-bit data to be compared Real number data (2 words) or lower 16-bit area of 32-bit data to be compared

Operands
Operand S1 S2 A A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K A A Constant H A A f A A A: Index Integer modifier device A* A* A A

Available

* Index modification of a real number is not possible.

Description
Compares the real number data (floating point data) specified by S1 with that specified by S2 when the trigger turns on. The comparison result is stored in special internal relays R9009, and R900A to R900C. The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag (R900C), depending on the relative sizes of (S1+1, S1) and (S2+1, S2). Flag Comparison between R900A R900B R900C R9009 (S1+1, S1) and (S2+1, S2) (> flag) (= flag) (< flag) (carry flag) (S1+1, S1) < (S2+1, S2) off off on (S1+1, S1) = (S2+1, S2) off off on off (S1+1, S1) > (S2+1, S2) on off off : turns on or off according to the conditions Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified.

3 741
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data are specified in (S1+1, S1) and (S2+1, S2).

3 742
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F346 (FWIN) P346 (PFWIN)


Outline

Floating point real number data band comparison

Compares one real number data item with the data band specified by two other real number data items. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F346 DT DT DT R 0 (FWIN) 10 20 30

Trigger R0 10 F346 FWIN, DT10, S1


S1 S2 S3

DT20, S2

DT30 S3

Real number data (2 words) or lower 16-bit area of 32-bit data to be compared Real number data (2 words) or lower 16-bit area of 32-bit data for lower limit Real number data (2 words) or lower 16-bit area of 32-bit data for upper limit

Operands
Operand S1 S2 S3 A A A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A A A Constant H A A A f A A A A: Index Integer modifier device A* A* A* A A A

Available

* Index modification of a real number is not possible.

Description
Compares the floating point real number data specified by S1 with the data band specified by S2 and S3, when the trigger turns on. This instruction checks whether S1 is in the data band between S2 (lower limit) and S3 (upper limit), larger than S3, or smaller than S2. The comparison result is stored in special internal relays R900A, R900B, and R900C. The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag (R900C). Comparison between (S1+1, S1), (S2+1, S2) and (S3+1, S3)
(S1+1, S1) < (S2+1, S2) (S1+1, S1) (S2+1, S2) (S3+1, S3) and (S1+1, S1)

Flag R9009 R900A R900B R900C (Carry (> flag) (= flag) (< flag) flag) off off on off on off on off X X

(S3+1, S3) < (S1+1, S1)

off X X: Not changed

3 743
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is specified.

Flag conditions
Error flag (R9007): Turns on and stays on when: The area specified using the index modifier exceeds the limit. If data other than real number data are specified in S1+1, S1, S2+1, S2, and S3+1, S3. (S2+1, S2) > (S3+1, S3). Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data are specified in S1+1, S1, S2+1, S2, and S3+1, S3. (S2+1, S2) > (S3+1, S3).

Error flag (R9008):

3 744
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F347 (FLIMT) Floating point data upper and lower limit control P347 (PFLIMT)
This instruction carries out upper and lower limit control for real number data. Program example Outline
Ladder Diagram Boolean Address 10 11 Instruction ST F347 DT DT DT DT R 0 (FLIMT) 10 20 30 40

Trigger R0 10 F347 FLIMT, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

S2

S3

The area where the lower limit is stored or the lower limit data. (2 words) The area where the upper limit is stored or the upper limit data. (2 words) The area where the input value is stored or the input value data. (2 words) The area where the output value is stored. (2 words)

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f A A A Index Integer modifier device A* A* A* A A A A A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

Description
The output value (real number data) stored in the area specified by D is controlled based on whether or not the input value (real number data) specified by S3 falls within the range bounded by the upper and lower limits (real number data) set in S1 and S2. The output value is determined based on the following conditions: When the lower limit S1+1 and S1 are greater than the input value S3+1 and S3, the lower limit value S1+1 and S1 stored in D+1 and D as the output value. When the upper limit S2+1 and S2 are less than the input value S3+1 and S3, the upper limit value S2+1 and S2 are stored in D+1 and D as the output value.

3 745
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

When Lower limit S1+1 and S1 Input value S3+1 and S3 and S3 stored in D+1 and D as the output value. Output value D+1 and D
[S2+1, S2]

Upper limit S2+1 and S2, the input value S3+1

Lower limit S1+1 and S1

Input value S3+1 and S3 Upper limit S2+1 and S2


[S1+1, S1]

Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers before operations continue.
R0

F347 FLIMT, % DT10, % DT20, DT30, DT40

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0

F347 FLIMT, DT10, DT20, DT30, % DT40

When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

= flag (R900B):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in (S1+1 and S1), (S2+1 and S2) and (S3+1 and S3). (S1+1, S1) > (S2+1, S2). If result of operating is outside integer range when integer device is specified in D+1 and D. Turns on when result of operating is within the range of the upper and lower limits.

3 746
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F348 (FBAND) Floating point real number data deadband control P348 (PFBAND)
Outline This instruction carries out dead-band control for real number data. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST DT R 0 10 20 30 40

Trigger R0 10 F348 FBAND, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

F348(FBAND) DT DT DT

S2

S3

The area where the lower limit is stored or the lower limit data. (2 words) The area where the upper limit is stored or the upper limit data. (2 words) The area where the input value is stored or the input value data. (2 words) The area where the output value is stored. (2 words)

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f A A A Index Integer modifier device A* A* A* A A A A A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

3 747
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The output value (real number data) stored in the area specified by D is controlled based on whether or not the input value (real number data) specified by S3 falls within the dead-band bounded by the upper and lower limits (real number data) set in S1 and S2. The output value is determined based on the following conditions: When the lower limit S1+1 and S1 are greater than the input value S3+1 and S3, the input value S3+1 and S3 minus the lower limit value S1+1 and S1 are stored in D+1 and D as the output value. When the upper limit S2+1 and S2 are less than the input value S3+1 and S3, the input value S3+1 and S3 minus the upper limit value S2+1 and S2 are stored in D+1 and D as the output value. When Lower limit S1+1 and S1 and D as the output value. Input value S3+1 and S3 Upper limit S2+1 and S2, 0.0 is stored in D+1

Output value D+1 and D

Lower limit of deadband S1+1 and S1


0

Input value S3+1 and S3 Upper limit of deadband S2+1 and S2

In this range, zero is output.

Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers before operations continue.
R0 F348 FBAND, % DT10, % DT20, % DT30, DT40

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F348 FBAND, DT10, DT20, DT30, % DT40

When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1, S1, S2+1, S2 and S3+1, S3. S1+1, S1 > S2+1, S2. If result of operating is outside integer range when integer device is specified in D+1, D. = flag (R900B): Turns on when result of operating is within the range of the upper and lower limits. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 748
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F349 (FZONE) P349 (PFZONE)

Floating point real number data zone control

Outline This instruction carries out zone control for real number data. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F349 DT DT DT DT R 0 10 20 30 40

Trigger R0 10 F349 FZONE, DT10, DT20, DT30, DT40 S1


S1 S2 S3 D

(FZONE)

S2

S3

Area where negative bias value is stored or negative bias value data (double words) Area where positive bias value is stored or positive bias value data (double words) Area where input value is stored or input value data (double words) Area (double words) where output value is stored

Operands
Operand S1 S2 S3 D A A A N/A Relay WX WY WR WL A A A A A A A A A A A A Timer/Counter SV A A A A EV A A A A Register DT A A A A LD A A A A FL A A A A Index register I A A A A K A A A Constant H A A A f A A A Index Integer modifier device A* A* A* A A A A A

N/A N/A N/A

* Index modification of a real number is not possible.

A: Available N/A: Not Available

3 749
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Description
The bias value specified by S1 or S2 is added to the input value (real number data) specified by S3, and the output value is stored in the area specified by D. The output value is determined by the following conditions: When the input value S3+1 and S3 are less than 0.0, the input value S3+1 and S3 plus the negative bias value S1+1 and S1 are stored in D+1 and D as the output value. When the input value S3+1 and S3 are equals 0.0, zero is stored in D+1 and D as the output value. When the input value S3+1 and S3 are greater than 0.0, the input value S3+1 and S3 plus the positive bias value S2+1 and S2 are stored in D+1 and D as the output value. Output value D+1 and D
Positive bias value S2+1 and S2

Input value S3+1 and S3


Negative bias value S1+1 and S1

Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers before operations continue.
R0 F349 FZONE, % DT10, % DT20, % DT30, DT40

Specifying the integer device with [D], the real numbers are automatically converted into integer data.
R0 F349 FZONE, DT10, DT20, DT30, % DT40

When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is specified.

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. If data other than real number data is specified in S1+1, S1, S2+1, S2 and S3+1, S3. If result of operating is outside integer range when integer device is specified in D+1, D. = flag (R900B): Turns on when input value is recognized as 0. Carry flag (R9009): Turns on for an instant when the result is overflowed.

3 750
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F350 (FMAX) Maximum value search in floating point real number P350 (PFMAX) data table
Outline Searches for a maximum value in a table of real number data. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F350 DT DT DT R 0 10 20 30

Trigger R0 10 F350 FMAX, DT10, S1


S1 S2 D

(FMAX)

DT20, S2

DT30 D

Starting 16-bit area for storing the real number data Ending 16-bit area for storing the real number data Starting 16-bit area for storing maximum value and relative address (3 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
This instruction searches for the maximum value in the real number data table between the area selected with S1 and the area selected with S2, and stores it in the area selected with D+1 and D. The address relative to S1 is stored in D+2. Real number data table
Lower word 0 Higher word S1+1:
S1: S1+2: S1+3: 1

Lower word Higher word D+1:


D: D+2:

Maximum value Relative address

S2: Lower word S2+1: Higher word

Relative address

3 751
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table
S1: S1+1: S1+2: S1+3:

Lower word 0 Higher word


1

D: D+1: D+2:

Lower word Higher word

Maximum value Relative address

S21:

Lower word

S2: Higher word

Relative address

If there are several values which are a maximum value, the relative address of the first value found searching from S1 is stored in D+2.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. The real number data is outside possible operating range.

3 752
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F351 (FMIN) P351 (PFMIN)

Minimum value search in floating point real number data table

Outline Searches for a minimum value in a table of real number. Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F351 DT DT DT R 0 (FMIN) 10 20 30

Trigger R0 10 F351 FMIN, DT10, S1


S1 S2 D

DT20, S2

DT30 D

Starting 16-bit area for storing the real number data Ending 16-bit area for storing the real number data Starting 16-bit area for storing minimum value and relative address (3 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
This instruction searches for the minimum value in the real number data table between the area selected with S1 and the area selected with S2, and stores it in the area selected with D+1 and D. The address relative to S1 is stored in D+2. Real number data table
S1: S1+2: S1+3:

Lower word

0 1

D: D+2:

Lower word

S1+1: Higher word

D+1: Higher word

Minimum value Relative address

S2: Lower word S2+1: Higher word

Relative address

3 753
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table
S1: S1+1: S1+2: S1+3:

Lower word 0 Higher word


1

D: D+1: D+2:

Lower word Higher word

Minimum value Relative address

S21:

Lower word

S2: Higher word

Relative address

If there are several values which are a minimum value, the relative address of the first value found searching from S1 is stored in D+2.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. The real number data is outside possible operating range.

3 754
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F352 (FMEAN) P352 (PFMEAN)


Outline

Total and mean numbers calculation in floating point real number data table

Calculates the total and mean numbers in the specified real number data table Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F352 DT DT DT R 0 10 20 30

Trigger R0 10 F352 FMEAN, DT10, S1


S1 S2 D

(FMEAN)

DT20, S2

DT30 D

Starting 16-bit area for storing the real number data Ending 16-bit area for storing the real number data Starting 16-bit area for storing total and mean numbers (4 words)

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Description
The total value and the average value of the real number data from the area selected with S1 to the area selected with S2 are obtained and stored in the area selected with D.
15 D D+1 D+2 D+3 Lower word Higher word Lower word Higher word 0

Total Mean

3 755
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table
S1: S1+2: S1+3:

Lower word 0
1

S1+1: Higher word

Specifies areas
Lower word n

S21:

S2: Higher word

Precautions during programming


Even if D+2 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.)

Flag conditions

Error flag (R9007):

Turns on and stays on when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. The real number data is outside possible operating range. Error flag (R9008): Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. The real number data is outside possible operating range. Carry flag (R9009): Turns on for an instant when overflows/underflows while calculating.

3 756
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F353 (FSORT) P353 (PFSORT)

Sort data in real number floating point data table

Outline Sorts a string of real number data (in smaller or larger number order). Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F353 DT DT K R 0 10 20 0

Trigger R0 10 F353 FSORT, DT10, S1


S1 S2 S3

(FSORT)

DT20, S2

K0 S3

Starting 16-bit area of sort data (2 words) Ending 16-bit area of sort data (2 words) Constant or area where sort condition is stored.

Operands
Operand S1 S2 S3 N/A N/A A Relay WX WY WR WL A A A A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K Constant H f Index Integer modifier device A A A N/A N/A N/A

N/A N/A N/A N/A N/A N/A A A N/A

A: Available N/A: Not Available

Description
The real number data from the area specified by S1 to the area specified by S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first) depending on the condition set with S3. If S1 = S2, sorting does not take place. The sort condition is specified as follows in S3: K0: Ascending order K1: Descending order Double sorting is used for the sorting method. Data is sorted from S1 to S2 in order following the sorting procedure. Note that the number of word comparisons increases in proportion to the square of the number of words, thus more time will be required for execution when there are a large number of words.

3 757
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table
S1: S1+1: S1+2: S1+3:

Lower word 0 Higher word


1

Specified areas
Lower word n

S21:

S2: Higher word

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. S1 > S2. The areas of S1 and S2 are different. The real number data is outside possible operating range.

3 758
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FPX/FP

Highlevel Instructions

F354 (FSCAL) Scaling of real number data P354 (PFSCAL)


Outline
With FP2/FP2SH, this function is available from Ver. 1.50 or later.

Availability FP2/FP2SH FPX (V1.13 or more) FP 32k/FP0R

Scaling(linearization) on a real number data table is performed, and the output (Y) to an input value (X) is calculated.

Program example
Ladder Diagram Boolean Address 10 11 Instruction ST F354 DT DT DT R 0 0 10 100

Trigger R0 10 F354 FSCAL, DT0, S1


S1 S2 D

(FSCAL)

DT10, S2

DT100 D

Real numerical value or area which shows the input value (X) Head area of the data table used for scaling Area in which the output value (Y) stored

Operands
Operand S1 S2 D A A N/A Relay WX WY WR WL A A A A A A A A A Timer/ Counter SV A A A EV A A A Register DT A A A LD A A A FL A A A Index register I A A A K A Constant H A H N/A f A Index Integer modifier device A A A A N/A A

N/A N/A N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
The output value Y is calcuated for the input value stored in DT0 referring to the data table which starts with DT10, and the result is stored in DT100.

Description
1) 2) Scaling (linearization) is performed according to the data table of the real number specified by [S2] in the inputted real numerical value [S1], and an output value is stored in [D]. An output value is calculated by searching the linear section of an input value [S1], and computing the linear interpolation between these two points from the linear table specified by [S2]. When the specified input value is out of the registration range of an linear table, the output value (Y0 or Yn) over a starting point (x0) or an ending point (xn) is stored, respectively. [S1] <= x0 [D] = y0 [S1] >= xn [D] = yn

3 759
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3)

The linear table [S2] must be having the section of two or more points registered. Moreover, the linear table must be registered in ascending order, from small to large number of the x sequences. 2 <= Registration mark (m) <= 99 (m=n+1) xt1 < xt (1 <= t <= n) When the distance between two points of a scaling table is very large, an operation error occurs. for example) Point1: (x0,y0)=(HFF000000, HFF000000) =(1.7*1034, 1.7*1034) Point2: (x1,y1)=(H7F000000, H7F000000) =(+1.7*1034, +1.7*1034) The error of an output result is proportional to the distance between two points of a scaling table. When the integer modifier is specified to be an input value [S1], scaling processing is performed after changing it into a real numerical value. An output result is changed into an integer value and stored when the integer modifier is specified to be an output value [S2].
Data table(linear table) (S2) S2 = DT10, n = K10

4)

5) 6) 7)

Output (Y)

S2: S2+1: S2+2: S2+3: S2+4: S2+2n+1: S2+2n+2: S2+2n+3: S2+2n+4: S2+2n+5: S2+2n+6: S2+4n+3: S2+4n+4:

Registration mark (m)

x0
(real numerical value)

x1
(real numerical value)

DT10 DT11 DT12 DT13 DT14 DT29 DT30 DT31 DT32 DT33 DT34 DT49 DT50

yn1
yn2 yn

xn
(real numerical value)

Y=[D] y2
y1 y0

y0
(real numerical value)

X=[S1]

y1
(real numerical value)

X0 X1

X2

Xn2

Xn1

Xn

Input (X)

yn
(real numerical value)

Flag conditions

Error flag (R9007)(R9008): It turns on, when the specified address using the index modifier exceeds a limit. It turns on, when a nonreal number value is inputted into [S1]. In the registration mark of [S2], it turns on at the time of m<2 or m>99. It turns on, when a nonreal number value is specified to be the real numerical value (xt, yt) specified in [S2]. It turns on, when the linear table of [S2] is not registered in ascending order of the xsequence. It turns on, when the linear table of [S2] exceeds the area. It turns on, when the overflow (operaion is unable) occurs in the operation of scaling. It turns on, when integer modifier specification is carried out for [D] and an output result exceeds the integer range.

3 760
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions 5

F355 (PID)

PID processing

Outline

This instruction carries out PID processing using data table.


Boolean Address 10 11 Instruction ST F355 DT R 0 (PID) 10

Program example
Ladder Diagram

Trigger R0 10 F355 PID, DT 10 S


S

Starting number of PID parameter area (30 words)

Operands
Operand S Relay WX WY WR WL N/A N/A N/A N/A Timer/Counter Register SV N/A EV N/A DT A Index register I N/A K N/A Constant H N/A f N/A Index modifier N/A A: Available N/A: Not Available

Description
PID processing is performed to hold the measured value specified by S+2 at the set value S+1, and the result is output to S+3. Derivative control or proportionalderivative control can be selected for the PID processing mode. Set the PID processing coefficients (proportional gain, integral time and derivative time) and the processing mode and cycle in the parameter table. PID processing will be performed based on these settings.

Types of PID processing


Reverse operation and forward operation
When a process has been changed, the vertical direction of the output can be selected. If the measured value drops, Reverse operation is specified to boost the output (heating, etc.). If the measured value increases, Forward operation is specified to boost the output (cooling, etc.).

Derivative type (PID) / Proportionalderivative type (IPD)


Generally, with derivative PID control, when a set value is changed, there is increased fluctuation in the output, but convergence is faster. Generally, with proportionalderivative PID control, when a set value is changed, there is less fluctuation in the output, but convergence is slower.

next page

3 761
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The value set for the parameter is out of range. The area specified using the index modifier exceeds the limit. Control mode Set value (SP) Measured value (PV) Output value (MV) Output lower limit Output upper limit Proportional gain (Kp) Integral time (Ti) Derivative time (Td) Control cycle (Ts) Auto-tuning progress

Parameter table settings


[S] [S+1] [S+2] [S+3] [S+4] [S+5] [S+6] [S+7] [S+8] [S+9] [S+10] [S+11] PID processing work area (*) [S+29] * For the FP0 use the 20 words, [S+11] to [S+30], as the work area.

3 762
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of parameters
1

Control mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S]


Value of [S] Autotuning when not executed Autotuning when executed H8000 H8001 H8002 H8003

Select the type of PID processing and auto-tuning on/off with the H constants. Control mode

Derivative type Proportional derivative type

Reverse operation Forward operation Reverse operation Forward operation

H0 H1 H2 H3

Auto-tuning
The optimum values for the Kp, Ti, and Td of the PID parameters can be measured by measuring the process response. When auto tuning is executed, the estimated results are reflected in the parameter area after auto tuning has been completed. (There may be cases in which auto tuning cannot be executed, depending on the process. If this happens, processing returns to the original parameter operation.) For precautions concerning execution of auto tuning, refer to the following page.

Reverse operation and forward operation


These parameters determine whether the output will increase or decrease when a change occurs in the process. Reverse operation If the measured process value decreases, the output will increase. (Example: Heating) Forward operation If the measured process value increases, the output will increase. (Example: Cooling)

Derivative type PID and proportionalderivative type PID


When the set value is changed, the output changes. Derivative type In general this produces a large change when a set value is changed, however, convergence is fast. Proportionalderivative type In general this produces a small change when a set value is changed, however, convergence is slow.
2

Set value (SP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+1]

Set the target value which determines the amount of process control within the following range. K0 to K10000 3 Measured value (PV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+2] Input the current process control value with the A/D converter. Adjust so that it falls within the following range. K0 to K10000 4 Output value (MV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+3] The result of PID processing is stored. Use the D/A converter or other device to output it to the process. K0 to K10000 5 Output lower limit value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+4] K0 to K9999 (< upper limit value)

3 763
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Output upper limit value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+5]

K1 to K10000 (> lower limit value) Specify the output value (MV) range. Values specified for the range are output. The limits should be as follows: output lower limit value < output upper limit value 0
7

10000.

Proportional gain (Kp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+6]

Specify the coefficient used for PID processing. The set value 0.1 will be the actual proportional gain. The setting range is K1 to K9999 (0.1 to 999.9, specify in increments of 0.1) If auto-tuning is selected for the specified control mode, the set value will be automatically adjusted and rewritten. 8 Integral time (Ti) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+7] Specify the coefficient used for PID processing. The set value 0.1 will be the actual integral time. The setting range is K1 to K30000 (0.1 to 3000 seconds, specify in increments of 0.1 seconds) When the set value is 0, the integration is not executed. If auto-tuning is selected for the specified control mode, the set value will be automatically adjusted and rewritten. 9 Derivative time (Td) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+8] Specify the coefficient used for PID processing. The set value 0.1 will be the actual derivative time. The setting range is K1 to K10000 (0.1 to 1000 seconds, specify in increments of 0.1 seconds) If auto-tuning is selected for the specified control mode, the set value will be automatically adjusted and rewritten. 10 Control cycle (Ts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+9] Set the cycle for executing PID processing. The set value 0.01 will be the actual control period. The setting range is K1 to K6000 (0.01 to 60.0 seconds, specify in increments of 0.01 seconds). 11 Auto-tuning progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+10] If autotuning is specified in the control mode, the degree to which autotuning has progressed is indicated. The values for K1 to K5 are stored based on the progress from the default value of 0, and the values return to the default values when autotuning has been completed. 12 PID processing work area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+11] to [S+29] The system uses this work area to perform PID processing. For the FP0 use the 20 words, [S+11] to [S+30], as the work area.

3 764
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when executing autotuning


If Execute autotuning is specified using the parameter table (control mode [S]), attention should be paid to the following points. After autotuning has been completed, the control mode [S] area is automatically rewritten from H8000 to H8003 to H0 to H3. Make sure the mode is not rewritten again in the program. After autotuning has been completed, the optimum values are stored for the proportional gain (Kp), the integration time (Ti) and derivative time (Td), but before executing autotuning, the appropriate values (for example, the lower limit value) within the setting range must be set. After autotuning has been completed, the optimum values are stored for the proportional gain (Kp), the integration time (Ti) and derivative time (Td). Be careful that the stored values are not inadvertently rewritten. Autotuning calculates the ideal Kp, Ti and Td values. This is done for setting (SP) by measuring the change of the measured value (PV) when the output value (MV) is set to the upper limit so that the measured value (PV) is caused to fluctuate, and measuring the change of the measured value (PV) when the output value (MV) is set to the lower limit. The changes of the output value (MV) when autotuning will complete after a minimum of three changes: upper limit outputlower limit outputupper limit output. If the autotuning progress remains at 0 even after changes have occurred several times, please try again after shortening control synchronization Ts.

Precautions during programming


A 30 word area (31 words for the FP0), including the operation work area, is required for the parameter table. Be careful not to allow other instructions to overwrite values in this area. Error detection will not occur even if the parameter table exceeds the area. When specifying S specify a number that is within at least 30 words (31 words for the FP0) from the last number. Take care that the area is not exceeded due to index modification. An error will not be detected if the area is exceeded. Use the A/D converter or other device to input the current measured value S+2. Use the D/A converter or other device to output the result of PID processing S+3 to the process. For the FP0, this instruction F355 (PID) cannot be programmed in the interrupt program. If two or more PID instructions specifying the same table are described in the program, it may operate incorrectly. (Example)
X0 X0 F355 PID, DT0 F355 PID, DT0

(Reason) Because the PID instructions are internally operating using the specified table, even if the execution condition has not been effected. In such a case, specify the table in separate addresses.

3 765
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Operation of PID control


PID is a control method widely used in the instrumentation field involving feedback control of process quantities such as temperature, pressure, flow, and fluid level.

1) Proportional operation
Proportional operation generates an output which is proportional to the input. Setting signal SV
+

Offset e Measurement signal PV

Kp

Output MV

MV 2

Kp=2

1 .5 0 t 0

Kp=1

t Kp=.5

The amount of control is held constant. An offset remains. Proportional control grows stronger as Kp is increased.

2) Integral operation
Integral operation generates an output which is proportional to the integral time of the input. Setting signal SV
+

Offset e

Integral operation

Output mi

mi=1/Tiedt e

Measurement signal PV
mi

In combination with proportional operation or proportionalderivative operation, integral operation removes the offset produced by these methods. Integral operation grows stronger as the integral time (Ti) is shortened.

3 766
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3) Derivative operation
Derivative operation generates an output which is proportional to the derivative time of the input. Setting signal SV
+ de dt

Offset e

Derivative operation

Output mD

mD=TD e

Measurement signal PV
mD

The advancing characteristic of derivative control alleviates the adverse effect which the delaying characteristic of the process exerts on control. Derivative control grows stronger as the derivative time (Td) is increased. In the case of pure derivative operation, control can temporarily become ineffective if noise is input, and this can have an adverse effect on the process being controlled. For this reason, incomplete differential operation is executed.
e mD

4) PID operation
PID operation is a combination of proportional, integral, and derivative operation. Setting signal SV + Offset e

Integral operation Derivative operation

+ + +

Kp

Output MV

Measurement signal PV

If the parameters are set to the optimum values, PID control can quickly bring the amount of control to the target value and maintain it there.

3 767
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F356 (EZPID)

Availability

Easy PID

FPX: Ver 1.20 or more FP: 32k/FP0R

Outline

Temperature control (PID) can be easily performed using the image of a temperature controller.
Boolean Address 10 11 Instruction ST WR1 WX2 DT32710 DT100 21 OT Y 0 R 1

Program example
Ladder Diagram

Trigger R1 10 F356 EZPID, WR1, WX2, DT32710, DT100 S1


S1 S2 S3 S4

F356(EZPID)

Y0

S2

S3

S4

Control data Measured value (PV) Starting No. of area storing PID control parameter Starting No. of PID processing work area

Operands
Relay Operand WX WY WR WL S1 S2 S3 S4 (*1) I0 to ID. N/A A N/A N/A A A A A A A A A A A A A SV A A A A EV A A A A DT A A A A LD A A A A Timer/Counter Register Index register In (*1) A A N/A N/A Constant SWR SDT K N/A A N/A N/A N/A A N/A N/A H Index modifier

N/A N/A N/A N/A N/A N/A N/A N/A

Operation

A: Available N/A: Not Available

PID processing is performed to hold the measured value (PV) at the set value (SP). Writing OUT instruction immediately after this instruction enables the PWM output (onoff output) similar to a temperature controller. Autotuning function is also available to calculate the control parameter of PID automatically. It can be used with analog output as it outputs values as well as PWM output.

3 768
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

General explanation of used memories


S1: It is recommended to specify the nonhold type area (e.g. WR) where can be operated in bit unit. When bit0 is 1, it is autotuning request. This bit is reset with this instruction when autotuning has completed. Reset this bit to cancel autotuning. When bit0 is 0, it is PID control. When autotuning has completed successfully, 1 is set for bit 1. Bit2 turns on to hold the output MV (S4) when the execution condition of this instruction changes from off to on. When bit3 is 0, it is PWM control. And when bit3 is 1, it is ANALOG output control. When bit4 is 0, the max. value of the internal output is the output upper limit value +20% of the output range (output upper limit value output lower limit value), and the min. value is the output lower limit value 20% of the output range. When bit4 is 1, the max. value of the internal output is the output upper limit value, and the min. value is the output lower limit value. *The output lower limit value is specified by S4+1, and the output upper limit value is specified by S4+2. Bits 5 to F are reservation bits. Normally use them as 0. Area storing measured value (PV) (1 word) Affective range The input WXn of a temperature input unit can be directly specified. k30000 to k+30000 Area to specify target value (SP) and control parameter (4 words) It is recommended to use this area allocating to the holdtype operation Setting range memory. S3: Store set value (SP). It is necessary to specify by the k30000 to k+30000 instruction or an indicator. S3+1: Store proportional gain (KP). After autotuning has been com- k1 to K9999 (0.1 to Actual gain is Set value x 0.1. pleted, it is automatically set. 999.9) After autotuning has been com- k0 to k30000 (0 to S3+2: Store integral time (TI). 3000s) Actual integral time is Set val- pleted, it is automatically set. ue x 0.1. S3+3: S3+3: Store derivative time After autotuning has been com- k0 to k10000 (0 to pleted, it is automatically set. 1000s) (TD). Actual derivative time is Set value x 0.1. It is divided into output (MV), specified area of control mode, autotuning related area and PID processing work area. The area in the range of S4 to S4+29 is necessary for the instruction. (The detail is described hereinbelow.) It is recommended to allocate it in the nonhold area. Also, do not use the data in this area for other purposes.

S2: S3:

S4:

Easy usage
When PWM output in reverse operation (heating)

R0 ( DF ) R1 F356(EZPID), WR1, WX2, DT32710, DT100

R10 S Y0
Easy PID control Autotuning request

3 769
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Explanation of operation
Specify set value (SP) with the instruction or an indicator before the operation. If autotuning is requested with a device such as indicator, the above autotuning request program is not necessary. When R1 turns on, work area DT100 to DT129 will be initialized. (However, only DT100 (MV) can be held.) The control conditions are that operation cycle is 1 sec, derivative type reverse operation (heating), and PWM resultion is 1000. PID control starts from the next scan, and PWM output is executed for Y0. Note) If execution condition R1 has turned off during PID control, PWM output Y0 also turns off. However, output value MV is held. Program as described above to start autotuning with the instruction, and turn on R1 after turning on R0. When autotuning has completed successfully, R11 turns on and KP, TI and TD is set. If R1 is on continuously, it will change to PID control automatically, and PWM output will be executed for Y0. When changing control conditions The area of S4+1 to S4+9 must be changed to change control conditions. Change it before the second execution of the F356 instruction. <Details of S4> S4: It is divided into output (MV), specified area of control mode, autotuning related area and PID processing work area. It is recommended to allocate it in the nonhold area. Also, do not use the data in this area for other purposes. Output (MV) and control mode area (Normally, the default values are used.) S4: S4+1: S4+2: S4+3: S4+4: S4+5: Default value k0 k0 k10000 k0 k100 k0 Range
k10000 to 10000 Min. k10000 Max. k+10000 k0 to 80(%)
k1 to 3000(0.01 to 30s)

The output value (MV) of PID processing is stored. Set the lower limit value of output value (MV). Set the upper limit value of output value (MV). Set 100% output band (range where PID control is not performed). Set control cycle (TS). Setting unit=10ms, default value=1sec. Set control mode. (Refer to the table below.)
Value Reverse Forward Reverse Forward k0 k1 k2 k3

k0 to 3

Control mode Derivative type Proportional derivative type

e.g.
Heating Cooling Heating Cooling

Reverse operation and forward operation


Reverse operation: If the measured value drops, Reverse operation is specified to boost the output (heating, etc). Forward operation: If the measured value increases, Forward operation is specified to boost the output (cooling, etc.). Derivative type (PID)/Proportionalderivative type (IPD) Derivated type: The speed is faster to get to set value, but it is easily overshooted. Proportionalderivative type: The speed is slow to get to set value, but it is not easily overshooted.

Autotuning related area (The default value is normally used.) S4+6: Set bias value for performing autotuning. S4+7: Set correction data (a1) of autotuning result (KP). S4+8: Set correction data (a2) of autotuning result (TI). S4+9: Set correction data (a3) of autotuning result (TD). S4+10: The status while autotuning is being performed is stored. PID processing work area S4+11: The area up to S4+29 is to the work area for PID processing and autotuning processing. S4+29: 3 770
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

k0 k125 k200 k100 k0 0 to 0

from k0 k50 to k500% k50 to k500% k50 to k500% k0 to k5

Highlevel Instructions

Note) The default value is written when the execution condition turns on. Output (MV) is output only in the ranges of upper limit value and lower limit value. Also, set to be as 1000 lower limit value < upper limit value 10000. How to output PWM. The cycle of a PWM output is decided by the setting value of S4+4. The default value is periodic 1 second. Duty of PWM is decided by the rate of the output MV (S4) that accounts for in the range of k0 to k10000. When either on of the minimum value and maximum value of Output MV specified by S4+1 and S4+2 is a negative value, the PWM output is always OFF. A PWM output is always ON, when the output MV is k0, and it is always OFF when the output MV is k10000.

Explanation of specific usage


1: When changing control mode only with PWM output Change the content of the control mode (S4+5) to k1 to k3 using an instruction such as F0(MV) instruction. (Example) Change the control mode to the proportional derivative type from the derivative type that is the default.

R1 F356 EZPID , WR1, WX2, DT32710, DT100 R1 F0 MV , K2 , DT105

Y0

2: When using an analog output unit for output 21: Set the bit3 of S1 to 1 in order to start ANALOG output control. 22: Set output lower limit value (S4+1) and output upper limit value (S4+2) according to the output range of an analog output unit. (Example) <Lower limit value=k0, upper limit value=k2000>, <Lower limit value=k0, upper limit value=k4000> 23: Change the value of control cycle (TS): (S4+4) according to the cycle of updating input of a temperature input unit (that is normaly 0.15 or more). (Example) TS=k10 (100ms) 24: Change the control mode if necessary. 25: Transmit output value (MV) to WY of an analog output unit.

3 771
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Note) When analog output is used for output, it is not necessary to write OUT instruction immediately after this instruction. Also, when analog output is used, PWM output is fixed to off. (Example) When controlling with the settings that the output upper value (S4+2) is K4000 and the control cycle (S4+4) is 10 seconds

R1 R1 F356 EZPID , WR1, WX2, DT32710, DT100 R1 ( DF ) F0 MV , K4000 , DT102 F0 MV , K1000 , DT104 R1 F0 MV , DT100 , WYn

R3 S

More detail on setting method


1: Setting for 100% output band (S4+3) 100% output band is to specify the timing of starting PID control when measured value (PV) becomes more than what percentage of set value. 100% output is performed in the area up to a specified measured value. When measured value (PV) is smaller than set value (SP) *this setting, it has affect on reducing the arrival time to set value (SP) by performing 100% output. Therefore, when it is set to k80, 100% output is performed up to 80% of set value (SP), and PID control starts from then. When k0 has been set to the default value for this setting, PID control is performed from the beginning. 2: Fine adjustment of autotuning 21: Correction of the result of autotuning (S4+7, S4+8 and S4+9) When autotuning has completed, the parameters for KP, TI and TD are stored in (S3+1, S3+2 and S3+3). That result can be corrected with this parameter. (Example) Set S4+7 to k200 (means to 200%) and perform autotuning to correct KP to double value. Set S4+8 to K128 (means to 125%) and perform autotuning to correct TI to 1.25 times value. Set S4+9 to k75 (means to 75%) and perform autotuning to correct TD to 0.75 times value.

3 772
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

21: Autotuning bias value (S4+6) Autotuning is executed with (set value (SP) autotuning bias value) as a set value (SP). It is used to control excessive temperature rise while autotuning is performed. For the forward operaiton, autotuning is executed with (set value (SP) + this set value) as a set value.
Temperature Set value (SP) (SP)

Autotuning bias value Autotuning in reverse operation

Time During autotuning PID control KP, TI and TD calculation

Temperature

(SP) Autotuning bias value Set value (SP)

Autotuning in forward operation

Time During autotuning PID control

KP, TI and TD calculation

Note) Even if starting autotuning in the condition that measured value (PV) is close to set value (SP), autotuning is peformed with the above SP.

3 773
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions on programming
1: When the execution condition has turned on, the area of S4 to S4+29 is initialized. If it is set to values other than the default values, write with F0(MV) instruction using always on relay R9010 as execution condition. 2: As operation cycle or timing of PWM output is always operated internally with PID processing instruction, always operate only once in 1 scan. Therefore, do not execute it during the subroutin or interrupt program. This insturction that the same operand has been specified cannot be written more than once. 3: Do not turn off the execution condition during PID processing. Otherwise, PID processing will be disabled. 4: If you do not want to synchronize PWM output cycle for controlling multiple objects, delay the timing of startup by adjusting times such as the rise time for startup condition. 5: As execution condition is changed after executing this instruction, after instructions cannot operate correctly with the program below.

R1
Incorrect

Y0 F356 EZPID, WR1, WX2, DT32710, DT100 F0 MV, k0, DT100

R1 F356 EZPID, WR1, WX2, DT32710, DT100


Correct

Y0
It is the same as if there is no OT Y0 instruction.

R1 F0 MV, k0, DT100

Conditions when operation errors occur


1: S2: Measured value (PV), S3: Set value (SP), S3+1: KP, S3+2: TI, S3+3: TD When each parameter of S4+1 to S4+9 is out of the setting range. 2: When the area specified with S3 or S4 exceeds the upper limit of the specified operation device.

Internal operation specifications


When the execution condition has turned on, the operation work is initialized. If each parameter of KP, TI and TD is all 0 when PID operation has started, they are initialized at 1,1 and 0, respectively. And the operation is continued. AT normal done flag or AT done code is cleared on the leading edge of AT signal. The set value for AT operates regarding <set value (SP) bias value> as target value. Default value for bias value is 0. When AT has completed successfully, the results which is calculated by raising KP, TI and TD of calculated results to the power of correction data a1, a2 and a3 are stored. Default value is 100%. When AT has completed successfully, AT normal done falg is set, and AT done code is stored in AT step. When AT has abended, the parameters of KP, TI and TD are not changed. PWM output is output at the duty when the output range of MV is 0 to 10000. For analog output (when bit3 of S1 is 1), the internal calculated value output in the range of 0 to 10000 and it is converted into a specified range. Conversion formula: (Upper limit value Lower limit value) x internal caluculated value / 10000 + Lower limit value Example) When upper limit value = 40000, lower limit value = 0 and internal calculated value = 5000, output value is 2000.

3 774
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions when using MV holding function The usage varies according to models and versions.
1. For FP, FPX, FP0R (V1.05 or older) Use the default upper limit and lower limit values for using the MV holding function. 2. For FP0R (V1.06 or later) Upper limit and lower limit values are held as well as MV value, set MV value, upper limit and lower limit values before executing this instruction.

3 775
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F373 (DTR) P373 (PDTR)


Outline Program example

16-bit data revision detection

This instruction detects changes in 16-bit data values.


Boolean Address 10 11 Instruction ST F373 DT DT 17 18 ST AN OT R R R 0 (DTR) 10 20 0 R9009 10

Ladder Diagram

Trigger 10 R0 F373 DTR, Trigger R0 R9009 17 DT10, S DT20 D R10

20

S D

16-bit area for detecting data changes. Area where data of previous execution is stored.

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
When the trigger R0 turns on, R9009 will turn on if there has been a change in data register DT10 since the previous execution. Following this, the internal relay R10 will also turn on.

Description
If the data in the 16-bit area specified by S has changed since the previous execution, internal relay R9009 (carry flag) will turn on. D is used to store the data of the previous execution, and when the current execution has been completed, the current data is stored in D.

3 776
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


The internal relay R9009 (carry flag) used for detection of data changes is updated at each execution of the instruction. For this reason, Programs using R9009 should insert it immediately after an F373 (DTR)/P373 (PDTR) instruction. Output to an output relay or internal relay to hold the result. (Refer to the explanation of F64 (BCMP)/P64 (PBCMP).) As in the program example on preceding page, be sure to add the trigger (X10) for the F373 (DTR)/P373 (PDTR) instruction before the internal relay R9009 (carry flag). If the always on relay (R9010) is the execution condition, this trigger (X10) is not necessary.

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Turns on if a change has occurred in the specified data area.

3 777
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F374 (DDTR) P374 (PDDTR)


Outline Program example

32-bit data revision detection

This instruction detects changes in 32-bit data values.


Boolean Address 10 11 Instruction ST F374 DT DT 17 18 ST AN OT R R R 0 (DDTR) 10 20 0 R9009 10

Ladder Diagram

Trigger 10 R0 F374 DDTR, Trigger R0 R9009 17 DT10, S DT20 D R10

20

S D

Lower 16-bit area of 32-bit data for detecting data changes. Lower 16-bit area of 32-bit data where data of previous execution is stored.

Operands
Operand S D A N/A Relay WX WY WR WL A A A A A A Timer/Counter SV A A EV A A Register DT A A LD A A FL A A Index register I A A K Constant H f Index Integer modifier device A A N/A N/A

N/A N/A N/A N/A N/A N/A

A: Available N/A: Not Available

Explanation of example
When the trigger R0 turns on, R9009 will turn on if there has been a change in data register DT10 since the previous execution. Following this, the internal relay R10 will also turn on.

Description
If the data in the 32-bit area specified by S has changed since the previous execution, internal relay R9009 (carry flag) will turn on. D+1 and D is used to store the data of the previous execution, and when the current execution has been completed, the current data is stored in D+1 and D.

3 778
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Precautions during programming


The internal relay R9009 (carry flag) used for detection of data changes is updated at each execution of the instruction. For this reason, Programs using R9009 should insert it immediately after an F374 (DDTR)/P374 (PDDTR) instruction. Output to an output relay or internal relay to hold the result. (Refer to the explanation of F64 (BCMP)/P64 (PBCMP).) As in the program example on preceding page, be sure to add the trigger (X10) for the F374 (DDTR)/P374 (PDDTR) instruction before the internal relay R9009 (carry flag). If the always on relay (R9010) is the execution condition, this trigger (X10) is not necessary.

Flag conditions

Error flag (R9007):

Turns on and stays on when the area specified using the index modifier exceeds the limit. Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. Carry flag (R9009): Turns on if a change has occurred in the specified data area.

3 779
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F410 (SETB) P410 (PSETB)


Outline Program example

Setting the index register bank number

Setting the index register bank number


Boolean Address 10 11 Instruction ST F410 K R 0 (SETB) 1

Ladder Diagram

Trigger R0 10 F410 SETB, K 1 n


n

Constant data or area where register bank number is stored.

Operands
Operand n A Relay WX WY WR WL A A A Timer/Counter SV A EV A Register DT A LD A FL A Index register I A K A Constant H A f N/A Index Integer modifier device A N/A

A: Available N/A: Not Available

Description
This instruction selects the current index register bank number.

Precautions during programming


The bank number is automatically set to bank 0 before execution of the starting address of the program. If the program memory is 120K steps, when the program is switched to the No. 1 program or the No. 2 program, the index register bank number is automatically set to 0.

3 780
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example Changing the index register banks


0
1

I0 to ID of bank 0

R9010 F410 SETB, H 11 SETB, H


2

I0 to ID of bank 1

R9010 F410 SETB, H 2


3

I0 to ID of bank 2

R9010 F410 SETB, H 3

I0 to ID of bank 3

Flag conditions

Error flag (R9007): Error flag (R9008):

Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The bank number is not from K0 to K15.

3 781
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F411 (CHGB) Changing the index register bank number P411 (PCHGB)
Outline Index register bank number change over with remembering preceding bank number.
Boolean Address 10 11 Instruction ST K R 0 2

Program example
Ladder Diagram

Trigger R0 10 F411 CHGB, K2 n


n

F411 (CHGB)

Constant data or area where register bank number is stored.

Operands
Operand n A Relay WX WY WR WL A A A Timer/Counter SV A EV A Register DT A LD A FL A Index register I A K A Constant H A f N/A Index Integer modifier device A N/A

A: Available N/A: Not Available

Description
This instruction selects the current index register bank number. At this time, the current index bank number is stored in the push area (the push area has only one effective level, thus previous data is overwritten). The bank numbers of index registers used in interrupt programs, subroutines, and other sub programs should be specified in such a way that the F411 (CHGB) instruction is executed at the beginning of the sub program, and the F412 (POPB) instruction is executed at the end of the sub program.

Precautions during programming


The bank number is automatically set to bank 0 before execution of the starting address of the program. If the program memory is 120K steps, when the program is switched to the No. 1 program or the No. 2 program, the index register bank number is automatically set to 0. The push area has only one effective level, thus the previous data is overwritten.

3 782
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

Program example
This is a program in which the index register bank is switched to 2 at the beginning of the interrupt program, and is then switched back again to the original index register bank just before the end of the interrupt program (before the IRET instruction). Main program
END INT 0 R9010 F411 CHGB, H2

Sub program
R9010 F412 POPB IRET

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The bank number is not from K0 to K15.

3 783
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F412 (POPB) P412 (PPOPB)


Outline

Restoring the index register bank number

Changes index register bank number back to the bank before F411 (CHGB)/P411 (PCHGB) instructions.
Boolean Address 10 11 Instruction ST F412 R 0 (POPB)

Program example
Ladder Diagram

Trigger R0 10 F412 POPB

Description
The current index register bank number is changed to the number stored in the push area. The contents of the push area are not changed at this time. The bank numbers of index registers used in interrupt programs, subroutines, and other sub programs should be specified in such a way that the F411 (CHGB) instruction is executed at the beginning of the sub program, and the F412 (POPB) instruction is executed at the end of the sub program.

Precautions during programming


The bank number is automatically set to bank 0 before execution of the starting address of the program. If the program memory is 120K steps, when the program is switched to the No. 1 program or the No. 2 program, the index register bank number is automatically set to 0. The push area has only one effective level.

Program example
This is a program in which the index register bank is switched to 2 at the beginning of the interrupt program, and is then switched back again to the original index register bank just before the end of the interrupt program (before the IRET instruction). Main program
END INT 0 R9010 F411 CHGB, H2

Sub program
R9010 F412 POPB IRET

3 784
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F414 (SBFL) P414 (PSBFL)


Outline Program example

Setting the file register bank number

Setting the file register bank number


Boolean Address 10 11 Instruction ST F414 DT R 0 (SBFL) 1

Ladder Diagram

Trigger R0 10 F414 SBFL, DT 1 n


n

Constant data or area where register bank number is stored.

Operands
Operand n A Relay WX WY WR WL A A A Timer/Counter SV A EV A Register DT A LD A FL A Index register I A K A Constant H A f N/A Index Integer modifier device A N/A

A: Available N/A: Not Available

Description
This instruction selects the current file register bank number. File register bank number: 0 to 2.

Precautions during programming


The file register bank is set to bank 0 at the first step of program. The file register bank is also set to bank 0 at the first step of No. 2 program. Special data register for file register bank. DT90263 DT90264
File register bank (current value) File register bank (shelter number) The current value of file register bank is stored. stored The shelter number of file register bank is stored.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The bank number is not from K0 to K2.

3 785
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F415 (CBFL) P415 (PCBFL)


Outline Program example

Changing the file register bank number

Changing the file register bank number.


Boolean Address 10 11 Instruction ST F415 DT X 10 (CBFL) 1

Ladder Diagram

Trigger X10 10 F415 CBFL, DT 1 n


n

Constant data or area where register bank number is stored.

Operands
Operand n A Relay WX WY WR WL A A A Timer/Counter SV A EV A Register DT A LD A FL A Index register I A K A Constant H A f N/A Index Integer modifier device A N/A

A: Available N/A: Not Available

Description
This instruction selects the current file register bank number. At this time, the current file bank number is stored in the push area (the push area has only one effective level, thus previous data is overwritten). File register bank number: 0 to 2.

Precautions during programming


The file register bank is set to bank 0 at the first step of program. The file register bank is also set to bank 0 at the first step of No. 2 program. Special data register for file register bank. DT90263 DT90264
File register bank (current value) File register bank (shelter number) The current value of file register bank is stored. stored The shelter number of file register bank is stored.

Flag conditions
Error flag (R9007): Error flag (R9008): Turns on and stays on when: Turns on for an instant when: The area specified using the index modifier exceeds the limit. The bank number is not from K0 to K2.

3 786
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

F416 (PBFL) P416 (PPBFL)


Outline

Restoring the file register bank number

Changes file register bank number back to the bank before F415 (CBFL)/P415 (PCBFL) instructions.
Boolean Address 10 11 Instruction ST F416 R 0 (PBFL)

Program example
Ladder Diagram

Trigger R0 10 F416 PBFL

Description
The current file register bank number is changed to the number stored in the push area. The contents of the push area are not changed at this time. The user must manage the push area data so that the desired data is restored. This instruction only checks the data range, it does not check changes made with the F415 (CBFL) instruction. The push area has only one effective level.

Precautions during programming


The file register bank is set to bank 0 at the first step of program. The file register bank is also set to bank 0 at the first step of No. 2 program. Special data register for file register bank. DT90263 DT90264
File register bank (current value) File register bank (shelter number) The current value of file register bank is stored. stored The shelter number of file register bank is stored.

3 787
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Highlevel Instructions

3 788
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Chapter 4 Precautions Concerning Programs

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4-2
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.1

Changing the Set Value of Timer/Counter During RUN

4.1
4.1.1

Changing the Set Value of Timer/Counter During RUN


Method of Rewriting Constant in the Program
This method rewrites the value in the program.

Timer set value


X0 T5 TMX5, K 30 Y10

Changing the set values (constants) in the program Constants in the program can be rewritten as long as the following conditions are observed. Operation method: RAM operation only Rewriting method: Method using the programming tool software Method using the FP Programmer II Rewrite method using the programming tool software Example of changing the set value of timer 5 from K30 to K50 1. 2. 3. Place the cursor on the value of K30 set for the timer 0. Press the Delete key of computer to clear the value. Enter a new constant of K50, and press the Enter key.

Rewrite method using FP programmer II Example of changing the set value of timer 5 from K30 to K50 1. Read the address containing the timer instruction.
SHIFT SC TM T-SV ST X-WX 5 SRC READ READ

2.

Clear the constant (K30).


(HELP) CLR

3.

Enter the new constant (K50).


(BIN) K/H 5 0 WRT

4-3
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Operation and cautions after the change After the change using the programming tool software or FP programmer II, the timer or counter in operation will continue to run. Operation based on the changed set value will be start the next time the execution condition changes from off to on. If changing values using the boolean (ladder/nonladder) mode input method available in the programming tool software, subtraction is interrupted when the values are rewritten, and starts again with the new value, starting from the next scan. When method of constant rewriting in the program is used, the program itself will change. Thus, when the mode is changed and then set back to RUN or when the power is turned on, the changed set value will be preset.

4-4
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.1

Changing the Set Value of Timer/Counter During RUN

4.1.2

Method of Rewriting a Value in the Set Value Area


Transfers to SV area when mode changes to RUN mode.

Timer set value


X0 T5 TMX5, K30 Y10

SV5 30

This method rewrites the value in the set value area. The program itself is not rewritten.

Changing values in the set value area SV Values in the set value area SV can be changed with the following conditions. Operation method: Rewriting method: RAM operation, ROM operation Method using the programming tool software Method using the FP Programmer II Method using the program (highlevel instruction)

Operation and cautions after the change After the change, the timer or counter in operation will continue to run. Operation based on the changed set value will be start the next time the execution condition changes from off to on. With these methods, the value in the set value area SV will change, however, the program itself will not change. Therefore, when the mode is changed and then set back to RUN or when the power is turned on, operation will take place as follows: When a set value in the program is specified by a constant K The constant K is preset in the set value area SV. After the change, it will no longer be effective. When a set value in the program is specified by a set value area number In the case of a nonhold type timer or counter, 0 is preset in the set value area SV. In the case of a hold type timer or counter, the value changed by the method on the following page is preset in the set value area SV.

4-5
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Method 1: Method using the programming tool software Select MONITOR & TEST RUN from the online menu, read the set value area SV of the timer or counter using the data monitor, and change the value.

Method 2: Method using the FP Programmer II Use the word data monitor function to read the set value area SV of the timer or counter to be changed, and rewrite the value. Example of changing the value of SV0 from K30 to K50. 1. Execute word data monitor (OP8).
() OP 8 ENT

2.

Read SV0.
TM T-SV 0 READ

3.

Clear SV0.
(HELP) CLR

4.

Write the new changing value.


(BIN) K/H 5 0 WRT

4-6
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.1

Changing the Set Value of Timer/Counter During RUN

Method 3: Method using the program (highlevel instruction) To change a set value of timer/counter based on an input condition, use a high-level instruction as shown below to rewrite the value in the set value area SV of the desired timer or counter. Example: Changing the set value to K20 when input X0 turns on
X0
F0 MV, K20, SV3

X1 T3

TMX3 K50

When X0 turns on, the set value of timer changes from 5 seconds to 2 seconds.
Y10

With the FP2SH and FP10SH, it is possible to specify the data register DT, as well the relay WR for handling word data, and other similar areas, as the set value area. The set value can be changed by changing the value to be transmitted, using the F0 (MV) instruction or a similar instruction.

4-7
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.2

Use of Duplicated Output

4.2.1

Duplicated Output

Duplicated output refers to repeatedly specifying the same output in a program. If the same output is specified for the OT and KP instructions, it is considered to be duplicated output. Even if the same output is used for multiple application instructions, such as the SET or RST instruction, or highlevel instruction for data transfer, it is not regarded as duplicated output. If you enter RUN mode while the duplicated output condition exists, under normal conditions, it will be flagged as an error. The ERROR (ERROR/ALARM) LED will light and the self-diagnostic error flag R9000 will go on. How to check for duplicated use You can check for duplicated outputs in the program using the programming tool, by the following method: Using FP Programmer II: Operate the TOTAL CHECK function. (Key operation:
() OP 9 ENT READ

If there are any duplicated outputs, an error message (DUP USE) and the address will be displayed. Using programming tool software (NPST-GR): Excute the TOTALLY CHECK A PROGRAM on CHECK A PROGRAM. If there are any duplicated outputs, an error message (DUPLICATED OUTPUT ERROR) and the address will be displayed. If you execute SEARCH AN ERROR, the error message will be displayed, and the first address number will be displayed. Enabling Duplicated Output If you need to use output repeatedly due to the content of the program, duplicated output can be enabled. In this case, change the setting of system register 20 to enable (when using FP programmer II, set K1). When this is done, an error will not occur when the program is executed.

4-8
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.2

Use of Duplicated Output

4.2.2

When Output is Repeated with an OT, KP, SET, or RST Instruction

Condition of internal and output relays during operation When instructions are repeatedly used which output to internal and output relays such as transfer instructions and OT, KP, SET and RST instructions, the contents are rewritten at each step during operation. Example: Processing when SET, RST and OT instructions are used (X0 to X2 are all on).
X0 R0 R0 S

This section of the program is processed as if R0 were on.


R0 R

X1

The program is processed as if R0 were off.


X2 R0

The program is processed as if R0 were on.

The output is determined by the final operation results. If the same output is used by several instructions such as the OT, KP, SET, RST, or data transfer instructions, the output obtained at the I/O update is determined by the results of the operation at the greatest program address. Example: Output to the same output relay Y10 with OT, SET and RST instructions.
X0 X1 X2 Y10 Y10: on Y10 S Y10 R Y10: on Y10: off

When X0 to X2 are all on, Y10 is output as off at I/O update according to the result of trigger X2. If you need to output a result while processing is still in progress, use a partial I/O update instruction F143 (IORF).
4-9
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.3
4.3.1

Leading Edge Detection Method


Instructions of Leading Edge Detection Method

Instructions using the leading edge detection operation: DF (leading edge differential) instructions Count input for CT instructions Count input for F118 (UDC) instructions Shift input for SR instructions Shift input for F119 (LRSR) instructions NSTP instructions P type highlevel instructions (with the prefix P) for FPC/FP2/FP2SH/FP10SH only Leading edge detection method An instruction with a leading edge detection method operates only in the scan where its trigger is detected switching from off to on.
Standard operation Trigger Operation of instruction
on off on off

Leading edge detection operation Trigger Operation of instruction Executed every scan
on off on off

Executed only one time

The condition of the previous execution and the condition of the current execution are compared, and the instruction is executed only if the previous condition was off and the current condition is on. In any other case, the instruction is not executed.

4 - 10
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.3

Leading Edge Detection Method

Precautions when using an instruction which performs leading edge detection When RUN begins, for example when the system is powered on, the off on change of the trigger is not detected. The instruction is not executed. Execution of the instruction will take place as explained on the following page. When used with one of the instructions indicated in instructions below which change the order of execution of instructions, the operation of the instruction may change depending on input timing. Take care regarding this point. Be careful when using leading edge detection type instructions with control instructions, such as: MC and MCE instructions JP and LBL instructions F19 (SJP) and LBL instructions for FPC/FP2/FP2SH/FP3/FP10SH only LOOP and LBL instructions CNDE instruction Step ladder instructions Subroutine instructions

4.3.2

Operation and Precautions at Run Start Time

Operation of first scan after RUN begins The leading edge detection instruction is not executed when the mode has been switched to the RUN mode, or when the power supply is booted in the RUN mode, if the execution condition is already on.
RUN (Power on)
Trigger Operation Not executed Executed

If you need to execute an instruction when the trigger (execution condition) is on prior to switching to RUN mode, use the special internal relay R9014 in your program as follows. (R9014 is a special internal relay which is off during the first scan and turns on at the second scan.)

next page

4 - 11
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Example 1: DF (leading edge differential) instruction


X0 DF Y10

Add R9014
X0 R9014 DF Y10

RUN (Power on)


X0 Y10

Even if X0 was initially on, the input condition for the DF instruction is offtoon at the second scan, therefore differential output is obtained.

Example 2: CT (counter) instruction


X0 CT X1 200

Add R9014
X0 X1 R9014 CT 200

RUN (Power on)


X0

CT200 counting operation

Even if X0 was initially on, the input condition for the counter is offtoon at the second scan, therefore the count is incremented.

4 - 12
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.3

Leading Edge Detection Method

4.3.3

Precautions when Using a Control Instruction

Instructions which leading edge detection compare the condition of the previous execution and the condition of the current execution, and execute the instruction only if the previous condition was off and the current condition is on. In any other case, the instruction is not executed. When a leading edge detection instruction is used with an instruction which changes the order of instruction execution such as MC, MCE, JP or LBL, the operation of the instruction may change as follows depending on input timing. Take care regarding this point. Example 1: Using the DF instruction between MC and MCE instructions
X0 MC X1 DF 0 Y10

MCE 0

Time chart 1
X0 X1 Y10

Previous execution of DF instruction

The input condition (X1) for the DF instruction has not changed since the time of the previous execution, thus differential output is not obtained.

Time chart 2
X0 X1 Y10

Previous execution of DF instruction

The input condition (X1) for the DF instruction has changed from off to on since the time of the previous execution, thus differential output is obtained.

4 - 13
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Example 2: Using the CT instruction between JP and LBL instructions


R0 JP X0 CT 200 X1 1

LBL

Time chart 1
R0 X0
Counting operation

Final timing at which the previous JP instruction was not executed Time chart 2
R0 X0
Counting operation

The count is not incremented, because the final timing at which the previous JP instruction was not executed has not been changed, and the execution condition X0 for the counter input has not changed.

Final timing at which the previous JP instruction was not executed

The count is incremented, because the count input changed from off to on after the final timing at which the previous JP instruction was not executed.

4 - 14
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.4

Operation Errors

4.4

Operation Errors

4.4.1

Operation Errors

An operation error is a condition in which operation is impossible when a high-level instruction is executed. When an operation error occurs, the ERROR LED will light (for FP0, ERROR/ALARM LED will blink), and the operation error flags (R9007 and R9008) will turn on. The operation error code K45 (H2D) is set at special data register DT9000/DT90000. The error address is stored in special data registers DT9017 and DT9018/DT90017 and DT90018. With the FP0 C10, C14, C16, C32/FPe, the selfdiagnosis error codes are stored in DT9000, and addresses at which errors occurred are stored in DT9017 and DT9018. With the FP0R/FP0 T32C/FP/FPX/FP2/FP2SH/FP10SH, the selfdiagnosis error codes are stored in DT90000, and addresses at which errors occurred are stored in DT90017 and DT90018. Types of operation error Address error The memory address (number) specified by index modification is outside the area which can be used BCD data error Operation is attempted on nonBCD data when an instruction handling BCD data is executed, or BCD conversion is attempted on data which is not within the possible conversion range. Parameter error In an instruction requiring the specification of control data, the specified data is outside the possible range. Over area error The data manipulated by a block instruction exceeds the memory range.

4 - 15
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.4.2

Operation Mode when an Operation Error Occurs

Normally, the operation stops when an operation error occurs. However, when you set system register 26 to continuation (K1), the CPU operates even if an operation error occurs. System registers are specified as described below. Using programming tool software 1. Set the mode of the CPU to PROG. 2. 3. 4. 5. Select the Option in PLC Configuration option from the menu. On the PLC Configuration menu, select Action on error. This displays system registers 20 to 28. The check of system register 26 is removed. Press the OK to write the setting to the PLC.

Using FP programmer II Ver. 2 1. Set the mode of the CPU to PROG. 2. 3. Press the keys on the FP programmer II, as shown below.
ACLR () OP 5 0 ENT

Specify the register number (26) for the parameter to be set and read the parameter. The value set in the selected system register 26 will be displayed.
2 6 READ

4.

To change a set value, press the (HELP) CLR key and write the K1 parameter.

4 - 16
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.4

Operation Errors

4.4.3

Dealing with Operation Errors

Procedure: 1. Check the location of the error.


Check the address where the error occurred, which is stored in DT9017 and DT9018 or in DT90017 and DT90018, and make sure the application instruction for that address is correct and appropriate.

2.

Clear the error.


Use a programming tool to clear the error. (If the mode selector is set to RUN, RUN will resume as soon as the error is cleared.) In the STATUS DISPLAY menu of the programming tool software (NPSTGR Ver. 3.1 or later), press the F3 key. In FP Programmer II, press the following keys.
ACLR () OP 1 1 2 ENT SHIFT (DELT) SC INST

An error can be cleared by turning the power off and on in PROG. mode, however, the contents of the operation memory except the hold type data will be cleared. An error can also be cleared by executing the self-diagnostic error set instruction F148 (ERR).

4 - 17
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.4.4

Points to Check in Program

This is an example of a program in which an operation error is likely to occur. Check if an extraordinarily large value or negative value was stored in the index register. When a data register is modified using an index register
X0 F0 MV, DT0, IXDT0

In this case, index register (IX) modifies the address of data register DT0. If data in IX is larger than the last address of the data register, an operation error will occur. The same is true when the contents of IX are negative value. Is there any data which cannot be converted using BCD e BIN data conversion? When BCDtoBIN conversion is attempted
X0 F81 BIN, DT0, DT100

In this case, if DT0 contains a hexadecimal number with one of the digits A through F such as 12A4, the data conversion will be impossible and an operation error will result. When BINtoBCD conversion is attempted
X0 F80 BCD, DT1, DT101

In this case, if DT1 contains a negative value or a value greater than K9999, an operation error will occur. Check if the divisor of a division instruction is K0.
X0 F32 %, DT0, DT100, DT200

In this case, if the content of DT100 is K0, an operation error will occur.

4 - 18
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.5

Handling Index Registers

4.5
4.5.1

Handling Index Registers


Index Registers

Index registers are used for indirect specification of values to number (addresses) and operands in relays and memory areas. (This is also called index modification.) Add the index register to the relay, memory area, or constant you want to modify, and then write the modifying value (16-bit data) to the index register. The FP0 and FPe have two points, IX and IY. The FP0R, FP, FPX, FP2, FP2SH and FP10SH have 14 points, I0 to ID. To modify a 32-bit constant, write the 32-bit data to two words of the index register. Example: Transferring the contents of data register DT100 to the number specified by the contents of an index register.
X0 F0 MV, DT100, IXDT0

Base memory area

In this example, the number of the destination data register varies depending on the contents of IX with DT0 acting as a base. For example, when IX is K10, the destination will be DT10, and when IX is K20, the destination will be DT20. In this way, index registers allow the specification of multiple memory areas with a single instruction, and thus index registers are very convenient when handling large amounts of data. Changing banks in an index register of the FP2SH and FP10SH makes it possible to increase the number of points used in a program from 14 to a maximum of 224 (14 points, 16 banks).
Bank 0 I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 IA IB IC ID Bank 1 Bank 2 Bank F

4 - 19
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.5.2

Memory Areas Which can be Modified with Index Registers

Index registers can be used to modify other types of memory areas in addition to data registers DT. IXWX0, IXWY1, IXWR0, IXSV0, IXEV2, I0WX10, I2WY1, I3WR0, IASV0, IBEV2 Constants can also be modified. IXK10, IXH1001 In the FP2SH/FP10SH, the relay numbers can be modified. I0X0, IAR10 In the FP2/FP2SH/FP10SH, an index register can be modified using another index register. In the FP0/FPe, an index register cannot modify another index register. Possibility: I0ID Impossibility: IXIY, IXIX (except FP2/FP2SH/FP10SH) I0I0, IAIA (for FP2/FP2SH/FP10SH) When a 32-bit constant is modified, the specified number and the following number are used in combination to handle the data as a 32-bit data. The result of the modification is a 32-bit data.
In the FP0/FPe
Higher 16-bit area Lower 16-bit area

Contents of IY

Contents of IX

When using index modification with an instruction which handles 32-bit data, specify with IX.
In the FP0R/FP/FPX/FP2/FP2SH/FP10SH (example of specify with I0)
Higher 16-bit area Lower 16-bit area

Contents of I1

Contents of I0

When modifying a 32-bit number, do not specify ID. Be aware that a syntax error will not occur even if this is not specified.

4 - 20
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.5

Handling Index Registers

4.5.3

Example of Using an Index Register

Repeatedly reading in external data With the FP0R/FP/FPX/FP2/FP2SH/FP10SH, any value between I0 and ID should be specified in place of IX. Example: Writing the contents of word external input relay WX3 to a sequence of data registers beginning from DT0.
X0 F0 MV, K0, IX X1 DF F0 MV, WX3, IXDT0 F35 +1, IX
2 3 1

1 2

When X0 turns on, K0 is written to index register IX. When the X1 turns on, the contents of WX3 is transferred to the data register specified by IXDT0. Add 1 to IX. In this case, the contents of IX will change successively, and the destination data register will be as follows.
Input times of X1
1st 2nd 3rd :

Contents of IX
01 12 23 :

Destination data register


DT0 DT1 DT2 :

4 - 21
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Repeatedly changing the output destination (for FP2/FP2SH/FP10SH only) Example: Changing the output destination successively each time X0 turns on
R9013
1

F0 MV, K0, I0 X0 I0Y10

X0
3

F35 +1, I0

1 2 3

K0 is initially written to index register I0. When the X0 turns on, the first time Y10 will turn on. Add 1 to the value of I0. From this point on, the output destinations successively change as follows each time X0 turns on.
Input times of X0
1st 2nd 3rd :

Content of I0
0 1 2 :

Output destination
Y10 Y11 Y12 :

4 - 22
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.5

Handling Index Registers

Inputting and outputting data based on a number specified by an input With the FP0R/FP/FPX/FP2/FP2SH/FP10SH, any value between I0 and ID should be specified in place of IX. Example 1: Setting a timer number specified by a digital switch

Programmable controller

Timer number setting

Timer time setting

WX1

Digital switches

WX0

R0 DF F81 BIN, WX1, IX F81 BIN, WX0, IXSV0


1 2

Convert the BCD timer number data in WX1 to binary and set it in index register IX. Convert the BCD timer set value in WX0 to binary and stored in the timer set value area SV specified by contents of IX.

4 - 23
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Example 2: External output of the elapsed value in a timer number specified by a digital switch
WY3

Timer elapsed value display

7-segment indicator

Programmable controller

Timer number setting


R1 DF

Digital switches

WX1 F81 BIN, WX1, IX F80 BCD, IXEV0, WY3


1 2

Convert the BCD timer number data in WX1 to binary, and set it in index register IX. Convert the elapsed value data EV in the timer specified by IX to BCD, and output it to word external output relay WY3.

4 - 24
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.6

Handling BCD Data

4.6

Handling BCD Data

4.6.1

BCD Data

BCD is an acronym for binarycoded decimal, and means that each digit of a decimal number is expressed as a binary number. Example: Expressing a decimal number in BCD
Decimal number Each digit is converted to a binary number. BCD (Binarycoded decimal) 0110 0100 0101

4.6.2

Handling BCD Data in the Programmable Controller

When inputting data from a digital switch to the programmable controller or outputting data to a 7segment display (with decoder), the data must be in BCD form. In this case, use a data conversion instruction as shown in the examples at below. BCD arithmetic instructions (F40 through F58), also exist which allow direct operation on BCD data, however, it is normally most convenient to use BIN operation instructions (F20 through F38) as operation in the programmable controller takes place in binary. Input from a digital switch Use the BCDtoBIN conversion instruction F81 (BIN).
Digital switch
1 1 9 9 2 9 9 2

Data inputted into the programmable controller (BCD data) Data which can be processed in the programmable controller (BIN data)

0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0

Programmable controller

BCD BIN

(Conversion using F81 (BIN) instruction)

0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0

Converted to 1992 in decimal data.

4 - 25
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

Output to a 7segment display (with decoder) Use the BINtoBCD conversion instruction F80 (BCD).
Programmable controller BIN BCD (Conversion using F80 (BCD) instruction) Data processed in the programmable controller (BIN data) Data outputted from programmable controller (BCD data)
0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0

0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 1 9 9 2

7-segment display

4 - 26
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.7

Precautions for Programming

4.7

Precautions for Programming

Programs which do not execute correctly Do not write the following programs as they will not execute correctly. Program example 1:
X0 X1 X2

ANS
DF Y10

Program in which the example 1 is rewritten


X0 X0 X1 DF X2 Y10

Program example 2:
X0 X1 X2

ANS
TMX5, K30 Y10

Program in which the example 2 is rewritten


X0 X0 X1 X2 TMX 5, K 30 Y10

Program example 3:
X0 X1 X2 DF X3

PSHS
Y10 Y11

Program in which the example 3 is rewritten


X0 X1 X2 DF X3 Y10 Y11

ANS

When a combination of contacts are set as the trigger (execution condition) of a differential instruction (DF) or timer instruction, do not use an AND stack (ANS), push stack (PSHS), read stack (RDS), or pop stack (POPS) instruction.

4 - 27
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.8

Rewrite Function During RUN

4.8.1

Operation of Rewrite During RUN

How operation of rewrite during RUN Rewriting programs can be executed even in RUN mode. When a rewrite is attempted during RUN, the tool service time is temporarily extended, program rewriting is performed, and operation is resumed without the need to change the mode. For this reason, the time of the scan during the RUN rewrite extends from several ms to several hundreds of ms. Operation during rewrite External output (Y) is held. External input (X) is ignored. The timer (T) stops the clock. Rise and fall changes in the inputs of differential instructions (DF), counter instructions (CT), and left/right shift registers are ignored. Interrupt functions are stopped. Internal clock relays (special internal relays) are also stopped. Pulse output is stopped during the rewrite. Set values for timer/counter instructions All set values specified with decimal constants (K) in timer and counter instructions are preset in the corresponding set value areas (SV). Values in the elapsed value area (EV) do not change. Operation of rewrite during RUN completed flag The rewrite during RUN completed flag (R9034) is a special internal relay that goes on for only the first scan following the completion of rewriting in the RUN mode. It can be used instead of the initial pulse relay following a change in the program.

4 - 28
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.8

Rewrite Function During RUN

4.8.2

Cases Where Rewriting During Run is not Possible

When the timeout error message is indicated: Even if the timeout error message is indicated, it is highly possible that the program in PLC has been already rewritten. Carry out the following operations.

1. When ladder symbol mode As a ladder editing is left, set it to the offline edit mode. Complete the program conversion in the tool software, and then change to the online edit mode to check. 2. When boolean mode A ladder editing is cleared. Set it to the offline edit mode and carry out the editing operation again. After the operation, change to the online edit mode to check. When the timeout error occurs using the through mode in GT series programmable display. Extend the timeout time of the programmable display using the GTWIN. (The default setting is 5 seconds.) Select Transfer from File in the menu bar. The transfer data screen will open. Select Condition to open Communication Setting screen. Change the value for Timeout.Click OK button to complete the change of setting.

For FP0/FPe/FP/FPX/FP0R Cases where rewriting is not possible during RUN 1. When the result of rewriting is a syntax error. <Example> When executing the rewriting which does not form the following pair of instructions. 1. Step ladder instructions (SSTP/STPE) 2. Subroutine instructions (SUB/RET) 3. Interrupt instructions (INT/IRET) 4. JP/LBL
4 - 29
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

5. LOOP/LBL 6. MC/MCE Also, rewritng is not possible during RUN in case of other syntax errors. 2. During the forced input/output operation Interrupt restrictions When using interrupt, highspeed counter, pulse output or PWM output functions, do not perform a rewrite during RUN. If a rewrite during RUN is executed, the operation as below will be performed. Exercise caution. 1. Interrupt programs will be disabled. Enable by executing an ICTL instruction once again. <Example> Using R9034 (rewrite during RUN completed flag)
R9013 ICTL, S1, S2 R9034

2.

The highspeed counter will continue to count. Target value match on/off instructions (F166/F167) will continue. Coincidence interrupt programs will be disabled when the F166/F167 instruction is running. Pulse output and PWM output will be stopped.
Instruction number Name
Pulse output (with channel specification) (Home position return) Pulse output (with channel specification) (JOG operation) PWM output (with channel specification) Pulse output (with channel specification) (Selectable data table control operation) Pulse output (Linear interpolation) Pulse output (Circular interpolation) F172 (PLSH) F173 (PWMH)

3.
State
Stop Stop

Continue F171 (SPDH)

Continue F174 (SP0H) Continue F175 (SPSH) Stop F176 (SPCH)

4.

The fixed time sampling trace will not be stopped.

For FP2/FP2SH Instructions that cannot be added or deleted by rewriting during RUN 1. Step ladder instructions (SSTP/STPE) 2. Subroutine instructions (SUB/RET) 3. Interrupt instructions (INT/IRET) 4. Control instructions (ED/LBL) * The LBL instruction can be inserted/written, but cannot be deleted/erased. Instructions that cannot be added or deleted during subprograms 1. JP/LBL 2. LOOP/LBL 3. MC/MCE Cases where rewriting is not possible during RUN 1. When a syntax error occurred. 2. When the forced input/output operation is running.
4 - 30
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.8

Rewrite Function During RUN

4.8.3
Item

Procedures and Operation of Rewrite During RUN


FPWIN GR Ladder symbol mode FPWIN GR Boolean mode

Rewrite procedure

Maximum jof 128 steps.Changes are per- Rewriting performed by step.Caution is formed by block.When PG conversion is required as rewriting takes place simultaexecuted online, the program will be reneously with the change. written.

Block a

Block b

Operation of each instruciton

OT/KP

If an instruction written in block a is deleted in block b, the condition before the rewrite will be held.s

If an instruction written in block a is deleted in block b, the condition before the rewrite will be held. Y contact relays which are on bill be held in the on sattus. To turn them off in the RUN mode, use forced output. If an instruction written in block a is deleted in block b, the condition before the rewrite will be held. Set values specified by K constants in TM/CT instructions are preset in all of the corresponding SVs in the program. (Elapsed values EV do not change.) If deleted, the output memory area will be held. Writing or deleting a single instruction during RUN is not possible. Write or delete the instruction in FPWIN GR ladder symbol mode. Write in the order: RET, SUB, CALL Delete in the order: CALL, SUB, RET Write in the orde: IRET, INTDelete in the order: INT, IRET

TM/CT

If an instruction written in block a is deleted in block b, the condition before the rewrite will be held. Set values specified by K constants in TM/CT instructions are preset in all of the corresponding SVs in the program. (Elapsed values EV do not change.)

Fun Highlevel instructions MC/MCE

If an instruction written in block a is deleted in block b, the condition before the rewrite will be held. When writing MC/MCE instructions, be sure to write the instructions as a pair.

CALL/SUB/ RET

A subroutine is a program appearing between SUBn and RET instructions. Be sure to write it to an address which follows the ED instruction. An interrupt program is an program appearing between INTn and IRET instructions. Be sure to write it to an address which follows the ED instruction. A distance with the same number cannot be defined twice. An SSTP instruction cannot be written in a subprogram.

INT/IRET

SSTP/STPE

Writign and deletion of a single instruction is not possible for a program with no step ladder area.Write or delete both instructions simultaneously in FPWIN GR ladder symbol mode. In the case of an SSTP instruction only, writing and deletion of a single instruction is possible for a program with a step ladder area.

JP/LOOP/ LBL

Be sure to write the instruction for setting the loop number before LBLLOOP instructions.

Write in the order: JPLBL or LOOP LBLDelete in the order: LBLJP or LBL LOOP

4 - 31
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.9
4.9.1

Processing During Forced Input and Output


Processing when forced input/output is initiated during RUN

Forced reset/reset processing

A External input

PLC X Y

Input/output update

External output

Forced reset/reset processing

Operation

Forced reset/reset processing

Peripheral service

1. Processing of external input (X) Regardless of the state of the input from the input device, forced on/off operation will take precedence at a contact specified for forced input/output in the above procedure B. At this time, the input LED will not blink, however, the area of input X in the operation memory will be rewritten. Contacts not specified will read in the on/off state according to the condition of the inptu from the input device. 2. Processing of external output (Y) Regardless of the result of operation, forced on/off will take precedence at a contact specified for forced input/ouput in the above procedure A. At this time, the area of output Y in the operation memory will be forcedly rewritten. External output will take place according to the input/output update timing in the above diagram. The on/off state of contacts not specified will be determined by the operation result. 3. Processing of Timer (T) and Counter (C) Regardless of the timer/counter input condition, forced on/off operation will take precedence at a contact specified for forced input/output. At this time, the contact of the timer (T) or counter (C) in the operation memory will be rewritten. Timing and counting will not take place during control. The on/off state of contacts not specified will be determined by the operation result.
4 - 32
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.9

Processing During Forced Input and Output

Operation during operation For smallsized PLCs FP0R, FP0, FP and FPX Forced relay R and output Y are rewritten according to the results of operation. For mediumsized PLCs FP2 and FP2SH For the relay and output Y specified by OT or KP instruction, the value of the forced processing has a priority. When rewritten by a highlevel instruction, the result of the instruction has a priority.

4 - 33
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4.10 Second Program Area (FP2SH, FP10SH)


Explanation of operation method for FP2SH and FP10SH For the type of FP2SH of which program capacity exceeds 60k steps and for the type of FP10SH of which program capacity exceeds 60k steps if the memory is added, the program area is divided into the first program area and the second program area. The divided programs are separate program units, however, uploading and downloading with TOOL is performed simultaneously. There are following restrictions for the operation devices.
Device and function
Bits X, Y, R, LWords WX, WY, WR, WL, DT, Ld, In, Fl SALL Subroutine call SUB Subroutine entry JP Jump LBL Label INT Interrupt program SSTP Step ladder MC, MCE Master control

First program
Common device The subroutine of the second program cannot be called up. 100 255 (However, jumping to the second program is not possible.) 255 Can be written in the first program only. Can be written in the first program only. 255 (A pair must be formed in the first program.)

Second program

The subroutine of the first program cannot be called up. 100 255 (However, jumping to the first program is not possible.) 255 Cannot be used. Cannot be used. 255 (A pair must be formed in the second program.)

Syntax check For SUB, JP, LBL, MC and MCE, the checks are performed as the above table. The duplicated output of OT and KP instructions and the duplicated use of timer and counter instructions are checked throughout the first and second programs.

4 - 34
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

4.10 Second Program Area (FP2SH, FP10SH)

Operation flow diagram of FP2SH and FP10SH


I/O update As shown in the left diagram, the second program is executed after the first program has completed. At the points when the first program or the second program starts, the following settings will be automatically selected. Index register bank = 0 File register bank = 0

Index register bank = 0 File register bank = 0

First program operation

Index register bank = 0 File register bank = 0

Second program operation

Tool service

Program switching method with FPWIN GR Select Edit Switch Programming Area in the menu bar to change the program area.

First program

Second program

Note

The monitor data in the tool software is the data monitor when both first and second programs complete.

4 - 35
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Precautions Concerning Programs

4 - 36
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Chapter 5 Appendix

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Appendix

........................................................................................ 5-1

5.1 System Registers / Special Internal Relays / Special Data Registers....... 5-3
5.1.1 Table of System Registers for FP0 ............................................................5-5 5.1.2 Table of Special Internal Relays for FP0 .................................................5-15 5.1.3 Table of Special Data Registers for FP0..................................................5-18 5.1.4 Table of System Registers for FP-e .........................................................5-28 5.1.5 Table of Special Internal Relays for FP-e ................................................5-32 5.1.6 Table of Special Data Registers for FP-e.................................................5-36 5.1.7 Table of System Registers for FP0R........................................................5-43 5.1.8 Table of Special Internal Relays for FP0R...............................................5-49 5.1.9 Table of Special Data Registers for FP0R ...............................................5-59 5.1.10 Table of System Registers for FP ........................................................5-78 5.1.11 Table of Special Internal Relays for FP ...............................................5-84 5.1.12 Table of Special Data Registers for FP ...............................................5-93 5.1.13 Table of System Registers for FP-X.....................................................5-107 5.1.14 Table of Special Internal Relays for FP-X............................................5-119 5.1.15 Table of Special Data Registers for FP-X ............................................5-130 5.1.16 Table of System Registers for FP2/FP2SH/FP10SH...........................5-151 5.1.17 Table of Special Internal Relays for FP1/FP-M/FP2/FP2SH/FP10SH/FP3 .............................................................................................................5-165 5.1.18 Special Data Registers for FP2/FP2SH/FP3/FP10SH.........................5-176

5.2 Table of Basic Instructions .................................................................... 5-201 5.3 Table of High-level Instructions ............................................................. 5-209 5.4 Table of Error codes.............................................................................. 5-229 5.5 MEWTOCOL-COM Communication Commands .................................. 5-242 5.6 Hexadecimal/Binary/BCD...................................................................... 5-243 5.7 ASCII Codes.......................................................................................... 5-244

5-2
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1 System Registers / Special Internal Relays / Special Data Registers


Precation for System Registers What is the system register area System registers are used to set values (parameters) which determine operation ranges and functions used. Set values based on the use and specifications of your program. There is no need to set system registers for functions which will not be used. Type of system registers The registers to be used depend on each PLC. (1) Allocation of user memory (System registers 0, 1 and 2) These registers set the size of the program area and file register area, allowing the user memory area to be configured for the environment used. The size of the memory area will vary depending on the type. (2) Allocation of timers and counters (System register 5) The number of timers and counters is set by specifying the starting counter number. (3) Hold/non-hold type setting (System registers 6 to 18) When these registers are set to hold type, the values in the relays and data memory will be retained even if the system is switched to PROG. mode or the power is turned off. If set to non-hold type, the values will be cleared to 0. (4) Operation mode setting on error (System registers 4, 20 to 28) Set the operation mode when errors such as battery error, duplicated use of output, I/O verification error and operation error occur. (5) Time settings (System registers 30 to 34) Set time-out error detection time and the constant scan time. (6) Remote I/O operation settings (System registers 35 and 36) These registers are used to select whether or not to wait for a slave station connection when the remote I/O is started, and the remote I/O update timing. (7) MEWNET-W0/MEWNET-W/P PLC link settings (System registers 40 to 47, 50 to 55, and 57) These settings are for using link relays and link registers for MEWNET-W0/MEWNET-W/P PC(PLC) link communication. Note) The default value setting is no PC(PLC) link communication. (8) MEWNET-H PC(PLC) link settings (System register 49) Set the data size to be processed during one scan in the MEWNET-H PC(PLC) link communication. (9) Input settings (System registers 400 to 406) When using the high-speed counter function, pulse catch function or interrupt function, set the operation mode and the input number to be used for the function. (10) Input time constant settings (FP1/FP-M System registers 404 to 407) Changing the input signal width to be loaded enables to prevent the malfunctions caused by chattering or noises. (11) Number of temperature input averaging process settings (System register 409) The number of averaging times can be set in order to even out the variation in the input thermocouple values. For normal use it, set the number of times to t least twenty. For default value 0, the number of average processing times is 20. (12) Tool and COM. ports communication settings (System registers 410 to 421) Set these registers when the Tool port,and COM1 and COM2 ports are to be used for computer link,

general-purpose serial communication, PC(PLC) link, and modem communication.Note that the default setting is computer link mode.
5-3
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Checking and changing the set value of system register If you are going to use a value which is already set(the value which appears when read), there is no need write it again. Using programming tool software Produce: 1. Set the control unit in the PROG mode. 2.Option ->PLC Configuration 3.When the function for which setting are to be entered is selected in the PLC Configuration dialog box,the value and setting status for the selected system register are displayed. To change the value and setting status,write in the new value and /or select the setting status. 4.To register these settings,choose OK Precautions for system register setting -System register settings are effective from the time they are set. However, input settings,tool port,COM port,and modem connection settings become effective when the mode is changed from PROG. to RUN. With regard to the modem connection setting, when the power is turned off and on or when the mode is changed from PROG. to RUN, the controller sends a command to the modem which enables it for reception. -When the initialized operation is performed, all set system register values (parameters) will be initialized

5-4
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.1 Table of System Registers for FP0


Content of system register settings 1. Setting the timers and counters (System register 5) By indicating the counter start number, the timer and counter are split into two areas. The timer and counter together total 144 points, and the default value for th split is 100. Thus the point allotment is as shown in the table below. Timer Counter 100 points (No. 0 to No. 99) 44 points (No. 100 to No. 143)

Setting example To increase the number of timers to 120, change the value of system register 5 to K120.

For T32, set the system registers 5 and 6 to the same value. This sets the timer to a non-hold type and counter to a hold type. By setting system register 5 to 0, the whole area becomes the counter. Also, by setting it to the value 144, the whole area becomes the timer.

5-5
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

2. Hold types and non-hold type settings (System registers 6 to 8 and 14) With the C10/C14/C16/C32/SL1, the areas held in the event of a power supply interruption are fixed at the areas shown in the table below, and the settings for system registers 6 to 8 and 14, will be invalid. C10/C14/C16 Timer Counter

Internal relay

Data register C32/SL1 Timer Counter

Non-hold type: All points Non-hold type: From the set value to C139 Hold type: 4 points (elapsed values )C140 to C143 976 points (R0 to R60F) Non-hold type: 61 words (WR0 to WR60) 32 points (R610 to R62F) Hold type: 2 words (WR61 to WR62) Non-hold type: 1652 words (DT0 to DT1651) Hold type: 8 words (DT1652 to DT1659)

Internal relay

Data register

Non-hold type: All points Non-hold type: From the set value to C127 Hold type: 16 points (elapsed values )C128 to C143 880 points (R0 to R54F) Non-hold type: 55 words (WR0 to WR54 128 points (R550 to R62F) Hold type: 8 words (WR55 to WR62) Non-hold type: 6112 words (DT0 to DT6111) Hold type: 32 words (DT6112 to DT6143)

With the T32, set each relay and register to a hold type or non-hold type.

For normal situations, set the system registers 5 and 6 to the same value. This sets the timer to a nonhold type and counter to a hold type. By setting this value to 0, the whole area becomes hold type. Also, by setting it to the valeu 1 higher than the last number, the whold area becomes non-hold type. C32/SL1 Type Area Timer Counter Internal Non-hold type relay Hold type Data register T32 All non-hold type All hold type Non-hold type: 10 words (WR0 to WR9) Hold type: 53 words (WR10 to WR62) All hold type

5-6
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of system registers C10, C14, C16, C32, T32 and SL1 in the table respectively indicate 10-point, 14-point, 16-point, 32-point type and S-LINK type FP0 control units. AddDefault Item Name Descriptions ress value The set values are fixed and cannot be changed. AllocaThe stored values vary depending on Sequence program area tion of 0 the type. user capacity K3: 3K words (C10, C14, C16) memory K5: 5K words (C32, SL1) K10: 10K words (T32) Timer and counter 100 0 to 144 5 division (setting of (K100) (K0 to K144) starting counter number) Set the system registers 5 and 6 to Hold type area starting the same value. 100 0 to 144 number setting for timer 6 and counter (K100) (K0 to K144) (Available type: T32) Hold type area starting Hold/ number setting for internal 10 Non7 0 to 63 (K0 to K63) (K10) relays (in word units) hold (Available type: T32) Hold type area starting number setting for data 0 8 0 to 16384 (K0 to K16384) registers (K0) (Available type: T32) Hold or non-hold setting Non-hold Hold (K10) 14 for step ladder process (K1) Non-hold (K1) (Available type: T32) Disable or enable setting Disable Disable (will be syntax error) (K0) 20 for duplicated output (K0) Enable (will not be syntax error) (K1) Operation setting when an Stop Stop (K0) 23 I/O verification error (K0) Operate (K1) occurs Action Operation setting when an Stop Stop (K0) on error 26 operation error occurs (K0) Operate (K1) Operation settings when communication error Operate Stop (K0) 27 (K1) Operate (K1) occurs in the remote I/O (S-LINK) system Note) The setting values of the system registers No. 6, 7, 8 and 14 becomes invalid with the types other than T32.

5-7
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Item Address Name Default value Descriptions 10 ms to 81900 ms (K4 to K32760) Used of default setting (K2600/6500 ms) is recommended. Wait time setting for multi-frame communication

31

6500 ms (K2600)

Time setting

2.5 ms to 160 ms (K1 to K64 ): Scans once each specified time interval. 0 (K0):Normal scan Constant value settings for scan time 0 ms (K0)

34

Input setting

400

High-speed counter mode settings (X0 to X2)

Setting by programming tool software

Do not set X0 as highspeed counter.

CH0

Do not set X1 as highspeed counter.

CH1

Do not set X0 as high-speed counter. 2-phase input (X0, X1) 2-phase input (X0, X1), Reset input (X2) Incremental input (X0) Incremental input (X0), Reset input (X2) Decremental input (X0) Decremental input (X0), Reset input (X2) Individual input (X0, X1) Individual input (X0, X1), Reset input (X2) Direction decision (X0, X1) Direction decision (X0, X1), Reset input (X2) Do not set X1 as high-speed counter. Incremental input (X1) Incremental input (X1), Reset input (X2) Decremental input (X1) Decremental input (X1), Reset input (X2)

Note1) If the operation mode is set to 2-phase, individual, or direction differentiation, the setting for CH1 is invalid. Note2) If reset input settings overlap, the setting of CH1 takes precedence. Note3) If system register 400 to 403 have been set simultaneously for the same input relay, the following precedence order is effective: [High-speed counter] [Pulse catch] [Interrupt input]. 5-8
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Item Address Name Default value Descriptions

Input setting

400

Highspeed counter mode settings (X0 to X2)

Setting by FP programmer II

H0

CH0/ CH1

Note1) If the operation mode is set to 2-phase, individual, or direction differentiation, the setting for CH1 is invalid. Note2) If reset input settings overlap, the setting of CH1 takes precedence. Note3) If system register 400 to 403 have been set simultaneously for the same input relay, the following precedence order is effective: [High-speed counter] [Pulse catch] [Interrupt input].

5-9
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Item Address Name Default value Descriptions


Do not set X3 as high-speed counter. 2-phase input (X3, X4) 2-phase input (X3, X4), Reset input (X5) Incremental input (X3) Incremental input (X3), Reset input (X5) Decremental input (X3) Decremental input (X3), Reset input (X5) Individual input (X3, X4) Individual input (X3, X4), Reset input (X5) Direction decision (X3, X4) Direction decision (X3, X4), Reset input (X5) Do not set X4 as high-speed counter. Incremental input (X4) Incremental input (X4), Reset input (X5) Decremental input (X4) Decremental input (X4), Reset input (X5)

Do not set X3 as highspeed counter.

CH2

Do not set X4 as highspeed counter. Highspeed counter mode settings (X3 to X5) Setting by programming tool software

CH3

Input setting

401

H0

CH2/ CH3

Note1) If the operation mode is set to 2-phase, individual, or direction differentiation, the setting for CH3 is invalid. Note2) If reset input settings overlap, the setting of CH3 takes precedence. Note3) If system register 400 to 403 have been set simultaneously for the same input relay, the following precedence order is effective: [High-speed counter] [Pulse catch] [Interrupt input]. 5-10
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Item Address Name Default value Descriptions

The checked contacts are set as pulse catch input. In FP Programmer II, enter the above settings in hexadecimal. Example: When X3 and X4 are set as pulse catch input

402

Pulse catch input function settings

Not set (H0)

Settings X6 and X7 are invalid. Using FPWIN GR Input setting

The checked contacts are set as interrupt input.

Specify the effective interrupt edge. (When set: ONOFF is valid) Not set (H0) Using FP Programmer II Example: When setting inputs X0, X1, X2 and X3 as interrupts, and X0 and X1 are set as interrupt inputs when going from on to off.

403

Interrupt input settings

Note1) With the TOOL software, 0 or 1 is set for each bit on the screen in the setting for system register 403. Note2) If system register 400 to 403 are set simultaneously for the same inptu relay, the following precedence order is effective: [High-speed counter] [Pulse catch] [Interrupt input]. When the high-speed counter is being used in the incremental input mode, even if input X0 is specified as an interrupt input and as pulse catch input, those settings are invalid, and input X0 functions as counter input for the high-speed counter. No. 400: H1 a This setting will be valid. No. 402: H1 No. 403: H1

5-11
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Item Address 410 Name Unit No. setting for tool port (when connecting CNET) Default value 1 (K1) Descriptions 1 to 32 (K1 to K32) Using FPWIN GR Modem: Disable/Enable Data length: 7 bits/8 bits Using FP programmer II Specify the setting contents using H constants. Modem: Disabled Data length: 8 bits (H0)

Tool port setting

411

Communication format setting for tool port

When connecting a modem, set the unit number to 1 with system register 410. 414 Baud rate setting Setting by program ming tool software 9600 (H0) 0: 9600 bps 1: 19200 bps

Tool port/ RS232C port setting

414

Baud rate setting for tool port and RS232C port

Setting by FP programmer II

H1

If 19200 bps is set for both the tool port and RS232C port, H100 should be written.

5-12
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Item Address Name Default value Descriptions Using FPWIN GR Not used Computer link General-purpose communication Using FP programmer II K0: RS232C port is not used. K1: Computer link mode (when connecting C-NET) K2: Serial data communication mode (general port) Using FPWIN GR - Data length: 7 bits/8bits - Parity check: None/Odd/Even - Stop bit: 1/2 * The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator CR/CR+LF/None/ETX - Start code: STX not exist/STX exist Using FP programmer II Specify the setting contents using H constants.

412

Selection of operation

Not used (K0)

413 RS232C port setting

Communication format

Start code: None Terminal code: CR Stop bit: 1 bit Paritycheck: With odd Data length: 8 bits (H3)

414

Baud rate setting

Setting by programming tool software

9600 (H1)

19200 bps 9600 bps 4800 bps 2400 bps 1200 bps 600 bps 300 bps 1 to 32 (K1 to K32) Using FPWIN GR Diable/Enable Using FP programmer II H0: Modem disabled H8000: Modem enabled

415

Unit no. (when connecting C-NET)

1 (K1) Disable (H0)

416

Modem connection

5-13
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Item

Address 417

Name Starting address setting for received buffer C10C/C14 C/C16C C32C/SL1 T32C

Default value 0 (K0) 1660 (K1660) 6144 (K6144) 16384 (K16384)

Descriptions C10C/C14C/C16C: 0 to 1659 (K0 to K1659) C32C/SL1: 0 to 6143 (K0 to K6143) T32C: 0 to 16383 (K0 to K16383) 0 to 1660 (K0 to K1660) 0 to 6144 (K0 to K6144) 0 to 16384 (K0 to K16384)

418

Capacity setting for reception buffer

5-14
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.2 Table of Special Internal Relays for FP0


The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. FP0 Address R9000 R9001 to R9003 R9004 R9005, R9006 R9007

Name Self-diagnostic error flag Not used I/O verification error flag Not used Operation error flag (hold) Operation error flag (non-hold) Carry flag

Description Turns on when a self-diagnostic error occurs. The self-diagnostic error code is stored in DT9000.

Turns on when an I/O verification error occurs. The position number of the I/O where the verification error was occurred is stored in DT9010. Turns on and keeps the on state shen an operation error occurs. The address where the error occurred is stored in DT9017. (Indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT9018. The contents change each time a new error occurs. Turns on for an instant, - when an overflow or underflow occurs. when 1 is set by one of the shift instructions. Turns on for an instant when the compared results become larger in the F60 (CMP) to F63 (DWIN) comparison instructions. Turns on for an instant, - when the compared results are equal in the comparison instructions (F60 to F63). - when the calculated results become 0 in the arithmetic instructions. Turns on for an instant when the compared results become smaller in the F60 (CMP) to F63 (DWIN) comparison instructions. Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137(STMR)/F183(DSTM) auxiliary timer instruction. It turns off when the trigger for auxiliary timer instruction turns off. This turns on when an error occurs during communication with a programming tool. Turns on when the scan time exceeds the time specified in system register 34 during constant scan execution. Always on. Always off. Turns on and off alternately at each scan.

R9008

R9009

R900A

> Flag

R900B

= Flag

R900C

< Flag

R900D

Auxiliary timer contact

R900E R900F R9010 R9011 R9012

Tool port error flag Constant scan error flag Always on relay Always off relay Scan pulse relay

5-15
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Address R9013 R9014 R9015 R9016, R9017 R9018

Name Initial on pulse relay Initial off pulse relay Step ladder initial on pulse relay Not used 0.01 s clock pulse relay 0.02 s clock pulse relay 0.1 s clock pulse relay

Description Turns on only at the first scan in the operation. Turns off from the second scan and maintains the off state. Turns off only at the first scan in the operation. Turns on from the second scan andmaintains the on state. Turns on for an instant only in the first scan of the process the moment step ladder process is opened.

Repeats on/off operations in 0.01 s cycles. Repeats on/off operations in 0.02 s cycles. Repeats on/off operations in 0.1 s cycles. Repeats on/off operations in 0.2 s cycles. Repeats on/off operations in 1 s cycles. Repeats on/off operations in 2 s cycles. Repeats on/off operations in 1 min cycles. Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Turns on while the F149 (MSG) instruction is executed. Turns on while the mode selector is set to REMOTE. -

R9019

R901A

R901B

0.2 s clock pulse relay

R901C

1 s clock pulse relay

R901D

2 s clock pulse relay 1 min clock pulse relay Not used RUN mode flag

R901E R901F R9020

R9021 to Not used R9025 R9026 Message flag (*Note) R9027 Remote mode flag (*Note) R9028 Not used Note) Used by the system.

5-16
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0 Address R9029 (*Note) R902A (*Note) R902B (*Note) R902C to R902F R9030, R9031 R9032 R9033 R9034 R9035 R9036 R9037 R9038

Name Forcing flag External interrupt enable flag Interrupt error flag Not used Not used RS232C port mode flag Printout instruction flag Rewrite during RUN flag S-LINK I/O communication error flag S-LINK communication status flag RS232C communication error flag RS232C reception completed flag RS232C transmission completed flag High-speed counter control flag High-speed counter control flag High-speed counter control flag High-speed counter control flag

Description Turns on during forced on/off operation for input/output relay timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Turns on when an interrupt error occurs. When General-use port is selected, K2 goes on. Turns on while a F147 (PR) instruction is executed. Turns off when a F147 (PR) instruction is not executed. This is a special internal relay that goes on for only the first scan following the completion of rewriting in the RUN mode. (CPU Ver. 2.1 or later available) Turns on when the S-LINK error (ERR 1, 3 or 4) occurs using S-LINK system. Turns on when communication is taking place with an SLINK input/Ooutput unit. Turns on when the serial data communication error occurs. Turns on when a terminator is received during the serial data communicating. Turns on while data is not send during the serial data communicating. Turns off while data is being sent during the serial data communicating. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed.
-

R9039

R903A

ch0

R903B

ch1

R903C

ch2

R903D

ch3

R903E, Not used R903F Note) Used by the system.

5-17
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.3 Table of Special Data Registers for FP0


The special data registers are one word (16-bit) memory areas which store specific information. With the exception of registers for which Writing is possible is indicated in the Description column, these registers cannot be written to. Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90000 DT90010 DT90014 DT9000 DT9010 DT9014

Name

Descriptions

Self-diagnostic error code I/O verify error unit Auxiliary register for operation

DT90015

DT9015 Auxiliary register for operation

DT90016

DT9016

The self-diagnostic error code is stored here when a self-diagnostic error occurs. Monitor the error code using decimal display. The position of the I/O for which an error occurred is stored in bits 0 to 3. One shift-out hexadecimal digit is stored in bit positions 0 to 3 when F105 (BSR) or F106 (BSL) instruction is executed. The divided remainder (16-bit) is stored in DT9015/DT90015 when F32(%) or F52(B%) instruction is executed. The divided remainder (32-bit) is stored in DT9015 and DT9016/DT90015 and DT90016 when F33(D%) or F53(DB%) instruction is executed. After commencing operation, the address where the first operation error occurred is stored. Monitor the address using decimal display. The address where an operation error occurred is stored. Each time an error occurs, the new address overwrites the previous address. At the beginning of scan, the address is 0. Monitor the address using decimal display. The data stored here is increased by one every 2.5 ms. (H0 to HFFFF) Difference between the values of the two points (absolute value) x 2.5 ms = Elapsed time between the two points.

DT90017

DT9017

Operation error address (hold)

DT90018

DT9018

Operation error address (non-hold )

DT90019

DT9019

2.5 ms ring counter

5-18
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1

Name

Descriptions

DT9020 (Availabl e type: SL1)

S-LINK status flag/error flag Notes - ERR1 and ERR3 occur even if the power supply on the S-LINK side is interrupted, but are canceled when the power supply is turned on again. - ERR4 is held. To cancel it, repair the disconnected wire in the S-LINK syste, or whatever iscausing the problem, and then either turn the power to the FP0 on again, press the SET switch to reset it, or turn the power supply on again on the S-LINK unit side.

5-19
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1

Name

Descriptions

(When normal)

DT9021 (Availabl e type: SL1)

No. of units connected to S-LINK/error address

Note - When the SET switch is pressed, the number of input/output units connected to the S-LINK system is set. (If the same address has been specified for multiple units, the units are counted as a single unit. This is invalid, however, if an ERR4 error is in progress.) (If ERR4 occurs)

The current scan time is stored here. Scan time is calculated using the formula: DT90022 DT9022 Scan time (ms) = stored data (decimal) x 0.1 K50 indicates 5 ms. Scan time display is only possible in RUN mode, and shows the operation cycle time. The maximum and minimum values are cleared when each the mode is switched between RUN mode and PROG. mode. Scan time (current value) (*Note)

5-20
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90023 DT9023

Name

Descriptions

Scan time (minimum value) (*Note1)

DT90024

DT9024

Scan time (maximum value) (*Note 1)

DT90025 (*Note2)

DT9025 (*Note2)

Mask condition monitoring register for interrupts (INT 0 to 5)

The minimum scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The maximum scan time is stored here. The scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K125 indicates 12.5 ms. The mask conditions of interrupts using ICTL instruction can be monitored here. Monitor using binary display.

DT90026 DT90027 (*Note2) DT90028 DT90029 DT90030 (*Note2) DT90031 (*Note2) DT90032 (*Note2) DT90033 (*Note2) DT90034 (*Note2) DT90035 (*Note2) DT90036

DT9026 DT9027 (*Note2) DT9028 DT9029 DT9030 (*Note2) DT9031 (*Note2) DT9032 (*Note2) DT9033 (*Note2) DT9034 (*Note2) DT9035 (*Note2) DT9036

Not used Periodical interrupt interval (INT24) Not used Not used

The value set by the ICTL instruction is stored. K0: periodical interrupt is not used. K1 to K3000: 10ms to 30s -

Character storage by F149 MSG instruction

The contents of the specified message are stored in these special data registers when F149 (MSG) instruction is executed.

The number of data that match the searched Work 1 for F96 (SRC) data is stored here when F96 (SRC) instruction DT90037 DT9037 instruction is executed. Note1) Scan time display is only possible in RUN mode and shows the operation cycle time. The maximum and minimum values are cleared when each mode is switched between RUN mode and PROG. mode. Note2) Used by the system.

Not used

5-21
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90038 DT90039 to DT90043 DT90044 DT9038 DT9039 to DT9043 DT9044

Name

Descriptions

Work 2 for F96 (SRC) instruction Not used

The position of the first matching data, counting from the starting 16-bit area, is stored here when an F96 (SRC) instruction is executed. The elapsed value (24-bit data) for the highspeed counter is stored here. Each time the ED instruction is executed, the elapsed value for the high-speed counter is automatically transferred to the special registers DT9044 and DT9045/DT90044 and DT90045. The value can be written by executing F1 (DMV) instruction. The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction F166 to F170 is executed. These preset values can only be read, and cannot be written. The elapsed value (24-bit data) for the highspeed counter is stored here. Each time the ED instruction is executed, the elapsed value for the high-speed counter is automatically transferred to the special registers DT9048 and DT9049/DT90048 and DT90049. The value can be written by executing F1 (DMV) instruction. The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction F166 to F170 is executed. These preset values can only be read, and cannot be written.

High-speed counter elapsed value for ch0 (*Note1) DT90045 DT9045

DT90046

DT9046 High-speed counter target value for ch0 (*Note1)

DT90047

DT9047

DT90048

DT9048 High-speed counter elapsed value area for ch1 (*Note1)

DT90049

DT9049

DT90050

DT9050 High-speed counter target value area for ch1 (*Note1)

DT90051

DT9051

Note1) In the FP0 compatibility mode of FP0R, it is 32-bit data.

5-22
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1

Name

Descriptions

A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, stop high-speed counter instruction (F168), and clear the high-speed counter. Control code setting

DT90052

DT9052

High-speed counter control flag

Software is not reset: H0 (0000) Perform software reset: H1 (0001) Disable count: H2 (0010) Disable hardware reset: H4 (0100) Stop pulse output (clear instruction): H8 (1000) Perform software reset and stop pulse output: H9 (1001) The 16 bits of DT9052/DT90052 are allocated in groups of four to high-speed channels 0 to 3 as shown below.

DT90053

Real-Time Clock (Clock/Calendar) monitor (hour/minute)

A hardware reset disable is only effective when using the reset input (X2 and X5). In all other cases it is ignored. When using pulse output, a hardware reset input is equivalent to an home point proximate input. Hour and minute data of the Real-Time Clock (Clock/Calendar) are stored here. This data is read-only data; it cannot be overwritten.

5-23
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1

Name

Descriptions The year, month, day, hour, minute, second, and day-of-the-week data for the Real-Time Clock (Clock/Calendar) is stored. The built-in RealTime Clock(Clock/Calendar) will operate correctly through the year 2099 and supports leap years. The Real-Time Clock (Clock/Calendar) can be set (the time set) by writing a value using a programming tool software or a program that uses the F0 (MV) instruction.

DT90054

Real-Time Clock (Clock/Calendar) monitor and setting (minute/second) Real-Time Clock (Clock/Calendar) monitor and setting (day/hour) Real-Time Clock (Clock/Calendar) monitor and setting (year/month)

DT90055

DT90056

DT90057

Real-Time Clock (Clock/Calendar) monitor and setting (day-of-the-week)

As a day of the week is not automatially set on FPWIN GR, fix what day is set to 00, and set each value for 00 to 06.

5-24
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1

Name

Descriptions

The Real-Time Clock(Clock/Calendar) is adjusted as follows. When setting the Real-Time Clock (Clock/Calendar) by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.) Example: Set the time to 12:00:00 on the 5th day when the X0 turns on.

DT90058

Real-Time Clock (Clock/Calendar) time setting and 30 seconds correction

If you changed the values of DT90054 to DT90057 with the data monitor functions of programming tool software, the time will be set when the new values are written. Therefore, it is unnecessary to write to DT90058. When the correcting times less than 30 seconds By setting the lowest bit of DT90058 to 1, the value will be moved up or down and become exactly 0 seconds. After the correction is completed, DT90058 is cleared to 0. Example: Correct to 0 seconds with X0 turns on

At the time of correction, if between 0 and 29 seconds, it will be moved down, and if the between 30 and 59 seconds, it will be moved up. In the example above, if the time was 5 minutes 29 seconds, it will become 5 minutes 0 second; and, if the time was 5 minutes 35 seconds, it will become 6 minutes 0 second. Note) After discharging the battery (including when the power is turned on for the first time), the values of DT90053 to DT90058 change at random. Once the time and date have been set, these values will function normally. 5-25
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1

Name

Descriptions

DT90059

DT9059

Serial communication error code

- Tool port bit 0=1: Over run error bit 1=1: Framing error bit 2=1: Parity error - RS232C port bit 8=1: Over run error bit 9=1: Framing error bit 10=1: Parity error

DT90060

DT9060

DT90061

DT9061

DT90062

DT9062

DT90063

DT9063

DT90064

DT9064

Step ladder process

DT90065

DT9065

DT90066

DT9066

DT90067

DT9067

Process number: 0 to 15 Process number: 16 to 31 Process number: 32 to 47 Process number: 48 to 63 Process number: 64 to 79 Process number: 80 to 95 Process number: 96 to 111 Process number: 112 to 127

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on1. Monitor using binary display.

A programming tool software can be used to write data.

5-26
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90104 DT9104

Name

Descriptions

High-speed counter elapsed value area for ch2 (*Note1) DT90105 DT9105

The elapsed value (24-bit data) for the highspeed counter is stored here. Each time the ED instruction is executed, the elapsed value for the high-speed counter is automatically transferred to the special registers DT9104 and DT9015/DT90104 and DT90105. The value can be written by executing a DMV (F1) instruciton. The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction F166 to F170 is executed. These preset values can only be read, and cannot be written. The elapsed value (24-bit data) of the highspeed counter is stored here. Each time the ED instruction is executed, the elapsed value for the high-speed counter is automatically transferred to the special registers DT9108 and DT9109/DT90108 and DT90109. The value can be written by executing a DMV (F1) instruction. The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction F166 to F170 is executed. These preset values can only be read, and cannot be written.

DT90106

DT9106 High-speed counter target value area for ch2 (*Note1)

DT90107

DT9107

DT90108

DT9108 High-speed counter elapsed value area for ch3 (*Note1)

DT90109

DT9109

DT90110

DT9110 High-speed counter target value area for ch3 (*Note1)

DT90111

DT9111

Note1) In the FP0 compatibility mode of FP0R, it is 32-bit data.

5-27
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.4 Table of System Registers for FP-e


FP-e
No. 5 6 Hold/ Nonhold Name Starting number setting for counter Hold type area starting number setting for timer and counter Hold type area starting number setting for internal relays Hold type area starting number setting for data registers Hold or non-hold setting for step ladder process Disable or enable setting for duplicated output Operation setting when an operation error occurs Default value 100 140 0 to 144 0 to 144 Descriptions

61

0 to 63

(See note.)
1652 Non-hold Yes 0 to 1660 Hold/Non-hold Fixed FPWIN GR: Disabled/Enabled Stop/Continuation of operation Disabled: When a battery error occurs, a self-diagnostic error is not issued and the ERROR LED does not light. When a battery error occurs, a self-diagnostic error is issued and the ERROR LED lights.

8 14 20 26 Action on error 4

FPWIN GR: Disabled


Stop

Alarm battery error

(Operating setting when battery error occurs)

Disabled

Enabled:

0: Normal scan 0 to 160 ms: Scans once each specified time interval Note) Use models without a Real-Time Clock(Clock/Calendar) function with the default value left as is. If you change the setting the hold/non-hold operation will be unstalbe. Settings are valid for models with a Real-Time Clock(Clock/Calendar) time function. 34 Constant value settings for scan time 0.0 ms

Time setting

31

Wait time setting for multiframe communication

6500.0 ms

10 to 81900 ms

5-28
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e No. Name Default value Descriptions


Do not set input X0 as high-speed counter. Two-phase input (X0, X1) Two-phase input (X0, X1), Reset input (X2) Incremental input (X0) Incremental input (X0), Reset input (X2) Decremental input (X0) Decremental input (X0), Reset input (X2) incremental/decremental input (X0, X1) incremental/decremental input (X0, X1), Reset input (X2) Incremental/decremental control input (X0, X1) Incremental/decremental control input (X0, X1), Reset input (X2) Do not set input X1 as high-speed counter. Incremental input (X1) Incremental inptu (X1), Reset input (X2) Decremental input (X1) Decremental input (X1), Reset input (X2) Do not set input X3 as high-speed counter. Two-phase input (X3, X4) Two-phase input (X3, X4), Reset input (X5) Incremental input (X3) Incremental input (X3), Reset input (X5) Decremental input (X3) Decremental input (X3), Reset input (X5) Incremental/decremental input (X3, X4) Incremental/decremental input (X3, X4), Reset input (X5) Incremental/decremental control input (X3, X4) Incremental/decremental control input (X3, X4), Reset input (X5) Do not set input X4 as high-speed counter. Incremental input (X4) Incremental input (X4), Reset input (X5) Decremental input (X4) Decremental input (X4), Reset input (X5)

400

High-speed counter operation mode settings (X0 to X2)

CH0: Do not set input X0 as highspeed counter

CH0

Highspeed counter

CH1: Do not set input X1 as highspeed counter

CH1

401

High-speed counter operation mode settings (X3 to X5)

CH2: Do not set input X3 as highspeed counter

CH2

HC3: Do not set input X4 as highspeed counter

CH3

5-29
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e No. Name Pulse catch input settings Default value Not set Descriptions

402

Specify the input contacts used as pulse catch input.

Interruptinput 403

Interrupt input settings

Not set

Specify the input contacts used as intrrupt input.

Specify the effective interrupt edge. (When set: ONOFF is valid) Note1) If the operation mode is set to two-phase, incremental/decremental, or incremental/decremental control, the setting for CH1 is invalid in part 2 of system register 400 and the setting for CH3 is invalid in part 2 of system register 401. Note2) If reset input settings overlap, the CH1 setting takes precedence in system register 400 and the CH3 setting takes precedence in system register 401. Note3) The settings for pulse catch and interrupt input can only be specified in system registers 402 and 403. Note4) If system register 400 to 403 have been set simultaneously for the same input relay, the following precedence order is effective: 1. High-speed counter 2. Pulse catch 3. Interrupt input. This means, the counter keeps counting even after an interrupt.

5-30
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e No. Name Number of temperature input average processing times (Available PLC: model with thermocouple input) Unit No. setting Default value Descriptions

Temperature inout

409

0 to 50 For default valeu 0, the number of average processing times is 20. 1 to 99 Modem connection: enabled/Disabled Data length: 7 bits/8 bits When connecting a modem, the format will be as follows depending on the data length setting. 8 bits data length: no parity, 1 stop bit 7 bits data length: odd parity, 1 stop bit 9600 bps 19200 bps Computer link General-purpose serial communication MODBUS RTU (Ver.1.2 and higher) Enter the settings for the various items. - Data lenght: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator CR/CR+LF/None - Header: STX not exist/STX exist 300 bps / 600 bps / 1200 bps / 2400 bps / 4800 bps / 9600 bps / 19200 bps 1 to 99 (In Ver.1.2 and higher, settings can be changed in R mode even with the front operation switch.) Enabled/Disabled

410

1 Disabled

Tool port setting

411

Communication format setting

Data length: 8 bits

414

Communication speed (Baud rate) setting Communication mode setting

9600 bps

412

Computer link

413

Communication format setting

Data lenght bit: 8 bits Parity check: Odd Stop bit: 1 bit

COM. port setting

414

Communication speed (Baud rate) setting Unit no. setting Selection of modem connection Starting address for received buffer of general (serial data) communication mode Buffer capacity setting for data received of general (serial data) communication mode

9600 bps

415

416

Disabled

417

0 to 1659

418

1660

0 to 1660

5-31
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.5 Table of Special Internal Relays for FP-e


The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction.

FP-e
Relay No. R9000 R9001 R9002 R9003 R9004 R9005 Name Self-diagnostic error flag Not used Not used Not used Not used Backup battery error flag (non-hold) Backup battery error flag (hold) Description Turns on when a self-diagnostic error occurs. The content of self-diagnostic error is stored in DT90000.

Turns on for an instant when a backup battery error occurs.

R9006

Turns on and keeps the on state when a backup battery error occurs. Once a battery error has been detected, this is held even after recovery has been made. It goes off if the power supply is turned off, or if the system is initialized.
Turns on and keeps the on state shen an operation error occurs. The address where the error occurred is stored in DT9017. (Indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT9018. The contents change each time a new error occurs. This is set if an overflow or underflow occurs in the calculation results, and as a result of a shift system instruction being executed. Turns on for an instant when the compared results become larger in the comparison instructions. Turns on for an instant, - when the compared results are equal in the comparison instructions. - when the calculated results become 0 in the arithmetic instructions. Turns on for an instant when the compared results become smaller in the comparison instructions. Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137(STMR)/F183(DSTM) auxiliary timer instruction. The flag turns off when the trigger for auxiliary timer instruction turns off. Turns on when a communication error at Tool port has occurred. Turns on when the scan time exceeds the time specified in system register 34 during constant scan execution. This goes on if 0 has been set using system register 34.

R9007

Operation error flag (hold)

R9008

Operation error flag (non-hold)

R9009 R900A

Carry flag > Flag

R900B

= Flag

R900C

< Flag

R900D

Auxiliary timer instruction flag Tool port communication error Constant scan error flag

R900E R900F

5-32
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e Relay No. R9010 R9011 R9012 R9013

Name Always on relay Always off relay Scan pulse relay Initial (on type) pulse relay Initial (off type) pulse relay Step ladder initial pulse relay (on type) Not used Not used 0.01 s clock pulse relay 0.02 s clock pulse relay 0.1 s clock pulse relay

R9014 R9015 R9016 R9017 R9018

Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans. Goes off for only the first scan after operation (RUN) has been started, and goes on for the second and subsequent scans. Turns on for only the first scan of a process after the boot at the step ladder control.

Repeats on/off operations in 0.01 s cycles. Repeats on/off operations in 0.02 s cycles. Repeats on/off operations in 0.1 s cycles. Repeats on/off operations in 0.2 s cycles. Repeats on/off operations in 1 s cycles. Repeats on/off operations in 2 s cycles. Repeats on/off operations in 1 min cycles. -

R9019

R901A

R901B

0.2 s clock pulse relay

R901C

1 s clock pulse relay

R901D

2 s clock pulse relay 1 min clock pulse relay Not used

R901E R901F

5-33
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e Relay No. R9020 R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 R9029 R902A R902B R902C R902D R902E R902F

Name RUN mode flag Not used Not used Not used Not used Not used Message flag Not used Not used Forcing flag Interrupt enable flag Interrupt error flag Not used Not used Not used Not used

Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Turns on while the F149 (MSG) instruction is executed. Turns on during forced on/off operation for input/output relay timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Turns on when an interrupt error occurs. -

5-34
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e Relay No. R9030 R9031 R9032 R9033 R9034 R9035 R9036 R9037

R9038

R9039

R903A

R903B

R903C

R903D R903E R903F

Name Not used Not used Not used Print instruction execution flag RUN overwrite complete flag Not used Not used COM port communication error flag COM port reception done flag during general-purpose serial communication COM port transmission done flag during generalpurpose serial communication High-speed counter control ch0 flag High-speed counter control ch1 flag High-speed counter control ch2 flag High-speed counter control ch3 flag

Description Off: Printing is not executed. On: Execution is in progress. Goes on for ony the first scan following completion of a rewrite during RUN operation. - Goes on is a transmission error occurs during data

communication.
- Turns on when the terminator is received during general -

purpose serial communication.


- Goes on when transmission has been completed in

general-purpose serial communication.


- Goes off when transmission is requested in general-

purpose serial communication. Turns on while the high-speed counter instructions F166(HC15), F167(HC1R) and the pulse output instructions F168(SPD1) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC15), F167(HC1R) and the pulse output instructions F168(SPD1) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC15), F167(HC1R) and the pulse output instructions F168(SPD1) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC15), F167(HC1R) and the pulse output instructions F168(SPD1) to F170(PWM) are executed.
-

5-35
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.6 Table of Special Data Registers for FP-e


The special data registers are one word (16-bit) memory areas which store specific information. FP-e (A: Available, N/A: Not available) Register Name Descriptions No. Self-diagnostic error The self-diagnostic error code is stored here DT9000 code when a self-diagnostic error occurs. Switches the FP-escreen to the screen of the mode specified. K0: N mode first screen K1: N mode second screen FP-e screen display K2: S mode first screen DT9001 switching K3: S mode second screen K4: R mode first screen K5: R mode second screen K6: I mode first screen K7: I mode second screen DT9002 Analog input data Ch.0 analog input data (2-word real data) DT9003 DT9004 Analog input data Ch.1 analog input data (2-word real data) DT9005 One shift-out hexadecimal digit is stored in bit positions 0 to 3 when the data shift instruction, Operation auxiliary F105 (BSR) or F106 (BSL) is executed. The DT9014 register for data value can be read and written by executing the shift instruction F0 (MV) instruction. The divided remainder (16-bit) is stored in DT9015 when the division instruction F32(%) or F52(B%) instruction is executed. The divided remainder (32-bit) is stored in DT9015 and DT9016 when the division instruction F33(D%) or F53(DB%) is executed. The value can be read and written by executing the F0(MV) instruction. After commencing operation, the address where the first operation error occurred is stored. Monitor the address using decimal display. The address where an operation error occurred is stored. Each time an error occurs, the new address overwrites the previous address. At the beginning of a scan, the address is 0. Monitor the address using decimal display. The data stored here is increased by one every 2.5 ms. (H0 to HFFFF) Difference between the values of the two points (absolute value) x 2.5 ms = Elapsed time between the two points.

Read -ing A

Writing N/A

N/A

A A

N/A N/A

DT9015 Operation auxiliary register for division instruction DT9016

DT9017

Operation error address (hold type)

DT9018

Operation error address (non-hold type)

N/A

DT9019

2.5 ms ring counter


Note1)

5-36
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e (A: Available, N/A: Not available) Register No. DT9020 DT9021 DT9022 Name Not used Not used Scan time (current Note) value) Descriptions The current scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The minimum scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The maximum scan time is stored here. The scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K125 indicates 12.5 ms. The mask conditions of interrupts using the instruction can be stored here. Monitor using binary display. Read -ing N/A Writ -ing N/A

DT9023

Scan time (minimum value)


Note)

DT9024

Scan time (maximum value)


Note)

N/A

DT9025

Mask condition monitoring register for interrupts

DT9026 DT9027 DT9028

Not used Periodical interrupt interval (INT24)

The value set by the ICTL instruction is stored. K0: periodical interrupt is not used. K1 to K3000: 0.5ms to 1.5s or 10ms to 30s

N/A A

N/A N/A

Not used N/A N/A DT9029 Not used DT9030 Message 0 DT9031 Message 1 The contents of the specified message (Data DT9032 Message 2 lenght) are stored in these special data registers A N/A DT9033 Message 3 when F149 (MSG) instruction is executed. DT9034 Message 4 DT9035 Message 5 Note) Scan time display is only possible in RUN mode and shows the operation cycle time. (in PROG mode, the scan time for the operation is not displayed.) The maximum and minimum values are cleared each time the mode is switched from RUN to PROG.

5-37
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e (A: Available, N/A: Not available) Register Name No. DT9036 Not used Operation auxiliary register for search DT9037 instruction F96(SRC) Operation auxiliary register for search DT9038 instruction F96(SRC) DT9039 Not used Temperature input DT9040 ch.0 Temperature input DT9041 ch.1 DT9042 Not used DT9043 Used by the system High-speed DT9044 For counter CH0 elapsed DT9045 value DT9046 High-speed counter target value DT9047 High-speed counter elapsed value area For CH0

Descriptions The number of data that match the searched data is stored here when F96 (SRC) insturction is executed.

Read -ing N/A

Writ -ing N/A

A The position of the first matching data is stored here when an F96 (SRC) instruction is executed. The value of the temperature input before average processing is stored. Used by the system (Battery). The elapsed value (24-bit data) of the highspeed counter is stored here. The value can be read and written by executing F1 (DMV) instruction. The targe value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions to be used when the high-speed counter related instruction is executed. The value can be read by executing F1 (DMV) instruction. The elapsed value (24-bit data) of the highspeed counter is stored here. The value can be read and written by executing F1 (DMV) instruction. N/A A

N/A N/A

N/A A A

N/A N/A A

N/A

DT9048 DT9049

For CH1

5-38
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e (A: Available, N/A: Not available) Register Name No. DT9050 High-speed counter target value area

Descriptions The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions to be used when the high-speed counter related instruction is executed. The value can be read by executing F1 (DMV) instruction. A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction. Control code setting

Read -ing

Writ -ing

For CH1

N/A

DT9051

DT9052

High-speed counter and pulse output control flag

N/A

DT9053

Real-Time Clock (Clock/Calendar) monitor (hour/minute)

Hour and minute data of the Real-Time Clock (Clock/Calendar) are stored here. This data is read-only data. It cannot be overwritten. A N/A

5-39
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e (A: Available, N/A: Not available) Register Name No. Real-Time Clock (Clock/Calendar) DT9054 setting (minute/second) Real-Time Clock DT9055 (Clock/Calendar) setting (day/hour) Real-Time Clock (Clock/Calendar) DT9056 setting (year/month)

Descriptions The year, month, day, hour, minute, second and day-of-the-week data for the Real-Time Clock (Clock/Calendar) is stored. The built-in RealTime Clock(Clock/Calendar) will operate correctly through the year 2099 and supports leap years. The Real-Time Clock (Clock/Calendar) can be set by writing a value using a programming tool software or a program that uses the F0 (MV) instruction.(see example for DT90058)

Read -ing

Writ -ing

DT9057

Real-Time Clock (Clock/Calendar) setting (day-of-theweek)

By setting the highest bit of DT9058 to 1, the time becomes that written to DT9054 to DT9057 by the F0 (MV) instruction. After the time is set, DT9058 is cleared to 0. (Cannot be performed with any instruction other than the F0 (MV) instruction.) <Example> Set the time to 12:00:00 on the 5th day when X0 turns on. DT9058 Real-Time Clock (Clock/Calendar) time setting FPWIN GR: A A

If you changed the values of DT9054 to DT9057 with the programming tool software, the time will be set when the new values are written. Therefore, it is unnecessary to write to DT9058.

5-40
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e (A: Available, N/A: Not available) Register Name No.

Descriptions

Read -ing

Writ -ing

Error code is sotred here when a communication error occurs.

DT9059

Serial communication error code

N/A

DT9060 DT9061 DT9062 DT9063 DT9064 DT9065 DT9066 DT9067

Step ladder process (0 to 15) Step ladder process (16 to 31) Step ladder process (32 to 47) Step ladder process (48 to 63) Step ladder process (64 to 79) Step ladder process (80 to 95) Step ladder process (96 to 111) Step ladder process (112 to 127)

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on. Monitor using binary display. A A

A programming tool software can be used to write data.

5-41
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-e (A: Available, N/A: Not available) Register Name No. High-speed DT9104 For counter ch2 elapsed DT9105 value DT9106 High-speed counter target value DT9107 High-speed counter elapsed value For ch2

Descriptions The elapsed value (24-bit data) for the highspeed conter is stored here. The value can be read and written by executing the F1 (DMV) instruciton. The target valeu (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction is executed. The value can be read by executing the F1 (DMV) instruction. The elapsed value (24-bit data) for the highspeed counter is stored here. The value can be read and written by executing the F1 (DMV) instruction. The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction is executed. The value can be read by executing the F1 (DMV) instruction.

Read -ing A

Writ -ing A

N/A

DT9108 DT9109

For ch3

DT9110 High-speed counter target value DT9111 For ch3

N/A

5-42
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.7 Table of System Registers for FP0R


No. 5 6 Name Starting number setting for counter Hold type area starting number setting for timer and counter (T32/F32) Hold type area starting number setting for internal relays (T32/F32) Hold type area starting number setting for data registers (T32/F32) Hold or non-hold setting for step ladder process (T32/F32) Previous value is held for a leading edge detection instruction (DF instrucion) with Note) MC Hold type area starting word number for PC(PLC) link relays (for PC(PLC) link 0) (T32/F32) Hold type area starting word number for PC(PLC) link relays (for PC(PLC) link 1) (T32/F32) Hold type area starting number for PC(PLC) link registers (for PC(PLC) link 0) (T32/F32) Hold type area starting number for PC(PLC) link registers (for PC(PLC) link 1) (T32/F32) Disable or enable setting for duplicated output Operation setting when an I/O verification error occurs Operation setting when an operation error occurs Wait time setting for multi-frame communication Communication timeout setting for SEND/RECV, RMRD/RMWT commands Constant value settings for scan time Default value 1008 1008 0 to 1024 Descriptions

0 to 1024 0 to 256 0 to 32765 Hold/Non-hold


Hold/ Non-hold

7 Hold/ Nonhold 1

248

14

Non-hold

Hold

10

0 to 64

Hold/ Nonhold 2

11

64

64 to 128

12

0 to 128

13 20 Action on error 23 26 31 Time setting 32

128 Disabled Stop Stop 6500.0 ms 10000.0 ms Normal scan

128 to 256 Disabled/Enabled Stop/Continuation of operation Stop/Continuation of operation 10 to 81900 ms 10 to 81900 ms 0: Normal scan 0 to 600 ms: Scans once each specified time interval

34

5-43
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R No. 40 41 PC (PLC) link 0 setting 42 43 44 45 46 47 50 51 PC (PLC) link 1 setting) 52 53 54 55 57 Name Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting word number for link relay transmission Link relay transmission size Starting number for link data register tranmission Link data register transmission size PC(PLC) link switch flag Maximum unit number setting for MEWNET-W0 PC(PLC) link Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting word number for link relay transmission Link relay transmission size Starting number for link data register tranmission Link data register transmission size Maximum unit number setting for MEWNET-W0 PC(PLC) link 0 0 0 0 0 0 Normal 16 0 0 64 0 128 0 16 Default value Descriptions 0 to 64 words 0 to 128 words 0 to 63 0 to 64 words 0 to 127 0 to 127 words Normal/reverse 1 to 16 0 to 64 words 0 to 128 words 64 to 127 0 to 64 words 128 to 255 0 to 127 words 1 to 16

5-44
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R No. Name Default value Descriptions


Do not set input X0 as high-speed counter. Two-phase input (X0, X1) Two-phase input (X0, X1), Reset input (X2) Incremental input (X0) Incremental input (X0), Reset input (X2) Decremental input (X0) Decremental input (X0), Reset input (X2) Individual input (X0, X1) Individual input (X0, X1), Reset input (X2) Incremental/decremental control input (X0, X1) Incremental/decremental control input (X0, X1), Reset input (X2) Do not set input X1 as high-speed counter. Incremental input (X1) Incremental inptu (X1), Reset input (X2) Decremental input (X1) Decremental input (X1), Reset input (X2) Do not set input X3 as high-speed counter. Two-phase input (X3, X4) Two-phase input (X3, X4), Reset input (X5) Incremental input (X3) Incremental input (X3), Reset input (X5) Decremental input (X5) Decremental input (X5), Reset input (X5) Individual input (X3, X4) Individual input (X3, X4), Reset input (X5) Incremental/decremental control (X3, X4) Incremental/decremental control (X3, X4), Reset input (X5) Does not set input X4 as high-speed counter. Incremental input (X4) Incremental input (X4), Reset input (X5) Decremental input (X4) Decremental input (X4), Reset input (X5) Do not set input X6 as high-speed counter. Incremental input (X6) Decremental input (X6) Two-phase input (X6, X7) Individual input (X6, X7) Incremental/decremental control input (X6, X7)

400

Controller input settings 1

High-speed counter operation mode settings (X0 to X2)

CH0: Do not set input X0 as high-speed counter

CH0

High-speed counter

CH1: Do not set input X1 as high-speed counter

CH1

400

High-speed counter operation mode settings (X3 to X5)

CH2: Do not set input X3 as high-speed counter

CH2

CH3: Does not set input X4 as highspeed counter Controller input settings 2 High-speed counter CH4: Do not set input X6 as high-speed counter

CH3

401

CH5: Do not set input X7 as high-speed counter. Do not set input CH5 Incremental input (X7) X7 as high-speed Decremental input (X7) counter Note1) If the operation mode is set to Two-phase, incremental/decremental, or incremental/decremental control, the setting for CH1 or CH3 is invalid in system register 400 and the setting for CH5 is invalid in system register 401. Note2) If reset input settings overlap, the CH1 setting takes precedence in system register 400 and the CH3 setting takes precedence in system register 401. Note3) If system register 400 to 403 have been set simultaneously for the same input relay, the follwing precedence order is effective: [High-speed counter][Pulse catch][Interrupt input]. <Example> When the high-speed counter is being used in the addition input mode, even if input X0 is specified as an interrupt input or as pulse catch input, those settings are invalid, and X0 functions as counter input for the high-speed counter.

High-speed counter/ pulse output settings (X6 to X7)

CH4

5-45
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R No. Name Default value CH0: Normal output Descriptions Normal output (Y0, Y1) Pulse output (Y0, Y1) Pulse output (Y0, Y1)/Home input X4 Pulse output (Y0, Y1)/Home input X4/Position control starting input X0 PWM output (Y0), Normal output (Y1) Normal output (Y2, Y3) Pulse output (Y2, Y3) Pulse output (Y2, Y3)/Home input X5 Pulse output (Y3, Y4)/Home input X5/Position control starting input X1 PWM output (Y2), Normal output (Y3) Normal output (Y4, Y5) Pulse output (Y4, Y5) Pulse output (Y4, Y5)/Home input X6 Pulse output (Y4, Y5)/Home input X6/Position control starting input X2 PWM output (Y4), Normal output (Y5) Normal output (Y6, Y7) Pulse output (Y6, Y7) Pulse output (Y6, Y7)/Home input X7 Pulse output (Y6, Y7)/Home input X7/Position control starting input X3 PWM output (Y6), Normal output (Y7)

Controller output settings 2 (PLS/PWM)

Transistor type C16 or over

402

Pulse/ PWM output settings (Y0 to Y7)

CH1: Normal output

CH2: Normal output

CH3: Normal output

Interrupt/ Pulse catch settings Interrupt edge settings

403

Pulse catch input settings Interrupt input settings Interrupt edge setting for controller input

Not set The pressed contact is set for the pulse catch. Not set The pressed contact is set for the interrupt input. Leading edge

404

405

The pressed contact is up and set to trailing edge. Note1) When using the pulse output/PWM output, the controller output settings must be specified. The output that has been set to the pulse output/PWM output cannot be used as the normal output. Note2) X4 to X7 can be used as the home input of the pulse output CH0 to CH3. When using the home return function of the pulse output, always set the home input. In that case, X4 to X7 cannot be set as the high-speed counter. Note3) C16 type: - For performing the home return for the pulse output CH0 with deviation counter clear, the above Y6 should be set to the normal output to use Y6 for the deviation counter clear signal. - For performing the home return for the pulse output CH1 with deviation counter clear, the above Y7 should be set to the normal output to use Y7 for the deviation counter clear signal. - The home return cannot be performed for the pulse output CH2 with deviation counter clear. Note4) C32/T32/F32 type: When performing theo home return with deviation counter clear, the deviation counter clear signals corresponding to each CH are used fixedly as follows; CH0=Y8, CH1=Y9, CH2=YA, CH3=YB For performing the home return for each type, it is necessary to specify the home input corresponding to each channel to be used for the home return in the system register 401. Home input corresponding to each channel: CH0=4, CH1=X5, CH2=X6, CH3=X7 For performing the JOG positioning for each type, it is necessary to specify the position control starting input signal corresponding to each channel to be used for the JOG positioning. Note3) The settings for pulse catch and interrupt input can only be specified in system registers 403 to 405. 5-46
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R No. 410 412 Name Unit No. setting Communication mode setting Selection of modem connection 1 Computer link Disabled Default value Descriptions 1 to 99 Computer link General-purpose communications Note2) Enabled/Disabled Enter the settings for the various items. - Data lenght bit: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps / 4800 bps / 9600 bps / 19200 bps / 38400 bps / 57600 bps / 115200 bps 0 to 32764

413 Tool port setting 415

Communication format setting

Data lenght bit: 8 bits Parity check: with odd Stop bit: 1 bit

420

421 410

Communication speed (Baud rate) setting Starting address for received buffer of general (serial data) communication mode Buffer capacity setting for data received of general (serial data) communication mode Unit No. setting Communication mode setting Selection of modem connection

9600 bps

4096

2048 1 Computer link Disabled

0 to 2048 1 to 99 Computer link General-purpose serial communication PC(PLC) link MODBUS RTU Enabled/Disabled Enter the settings for the various items. - Data lenght bit: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator CR/CR+LF/None/ETX - Header: STX not exist/STX exist 2400 bps / 4800 bps / 9600 bps / 19200 bps / 38400 bps / 57600 bps / 115200 bps

412

413 COM port setting 415

Communication format setting

Data lenght bit: 8 bits Parity check: Odd Stop bit: 1 bit

Communication speed (Baud rate) 9600 bps setting Starting address for received buffer of 0 0 to 32764 416 general (serial data) communication mode Buffer capacity setting for data 2048 0 to 2048 417 received of general (serial data) communication mode Note1) The communication format in a PLC link is fixed at the following settings: Data length is 8 bits, odd parity, stop bit is 1. The communication speed (baud rate) is fixed at 115200 bps. Note2) The general-purpose communication with the tool port is available only in RUN mode. In PROG mode, the computer link mode must be used regardless of settings. 5-47
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP0R Item
Address

Name

Default value

Description

Controller input time constant setting 1 X0 to X3 ContController input time roller 431 constant setting 1 input X4 to X7 time Controller input time consconstant setting 2 432 tant X8 to XB set(C32/T32/F32) tings Controller input time constant setting 2 433 XC to XF (C32/T32/F32) Note) X6 and X7 is invalid for C10. 430

1 ms

None 0.1 ms 0.5 ms 1 ms 2 ms 4 ms 8 ms 16 ms 32 ms 64 ms

5-48
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.8 Table of Special Internal Relays for FP0R


The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. WR900 FP0R Relay No. Name Self-diagnostic R9000 error flag R9001 Not used R9002 Not used R9003 Not used I/O verification R9004 error flag R9005 Not used R9006 Not used R9007 Operation error flag (hold) Operation error flag (non-hold) Carry flag > Flag

Description Turns on when a self-diagnostic error occurs. The content of self-diagnostic error is stored in DT90000.

Turns on when an I/O verification error occurs.

R9008 R9009 R900A

R900B

= Flag

R900C

< Flag Auxiliary timer instruction flag Tool port communication error Constant scan error flag

R900D

Turns on and keeps the on state shen an operation error occurs. The address where the error occurred is stored in DT90017. (indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT90018. The contents change each time a new error occurs. This is set if an overflow or underflow occurs in the calculation results, and as a result of a shift system instruction being executed. Turns on for an instant when the compared results become larger in the comparison instructions (F60 to F63). Turns on for an instant, - when the compared results are equal in the comparison instructions (F60 to F63). - when the calculated results become 0 in the arithmetic instructions. Turns on for an instant when the compared results become smaller in the comparison instructions (F60 to F63). Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137(STMR)/F183(DSTM) auxiliary timer instruction. The flag turns off when the trigger for auxiliary timer instruction turns off. Turns on when communication error at tool port is occurred. Turns on when scan time exceeds the time specified in system register 34 during constant scan execution. This goes on if 0 has been set using system register 34.

R900E

R900F

A: Available, N/A: Not available

5-49
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR901 FP0R Relay No. Name R9010 Always on relay R9011 Always off relay R9012 Scan pulse relay Initial (on type) R9013 pulse relay Initial (off type) R9014 pulse relay Step ladder initial R9015 pulse relay (on type) R9016 Not used R9017 Not used R9018 0.01 s clock pulse relay 0.02 s clock pulse relay 0.1 s clock pulse relay 0.2 s clock pulse relay 1 s clock pulse relay 2 s clock pulse relay 1 min clock pulse relay

Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans. Goes off for only the first scan after operation (RUN) has been started, and goes on for the second and subsequent scans. Turns on for only the first scan of a process after the boot at the step ladder control.

Repeats on/off operations in 0.01 sec. cycles. Repeats on/off operations in 0.02 s. cycles. Repeats on/off operations in 0.1 s. cycles. Repeats on/off operations in 0.2 s. cycles. Repeats on/off operations in 1 s. cycles. Repeats on/off operations in 2 s. cycles. Repeats on/off operations in 1 min. cycles.

R9019

R901A

R901B

R901C

R901D

R901E

R901F Not used A: Available, N/A: Not available

5-50
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR902 FP0R Relay No. R9020 R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 R9029 R902A R902B R902C R902D

Name

RUN mode flag Not used Not used Not used Not used Not used Message flag Not used Not used Forcing flag Interrupt enable flag Interrupt error flag Sample point flag

Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN.

Turns on while the F149 (MSG) instruction is executed.

Turns on during forced on/off operation for input/output relay timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Turns on when an interrupt error occurs. Sampling by the instruction=0 Sampling at constant time intervals=1 When the sampling operation stops=1, When the sampling operation starts=0 When the sampling stop trigger activates=1 When the sampling stop trigger stops=0 When sampling starts=1 When sampling stops=0

Sample trace end flag Sampling stop R902E trigger flag Sampling enable R902F flag A: Available, N/A: Not available

5-51
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR903 FP0R Relay No. Name R9030 Not used R9031 Not used R9032 COM port communication mode flag Print instruction execution flag RUN overwrite complete flag Not used Not used COM port communication error flag is being used

Description

- Turns on when the general-purpose communication function - Goes off when the MEWTOCOL-COM or the PLC link

R9033 R9034 R9035 R9036 R9037

function is being used. Off: Printing is not executed. On: Execution is in progress. Goes on for ony the first scan following completion of a rewrite during the RUN operation.

- Goes on is a transmission error occurs during data

communication.
- Goes off when a request is made to send data, using the

F159 (MTRN) instruction. COM port reception - Turns on when the terminator is received during general done flag during R9038 purpose serial communication. general purpose communication COM port - Goes on when transmission has been completed in generaltransmission done purpose serial communication. flag during generalR9039 - Goes off when transmission is requested in general-purpose purpose serial serial communication. communication R903A Not used R903B Not used R903C Not used R903D Not used TOOL port reception - Turns on the terminator is received during general -purpose done flag during R903E general purpose serial communication. communication TOOL port - Goes on when transmission has been completed in generaltransmission done purpose serial communication. R903F flag during general- Goes off when transmission is requested in general-purpose purpose serial serial communication. communication A: Available, N/A: Not available Note) R9030 to R9030F can be changed during 1 scan.

5-52
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR904 FP0R Relay Name No. TOOL port R9040 operation mode flag COM port PLC R9041 link flag R9042 Not used R9043 Not used COM port SEND/RECV instruction execution flag COM port SEND/RECV instruction execution end flag Not used Not used Not used Not used Not used Not used

Description
- Turns on when the general-purpose communication function is being

used
- Goes off when the computer link function is being used.

Turn on while the PLC link function is used.

R9044

R9045

Monitors whether the F145 (SEND) or F146 (RECV) instructions can be executed or not. Off: None of the above mentioned instructions can be executed. (During executing the instruction) On: One of the above mentioned instructions can be executed. Monitors if an abnormality has been detected during the execution of the F145 (SEND) or F146 (RECV) instructions as follows: Off: No abonormality detected. On: An abnormality detected. (communication error) End code: DT90124

R9046 R9047 R9048 R9049 R904A R904B R904C Not used to R904F A: Available, N/A: Not available Note) R9040 to R904F can be changed during 1 scan. WR905 FP0R Relay Name No. MEWNET-W0 PLC link R9050 transmission error flag R9051 to Not used R905F

Description When using MEWNET-W0 - Turns on when a transmission error occurs at PLC link. - Turns on when there is an error in the PLC link area settings.

5-53
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR906 FP0R Relay No. R9060 R9061 R9062 R9063 R9064 R9065 R9066 R9067 R9068 R9069 R906A R906B R906C R906D R906E R906F

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

MEWNETW0 PC(PLC) link 0 transmission assurance relay

Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 2 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 3 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 4 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 5 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 6 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 7 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 8 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 9 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 10 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 11 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 12 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 13 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 14 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 15 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 16 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode.

A: Available, N/A: Not available

5-54
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR907 FP0R Relay No.

Name

Unit R9070 No.1 Unit R9071 No.2 Unit R9072 No.3 Unit R9073 No.4 Unit R9074 No.5 Unit R9075 No.6 Unit R9076 No.7 MEWNETUnit W0 R9077 No.8 PC(PLC) link 0 Unit R9078 operation No.9 mode relay Unit R9079 No.10 Unit R907A No.11 Unit R907B No.12 Unit R907C No.13 Unit R907D No.14 Unit R907E No.15 Unit R907F No.16 A: Available, N/A: Not available

Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode. Turns off when Unit No. 2 is in the PROG. mode. Turns on when Unit No. 3 is in the RUN mode. Turns off when Unit No. 3 is in the PROG. mode. Turns on when Unit No. 4 is in the RUN mode. Turns off when Unit No. 4 is in the PROG. mode. Turns on when Unit No. 5 is in the RUN mode. Turns off when Unit No. 5 is in the PROG. mode. Turns on when Unit No. 6 is in the RUN mode. Turns off when Unit No. 6 is in the PROG. mode. Turns on when Unit No. 7 is in the RUN mode. Turns off when Unit No. 7 is in the PROG. mode. Turns on when Unit No. 8 is in the RUN mode. Turns off when Unit No. 8 is in the PROG. mode. Turns on when Unit No. 9 is in the RUN mode. Turns off when Unit No. 9 is in the PROG. mode. Turns on when Unit No. 10 is in the RUN mode. Turns off when Unit No. 10 is in the PROG. mode. Turns on when Unit No. 11 is in the RUN mode. Turns off when Unit No. 11 is in the PROG. mode. Turns on when Unit No. 12 is in the RUN mode. Turns off when Unit No. 12 is in the PROG. mode. Turns on when Unit No. 13 is in the RUN mode. Turns off when Unit No. 13 is in the PROG. mode. Turns on when Unit No. 14 is in the RUN mode. Turns off when Unit No. 14 is in the PROG. mode. Turns on when Unit No. 15 is in the RUN mode. Turns off when Unit No. 15 is in the PROG. mode. Turns on when Unit No. 16 is in the RUN mode. Turns off when Unit No. 16 is in the PROG. mode.

5-55
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR908 FP0R Relay No. R9080 R9081 R9082 R9083 R9084 R9085 R9086 R9087 R9088 R9089 R908A R908B R908C R908D R908E R908F

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

MEWNETW0 PC(PLC) link 1 transmission assurance relay

Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 2 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 3 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 4 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 5 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 6 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 7 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 8 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 9 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 10 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 11 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 12 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 13 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 14 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 15 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 16 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode.

A: Available, N/A: Not available

5-56
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR909 FP0R Relay No.

Name

Unit R9090 No.1 Unit R9091 No.2 Unit R9092 No.3 Unit R9093 No.4 Unit R9094 No.5 Unit R9095 No.6 Unit R9096 No.7 MEWNETUnit W0 R9097 No.8 PC(PLC) link 1 Unit R9098 operation No.9 mode relay Unit R9099 No.10 Unit R909A No.11 Unit R909B No.12 Unit R909C No.13 Unit R909D No.14 Unit R909E No.15 Unit R909F No.16 A: Available, N/A: Not available

Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode. Turns off when Unit No. 2 is in the PROG. mode. Turns on when Unit No. 3 is in the RUN mode. Turns off when Unit No. 3 is in the PROG. mode. Turns on when Unit No. 4 is in the RUN mode. Turns off when Unit No. 4 is in the PROG. mode. Turns on when Unit No. 5 is in the RUN mode. Turns off when Unit No. 5 is in the PROG. mode. Turns on when Unit No. 6 is in the RUN mode. Turns off when Unit No. 6 is in the PROG. mode. Turns on when Unit No. 7 is in the RUN mode. Turns off when Unit No. 7 is in the PROG. mode. Turns on when Unit No. 8 is in the RUN mode. Turns off when Unit No. 8 is in the PROG. mode. Turns on when Unit No. 9 is in the RUN mode. Turns off when Unit No. 9 is in the PROG. mode. Turns on when Unit No. 10 is in the RUN mode. Turns off when Unit No. 10 is in the PROG. mode. Turns on when Unit No. 11 is in the RUN mode. Turns off when Unit No. 11 is in the PROG. mode. Turns on when Unit No. 12 is in the RUN mode. Turns off when Unit No. 12 is in the PROG. mode. Turns on when Unit No. 13 is in the RUN mode. Turns off when Unit No. 13 is in the PROG. mode. Turns on when Unit No. 14 is in the RUN mode. Turns off when Unit No. 14 is in the PROG. mode. Turns on when Unit No. 15 is in the RUN mode. Turns off when Unit No. 15 is in the PROG. mode. Turns on when Unit No. 16 is in the RUN mode. Turns off when Unit No. 16 is in the PROG. mode.

5-57
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR910 FP0R Relay Name No. R9110 HSC-CH0 R9111 HSC-CH1 High-speed R9112 HSC-CH2 counter R9113 HSC-CH3 control flag R9114 HSC-CH4 R9115 HSC-CH5 R9116 to Not used R911F R9120 PLS-CH0 Pulse output R9121 PLS-CH1 instruction R9122 PLS-CH2 flag PLS-CH3 R9123 R9124 to Not used R912F R9130 PLS-CH0 R9131 PLS-CH1 Pulse output control flag R9132 PLS-CH2 R9133 PLS-CH3 R9134 to Not used R913F A: Available, N/A: Not available

Description - Turns on the channel of high-speed counter during the control using F165(CAM0), F166(HC1S), F167(HC1R), F178(PLSM) instructions. - Turns off when the control is cleared or this instruction is completed.

- Turns on while the pulses are being output using F171(SPDH), F172 (PLSH), F173(PWMH), F174 (SP0H), F175(SPSH), F177(HOME) instructions.

- Turns on the channel of pulse output during the control using F166(HC1S), F167(HC1R) instructions. - Turns off when the control is cleared or this instruction is completed.

5-58
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.9 Table of Special Data Registers for FP0R


FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The self-diagnostic error code is stored here A N/A when a self-diagnostic error occurs. N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A When the state of installation of FP0 expansion I/O unit has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary A N/A display.

Address DT90000 DT90001 DT90002 DT90003 DT90004 DT90005 DT90006 DT90007 DT90008 DT90009

Name Self-diagnostic error code Not used Not used Not used Not used Not used Not used Not used Not used Not used

DT90010

Extension (right side) I/O verify error unit [0 to 3]

DT90011 DT90012 DT90013

Not used Not used Not used

N/A N/A N/A

N/A N/A N/A

5-59
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name Operation auxiliary register for data shift instruction

DT90014

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing One shift-out hexadecimal digit is stored in bit positions 0 to 3 when the data shift instruction, A A F105 (BSR) or F106 (BSL) is executed. The value can be read and written by executing F0 (MV) instruction. The divided remainder (16-bit) is stored in DT90015 when the division instruction F32(%) or F52(B%) instruction is executed. The divided remainder (32-bit) is stored in DT90015 and DT90016 when the division instruction F33(D%) or F53(DB%) is executed. The value can be read and written by executing F0(MV) instruction.

DT90015 Operation auxiliary register for division instruction DT90016

After commencing operation, the address where the first operation error occurred is DT90017 A N/A stored. Monitor the address using decimal display. The address where an operation error Operation error occurred is stored. Each time an error occurs, DT90018 A N/A address (latest type) the new address overwrites the previous address. The data stored here is increased by one every 2.5 ms. (H0 to HFFFF) 2.5 ms ring counter DT90019 Note1) Difference between the values of the two A N/A points (absolute value) x 2.5 ms = Elapsed time between the two points. The data stored here is increased by one every 10.67 s. (H0 to HFFFF) 10 s ring counter Difference between the values of the two DT90020 Note1) Note2) A N/A points (absolute value) x 10.67 s = Elapsed time between the two points. Note) The exact value is 10.67 s. DT90021 Not used N/A N/A Note1) It is renewed once at the beginning of each one scan. Note2) As DT90020 is renewed even if F0(MV), DT90020 and D instruction is being executed, it can be used to measure the block time. Operation error address (hold type)

5-60
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

DT90022

Scan time (current Note) value)

DT90023

Scan time (minimum Note) value)

DT90024

Scan time (maximum Note) value)

DT90025

Mask condition monitoring register for interrupts (INT0 to 11)

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The current scan time is stored here. Scan time is calculated using the formula: A N/A Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The minimum scan time is stored here. Scan time is calculated using the formula: A N/A Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The maximum scan time is stored here. The scan time is calculated using the formula: A N/A Scan time (ms) = stored data (decimal) x 0.1 ms Example: K125 indicates 12.5 ms. The mask conditions of interrupts using the instruction can be stored here. Monitor using binary display. A N/A

DT90026 DT90027 DT90028

Not used Periodical interrupt interval (INT24) Sample trace interval

DT90029 Not used N/A N/A DT90030 DT90031 The contents of the specified message (Data DT90032 Character storage by length) are stored in these special data A N/A registers when F149 (MSG) instruction is DT90033 F149 MSG instruction executed. DT90034 DT90035 DT90036 Not used N/A N/A Note) Scan time display is only possible in RUN mode, and shows the operation cycle time. (In PROG. mode, the scan time for the operation is not displayed.) The maximum and minimum values are cleared each time the mode is switched from RUN to PROG.

The value set by ICTL instruction is stored. K0: periodical interrupt is not used. K1 to K3000: 0.5ms to 1.5s or 10ms to 30s K0: Sampling by the SMPL instruction K1 to K3000 (x 10 ms): 10 ms to 30 s -

N/A A A

N/A N/A N/A

5-61
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90037

Name Work1 for SRC instructions Work2 for SRC instructions Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used

DT90038 DT90039 DT90040 DT90041 DT90042 DT90043 DT90044 DT90045 DT90046 DT90047 DT90048 DT90049 DT90050 DT90051

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The number of data that match the searched data is stored here when F96 (SRC) A N/A insturction is executed. The position of the first matching data is stored here when an F96 (SRC) instruction is A N/A executed. N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A The pulse output instruction can be continued or cleared by writing a value with MV instruction (F0). Control code setting

DT90052

High-speed counter control flag

5-62
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction. Control code setting

DT90052

Pulse output control flag

5-63
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

DT90053

Clock/calender monitor (hour/minute) (T32 only)

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Hour and minute data of the clock/calender are stored here. This data is read-only data. It cannot be overwritten. A N/A

DT90054

Clock/calender setting (minute/second) (T32 only) Clock/calender setting (day/hour) (T32 only) Clock/calender setting (year/month) (T32 only)

DT90055

The year, month, day, hour, minute, second and day-of-the-week data for the clock/calender is stored. The built-in clock/calender will operate correctly through the year 2099 and supports leap years. The clock/calender can be set by writing a value using a programming tool software or a program that uses the F0 (MV) instruction.(see example for DT90058)

DT90056

DT90057

Clock/calender setting (day-of-the-week) (T32 only) As a day of the week is not automatially set on FPWIN GR, fix what day is set to 00, and set each value for 00 to 06.

5-64
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The clock/calender is adjusted as follows. When setting the clock/calender by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.) <Example> Set the time to 12:00:00 on the 5th day when the X0 turns on.

DT90058

Clock/calender setting and 30 seconds correction register (T32 only)

Note) If the values of DT90054 to DT90057 are changed with the programming tool software, the time will be set when the new values are written. Therefore, it is unnecessary to write to DT90058. When the correcting times less than 30 seconds By setting the lowest bit of DT90058 to 1, the value will be moved up or down and become exactly 0 seconds. After the correction is completed, DT90058 is cleared to 0. Example: Correct to 0 seconds with X0: on

At the time of coorection, if between 0 and 29 seconds, it will be moved down, and if between 30 and 59 seconds, it will be moved up. In the example above, if the time was 5 minutes 29 seconds, it will become 5 minutes 0 seconds;and, if the time was 5 minutes 35 seconds, it will become 6 minutes 0 seconds. DT90059 Communication error code

Error code is sotred here when a communication error occurs.

N/A

N/A

5-65
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90060 DT90061 DT90062 DT90063 DT90064 DT90065 DT90066 DT90067 DT90068 DT90069 DT90070 DT90071 DT90072 DT90073 DT90074 DT90075 DT90076 DT90077 DT90078 DT90079 DT90080 DT90081

Name Step ladder process (0 to 15) Step ladder process (16 to 31) Step ladder process (32 to 47) Step ladder process (48 to 63) Step ladder process (64 to 79) Step ladder process (80 to 95) Step ladder process (96 to 111) Step ladder process (112 to 127) Step ladder process (128 to 143) Step ladder process (144 to 159) Step ladder process (160 to 175) Step ladder process (176 to 191) Step ladder process (192 to 207) Step ladder process (208 to 223) Step ladder process (224 to 239) Step ladder process (240 to 255) Step ladder process (256 to 271) Step ladder process (272 to 287) Step ladder process (288 to 303) Step ladder process (304 to 319) Step ladder process (320 to 335) Step ladder process (336 to 351)

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on. Monitor using binary display. A A
Note)

Note) A programming tool software can be used to write data.

5-66
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90082 DT90083 DT90084 DT90085 DT90086 DT90087 DT90088 DT90089 DT90090 DT90091 DT90092 DT90093 DT90094 DT90095 DT90096 DT90097

Name Step ladder process (352 to 367) Step ladder process (368 to 383) Step ladder process (384 to 399) Step ladder process (400 to 415) Step ladder process (416 to 431) Step ladder process (432 to 447) Step ladder process (448 to 463) Step ladder process (464 to 479) Step ladder process (480 to 495) Step ladder process (496 to 511) Step ladder process (512 to 527) Step ladder process (528 to 543) Step ladder process (544 to 559) Step ladder process (560 to 575) Step ladder process (576 to 591) Step ladder process (592 to 607)

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on . Monitor using binary display. A A
Note)

Note) A programming tool software can be used to write data.

5-67
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address
DT90098 DT90099 DT90100 DT90101 DT90102 DT90103 DT90104 DT90105 DT90106 DT90107 DT90108 DT90109 DT90110 DT90111 DT90112 DT90113 DT90114 DT90115 DT90116 DT90117 DT90118 DT90119 DT90120 DT90121

Name
Step ladder process (608 to 623) Step ladder process (624 to 639) Step ladder process (640 to 655) Step ladder process (656 to 671) Step ladder process (672 to 687) Step ladder process (688 to 703) Step ladder process (704 to 719) Step ladder process (720 to 735) Step ladder process (736 to 751) Step ladder process (752 to 767) Step ladder process (768 to 783) Step ladder process (784 to 799) Step ladder process (800 to 815) Step ladder process (816 to 831) Step ladder process (832 to 847) Step ladder process (848 to 863) Step ladder process (864 to 879) Step ladder process (880 to 895) Step ladder process (896 to 911) Step ladder process (912 to 927) Step ladder process (928 to 943) Step ladder process (944 to 959) Step ladder process (960 to 975) Step ladder process (976 to 991) Step ladder process (992 to 999) (higher byte is not used.)

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on. Monitor using binary display A A

A programming tool software can be used to write data.

DT90122

5-68
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90123 DT90124 DT90125 DT90126 DT90127 to DT90139 DT90140 DT90141 DT90142 DT90143 DT90144 DT90145 DT90146 DT90147 DT90148 DT90149 DT90150 DT90151 DT90152 DT90153 DT90154 DT90155 DT90156 DT90157

Name Not used COM SEND/RECV instruction end code Not used Forced ON/OFF operating station display Not used

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing N/A N/A For details, refer to Programming Manual N/A N/A (F145 and F146). N/A N/A Used by the system N/A N/A

The number of times the receiving operation is performed. The current interval between two receiving operations: value in the register x 2.5ms The minimum inerval between two receiving operations: value in the register x 2.5ms The maximum interval between two receiving operations: value in the register x 2.5ms The number of times the sending operation is performed. The current interval between two sending operations: value in the register x 2.5ms The minimum interval between two sending operations: value in the register x 2.5ms The maximum interval between two sending operations: value in the register x 2.5ms The number of times the receiving operation is performed. The current interval between two receiving operations: value in the register x 2.5ms The minimum inerval between two receiving operations: value in the register x 2.5ms The maximum interval between two receiving operations: value in the register x 2.5ms The number of times the sending operation is performed. The current interval between two sending operations: value in the register x 2.5ms The minimum interval between two sending operations: value in the register x 2.5ms The maximum interval between two sending operations: value in the register x 2.5ms Area used for measurement of receiving interval. Area used for measurement of sending interval.

N/A

N/A

MEWNET-W0 PC(PLC) link 0 status

N/A

MEWNET-W0 PC(PLC) link 1 status

N/A

MEWNET-W0 PC(PLC) link 0 status

N/A

5-69
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90158 DT90159 DT90160 DT90161 DT90162 to DT90169 DT90170 DT90171 DT90172 DT90173 DT90174 DT90175 DT90176 DT90177 DT90178 DT90179 DT90180 to DT90189 DT90190 DT90191 DT90192 DT90193 DT90194 to DT90218

Name MEWNET-W0 PC(PLC) link 1 status MEWNET-W0 PC(PLC) link 0 unit No. MEWNET-W0 PC(PLC) link 0 error flag Not used

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Area used for measurement of receiving interval. A N/A Area used for measurement of sending interval. Stores the unit No. of PC(PLC) link 0. Stores the error contents of PC(PLC) link 0. A A N/A N/A

Duplicated destination for PC(PLC) inter-link address Counts how many times a token is lost. Counts how many times two or more tokens are detected. Counts how many times a signal is lost. No. of times underfined commands have been received. No. of times sum check errors have occurred during reception. No. of times format errors have occurred in received data. No. of times transmission errors have occurred. No. of times procedural errors have occurred. No. of times overlapping parent units have occurred. -

N/A

N/A

MEWNET-W0 PC(PLC) link 0 status

N/A

Not used Not used Not used Not used Not used Not used

N/A N/A N/A N/A N/A N/A

N/A N/A N/A N/A N/A N/A

5-70
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90219 DT90220 DT90221 DT90222 DT90223 DT90224 DT90225 DT90226 DT90227 DT90228 DT90229 DT90230 DT90231 DT90232 DT90233 DT90234 DT90235 DT90236 DT90237 DT90238 DT90239 PC(PLC) link Unit (station) No. 1 or 9

Name Unit No. (Station No.) selection for DT90220 to DT90251


System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing 0: Unit No. (Station No.) 1 to 8, 1: Unit No. (Station No.) 9 to 16 A A

The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. <Example> When DT90219 is 0

PC(PLC) link Unit (station) No. 2 or 10

PC(PLC) link Unit (station) No. 3 or 11

PC(PLC) link Unit (station) No. 4 or 12

PC(PLC) link Unit (station) No. 5 or 13

When the system register 46 in the home unit is in the standard setting, the values in the home unit are copied in the system registers 46 and 47. When the system register 46 in the home unit is in the reverse setting, the registers 40 to 45 and 47 corresponding to the home unit mentioned in the left column will be changed to 50 to 55 and 57, and the system register 46 will be set as it is. Also, the system registers 40 to 45 corresponding to other units will be changed to the values which the received values are corrected, and the registers 46 and 57 in the home unit are set for the registers 46 and 47.

N/A

5-71
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90240

Name
System register 40 and 41

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. <Example> when DT90219 is 0.

DT90241

DT90242

PC(PLC) link Unit (station) No. 6 or 14

System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41

DT90243

DT90244 PC(PLC) link Unit (station) No. 7 or 15

DT90245

System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41

DT90246

DT90247

DT90248 PC(PLC) link Unit (station) No. 8 or 16

DT90249

System register 42 and 43 System register 44 and 45 System register 46 and 47

DT90250

DT90251 DT90252 DT90253 DT90254 DT90255 DT90256 Not used Not used Not used Not used Not used

When the system register 46 in the home unit is in the standard setting, the values in the home unit are copied in the system registers 46 and 47. When the system register 46 in the home unit is in the reverse setting, the registers 40 to 45 and 47 corresponding to the home unit mentioned in the left column will be changed to 50 to 55 and 57, and the system register 46 will be set as it is. Also, the system registers 40 to 45 corresponding to other units will be changed to the values which the received values are corrected, and the registers 46 and 57 in the home unit are set for the registers 46 and 47.

N/A

N/A

N/A

N/A

N/A

5-72
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90300 DT90301 DT90302 DT90303 DT90304 DT90305 DT90306 DT90307 DT90308 DT90309 DT90310 DT90311 DT90312 DT90313 DT90314 DT90315 DT90316 DT90317 DT90318 DT90319 Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area

Name Lower words Higher words HSC-CH0 Lower words Higher words Lower words Higher words HSC-CH1 Lower words Higher words Lower words Higher words HSC-CH2 Lower words Higher words Lower words Higher words HSC-CH3 Lower words Higher words Lower words Higher words HSC-CH4 Lower words Higher words

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X0) or A A Note) (X0, X1) of the main unit. A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X1) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X2) or (X2, X3) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X3) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X4) or (X4, X5) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. A A A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note)

Note) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F166 (HC1S) and F167 (HC1R) instructions only.

5-73
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90320 DT90321 DT90322 DT90323 Elapsed value area Target value area

Name Lower words Higher words HSC-CH5 Lower words Higher words

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing A Counting area for input (X5) of A Note1) the main unit. A A Note1) The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. A A
Note1) Note1)

A A

DT90324 Not used N/A N/A DT90325 Not used N/A N/A DT90326 Not used N/A N/A DT90327 Not used N/A N/A DT90328 Not used N/A N/A DT90329 Not used N/A N/A DT90330 Not used N/A N/A DT90331 Not used N/A N/A DT90332 Not used N/A N/A DT90333 Not used N/A N/A DT90334 Not used N/A N/A DT90335 Not used N/A N/A DT90336 Not used N/A N/A DT90337 Not used N/A N/A DT90338 Not used N/A N/A DT90339 Not used N/A N/A DT90340 Not used N/A N/A DT90341 Not used N/A N/A DT90342 Not used N/A N/A DT90343 Not used N/A N/A DT90344 Not used N/A N/A DT90345 Not used N/A N/A DT90346 Not used N/A N/A DT90347 Not used N/A N/A DT90348 Not used N/A N/A DT90349 Not used N/A N/A DT90350 Not used N/A N/A DT90351 Not used N/A N/A DT90352 Not used N/A N/A DT90353 Not used N/A N/A DT90354 Not used N/A N/A DT90355 Not used N/A N/A DT90356 Not used N/A N/A DT90357 Not used N/A N/A DT90358 Not used N/A N/A DT90359 Not used N/A N/A DT90360 Not used N/A N/A DT90361 Not used N/A N/A DT90362 Not used N/A N/A DT90363 Not used N/A N/A Note1) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F166 (HC1S) and F167 (HC1R) instructions only. 5-74
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90370 DT90371 DT90372 DT90373 DT90374 DT90375 DT90376 DT90377 DT90378 DT90379 DT90380 DT90381 DT90382 DT90383 DT90384 DT90385 DT90386 DT90387 DT90388 DT90389

Name HSC-CH0 HSC-CH1 HSC-CH2 HSC-CH3 HSC-CH4 HSC-CH5

Control flag monitor area

Not used Not used Not used Not used Control flag monitor area (Transistor output type only) Not used Not used Not used Not used Not used Not used PLS-CH0 PLS-CH1 PLS-CH2 PLS-CH3

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing When HSC control is executed by A N/A F0 (MV)S, DT90052 instruction, A N/A the setting value for the target CH A N/A is stored in each CH. A N/A A N/A A N/A N/A N/A N/A N/A N/A N/A N/A N/A When pulse output control is A N/A executed by F0 (MV)S, DT90052 A N/A instruction, the setting value for the A N/A target CH is stored in each CH. A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

5-75
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90400 DT90401 DT90402 DT90403 DT90404 DT90405 DT90406 Elapsed value area Target value area Target value area for match ON/OFF Corrected speed of initial speed Deceleration minimum speed Acceleration forbidden area starting position Elapsed value area Target value area Target value area for match ON/OFF Corrected speed of initial speed Deceleration minimum speed Acceleration forbidden area starting position

Name Lower words Higher words Lower words Higher words Lower words Higher words PLSCH0 Lower words

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Available for the transistor A A output type only. A A Note) When controlling the pulse output CH by A N/A F166(HC1S), F167(HC1R) A N/A instructions, the target value is stored. A N/A The target value for match A N/A ON/OFF is stored. The initial speed of the calculated result is stored. The minimum speed for the change of speed.
If the elapsed value corsses over this position when changing the speed, acceleration cannot be performed.

N/A

DT90407 DT90408 DT90409 DT90410 DT90411 DT90412 DT90413 DT90414 DT90415 DT90416

A A A A A A A A A A

N/A N/A N/A A A N/A N/A N/A N/A N/A

Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words PLSCH1 Lower words

Available for the transistor output type only. Note) When controlling the pulse output CH by F166(HC1S), F167(HC1R) instructions, the target value is stored. The target value for match ON/OFF is stored. The initial speed of the calculated result is stored. The minimum speed for the change of speed.
If the elapsed value corsses over this position when changing the speed, acceleration cannot be performed.

DT90417 DT90418 DT90419

A A A

N/A N/A N/A

Lower words Higher words

5-76
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90420 DT90421 DT90422 DT90423 DT90424 DT90425 DT90426 Elapsed value area Target value area Target value area for match ON/OFF Corrected speed of initial speed Deceleration minimum speed Acceleration forbidden area starting position Elapsed value area Target value area Target value area for match ON/OFF Corrected speed of initial speed Deceleration minimum speed Acceleration forbidden area starting position

Name Lower words Higher words Lower words Higher words Lower words Higher words PLSCH2 Lower words

FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Available for the transistor A A output type only. A A Note) When controlling the pulse output CH by A N/A F166(HC1S), F167(HC1R) A N/A instructions, the target value is stored. A N/A The target value for match A N/A ON/OFF is stored. The initial speed of the calculated result is stored. The minimum speed for the change of speed.
If the elapsed value corsses over this position when changing the speed, acceleration cannot be performed.

N/A

DT90427 DT90428 DT90429 DT90430 DT90431 DT90432 DT90433 DT90434 DT90435 DT90436

A A A A A A A A A A

N/A N/A N/A A A N/A N/A N/A N/A N/A

Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words PLSCH3 Lower words

Available for the transistor output type only. Note) When controlling the pulse output CH by F166(HC1S), F167(HC1R) instructions, the target value is stored. The target value for match ON/OFF is stored. The initial speed of the calculated result is stored. The minimum speed for the change of speed.
If the elapsed value corsses over this position when changing the speed, acceleration cannot be performed.

DT90437 DT90438 DT90439

A A A

N/A N/A N/A

Lower words Higher words

5-77
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.10 Table of System Registers for FP


No. 5 6 7 Hold/ Nonhold 1 8 14 Name Starting number setting for counter Hold type area starting number setting for timer and counter Hold type area starting number setting for internal relays Hold type area starting number setting for data registers Hold or non-hold setting for step ladder process Previous value is held for a leading edge detection instruction (DF instrucion) with Note) MC Hold type area starting word number for PC(PLC) link relays (for PC(PLC) link 0) Hold type area starting word number for PC(PLC) link relays (for PC(PLC) link 1) Hold type area starting number for PC(PLC) link registers (for PC(PLC) link 0) Hold type area starting number for PC(PLC) link registers (for PC(PLC) link 1) Disable or enable setting for duplicated output Operation setting when an I/O verification error occurs Operation setting when an operation error occurs Default value 1008 1008 12k: 90 32k: 0 to 256 32710 Non-hold 0 to 1024 0 to 1024 12k: 0 to 98 32k: 0 to 256 0 to 32765 Hold/Non-hold Hold/ Non-hold Descriptions These settings are effective if the optional backup battery is installed. If no backup battery is used, do not change the default settings. Otherwise proper functioning of hold/non-hold values cannot be guaranteed.

Hold

10

64 128 (32k only) 128 256 (32k only) Disabled Stop Stop

0 to 64

Hold/ Nonhold 2

11

64 to 128

12

0 to 128

13 20 23 26 Action on error 4

128 to 256 Disabled/Enabled Stop/Continuation of operation Stop/Continuation of operation Disabled: When a battery error occurs, a self-diagnostic error is not issued and the ERROR/ ALARM LED does not flash. When a battery error occurs, a self-diagnostic error is issued and the ERROR/ ALARM LED flashes.

Alarm battery error

(Operating setting when battery error occurs)

Disabled

Enabled:

Note) The 12k type is available with Ver. 1.4 to 1.9, 2.4 or later.

5-78
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

No. 31 Time setting 32

Name Wait time setting for multi-frame communication Communication timeout setting for SEND/RECV, RMRD/RMWT commands Constant value settings for scan time Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting word number for link relay transmission Link relay transmission size Starting number for link data register tranmission Link data register transmission size PC(PLC) link switch flag Maximum unit number setting for MEWNET-W0 PC(PLC) link Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting word number for link relay transmission Link relay transmission size Starting number for link data register tranmission Link data register transmission size Maximum unit number setting for MEWNET-W0 PC(PLC) link

Default value 6500.0 ms 10000.0 ms Normal scan 0 0 0 0 0 0 Normal (32k only) 16 0 0 64 0 128 0 16

Descriptions 10 to 81900 ms 10 to 81900 ms 0: Normal scan 0 to 350 ms: Scans once each specified time interval 0 to 64 words 0 to 128 words 0 to 63 0 to 64 words 0 to 127 0 to 127 words Normal/reverse 1 to 16 0 to 64 words 0 to 128 words 64 to 127 0 to 64 words 128 to 255 0 to 127 words 1 to 16

34 40 41 PC (PLC) link 0 setting 42 43 44 45 46 47 50 PC (PLC) link 1 setting (32k only) 51 52 53 54 55 57

5-79
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

No.

Name

Default value

Descriptions
Do not set input X0 as high-speed counter. Two-phase input (X0, X1) Two-phase input (X0, X1), Reset input (X2) Incremental input (X0) Incremental input (X0), Reset input (X2) Decremental input (X0) Decremental input (X0), Reset input (X2) incremental/decremental input (X0, X1) incremental/decremental input (X0, X1), Reset input (X2) Incremental/decremental control input (X0, X1) Incremental/decremental control input (X0, X1), Reset input (X2) Do not set input X1 as high-speed counter. Incremental input (X1) Incremental inptu (X1), Reset input (X2) Decremental input (X1) Decremental input (X1), Reset input (X2) Do not set input X3 as high-speed counter. Two-phase input (X3, X4) Two-phase input (X3, X4), Reset input (X5) Incremental input (X3) Incremental input (X3), Reset input (X5) Decremental input (X5) Decremental input (X5), Reset input (X5) Incremental/decremental input (X3, X4) Incremental/decremental input (X3, X4), Reset input (X5) Incremental/decremental control (X3, X4) Incremental/decremental control (X3, X4), Reset input (X5) Does not set input X4 as high-speed counter. Incremental input (X4) Incremental input (X4), Reset input (X5) Decremental input (X4) Decremental input (X4), Reset input (X5)

400

High-speed counter operation mode settings (X0 to X2)

CH0: Do not set input X0 as highspeed counter

CH0

Highspeed counter

CH1: Do not set input X1 as highspeed counter

CH1

401

High-speed counter operation mode settings (X3 to X5)

CH2: Do not set input X3 as highspeed counter

CH2

HC3: Does not set input X4 as highspeed counter

CH3

5-80
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

No.

Name

Default value

Descriptions

402

Pulse catch input settings

Not set

Specify the input contacts used as pulse catch input.

Interruptinput 403 Interrupt input settings Not set

Specify the input contacts used as intrrupt input.

Specify the effective interrupt edge. (When set: ONOFF is valid) Note1) If the operation mode is set to Two-phase, incremental/decremental, or incremental/decremental control, the setting for CH1 is invalid in part 2 of system register 400 and the setting for CH3 is invalid in part2 of system register 401. Note2) If reset input settings overlap, the CH1 setting takes precedence in system register 400 and the CH3 setting takes precedence in system register 401. Note3) The settings for pulse catch and interrupt input can only be specified in system registers 402 and 403. Note4) If system register 400 to 403 have been set simultaneously for the same input relay,the follwing precedence order is effective: [High-speed counter][Pulse catch][Interrupt input]. <Example> When the high-speed counter is being used in the addition input mode, even if input X0 is specified as an interrupt input or as pulse catch input, those settings are invalid, and X0 functions as counter input for the high-speed counter.

5-81
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

No. 410 412

Name Unit No. setting Communication mode setting Selection of modem connection 1

Default value Computer link Disabled

Descriptions 1 to 99 Computer link General-purpose communications Enabled/Disabled Enter the settings for the various items. - Data lenght bit: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps / 4800 bps / 9600 bps / 19200 bps / 38400 bps / 57600 bps / 115200 bps 0 to 32764

413 Tool port setting 415

Communication format setting

Data lenght bit: 8 bits Parity check: with odd Stop bit: 1 bit

420

421 410

Communication speed (Baud rate) setting Starting address for received buffer of general (serial data) communication mode Buffer capacity setting for data received of general (serial data) communication mode Unit No. setting Communication mode setting Selection of modem connection

9600 bps

0 1 Computer link Disabled

0 to 2048 1 to 99 Computer link General-purpose serial communication PC(PLC) link MODBUS RTU Enabled/Disabled Enter the settings for the various items. - Data lenght bit: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps / 4800 bps / 9600 bps / 19200 bps / 38400 bps / 57600 bps / 115200 bps

412

413 COM 1 port setting 415

Communication format setting

Data lenght bit: 8 bits Parity check: Odd Stop bit: 1 bit

Communication speed (Baud rate) 9600 bps setting Starting address for received buffer of 0 0 to 32764 416 general (serial data) communication mode Buffer capacity setting for data 2048 0 to 2048 417 received of general (serial data) communication mode Note) The communication format in a PLC link is fixed at the following settings: Data length is 8 bits, odd parity, stop bit is 1. The communication speed (baud rate) is fixed at 115200 bps. The transmission speed of the RS485 port (COM1) of AFPG806 must be identically set by the system register and the dip switch in the communication cassette. 5-82

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

No. 411

Name Unit No. setting Communication mode setting Selection of modem connection 1

Default value

Descriptions 1 to 99 Computer link General-purpose serial communication MODBUS RTU Enabled/Disabled Enter the settings for the various items. - Data lenght bit: 7 bits/8 bits - Parity check: none/odd/even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator: CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 57600 bps 115200 bps

Computer link Disabled

412

414

Communication format setting

Data lenght bit: 8 bits Parity check: with odd Stop bit: 1 bit

COM 2 port setting 415

Communication speed (Baud rate) setting

9600 bps

Starting address for received buffer of 416 2048 0 to 32764 general (serial data) communication mode Buffer capacity setting for data 417 received of general 2048 0 to 2048 (serial data) communication mode Note) The communication format in a PLC link is fixed at the following settings: the data length is 8 bits, odd parity, stop bit is 1. The communication speed (baud rate) is fixed at 115200 bps. The transmission speed of the RS485 port (COM1) of AFPG806 must be identically set by the system register and the dip switch in the communication cassette.

5-83
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.11 Table of Special Internal Relays for FP


The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. WR900 Relay No. R9000 R9001 R9002 R9003 R9004 R9005

Name Self-diagnostic error flag Not used Not used Not used I/O verification error flag Backup battery error flag (non-hold) Backup battery error flag (hold)

Description Turns on when a self-diagnostic error occurs. The content of self-diagnostic error is stored in DT90000.

Turns on when an I/O verification error occurs. Turns on when an backup battery error occurs. Turns on when a backup battery error occurs. Once a battery error has been detected, this is held even after recovery has been made.

R9006

It goes off if the power supply is turned off, or if the system is initialized.
Turns on and keeps the on state shen an operation error occurs. The address where the error occurred is stored in DT90017. (indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT90018. The contents change each time a new error occurs. This is set if an overflow or underflow occurs in the calculation results, and as a result of a shift system instruction being executed. Turns on for an instant when the compared results become larger in the comparison instructions. Turns on for an instant, - when the compared results are equal in the comparison instructions. - when the calculated results become 0 in the arithmetic instructions. Turns on for an instant when the compared results become smaller in the comparison instructions. Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137(STMR)/F183(DSTM) auxiliary timer instruction. The flag turns off when the trigger for auxiliary timer instruction turns off. Turns on when communication error at tool port is occurred. Turns on when scan time exceeds the time specified in system register 34 during constant scan execution. This goes on if 0 has been set using system register 34.

R9007

Operation error flag (hold)

R9008

Operation error flag (non-hold)

R9009 R900A

Carry flag > Flag

R900B

= Flag

R900C

< Flag Auxiliary timer instruction flag Tool port communication error Constant scan error flag

R900D

R900E R900F

5-84
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR901 Relay No. R9010 R9011 R9012 R9013

Name Always on relay Always off relay Scan pulse relay Initial (on type) pulse relay Initial (off type) pulse relay Step ladder initial pulse relay (on type) Not used Not used 0.01 s clock pulse relay

Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans. Goes off for only the first scan after operation (RUN) has been started, and goes on for the second and subsequent scans. Turns on for only the first scan of a process after the boot at the step ladder control.

R9014 R9015 R9016 R9017 R9018

Repeats on/off operations in 0.01 sec. cycles. Repeats on/off operations in 0.02 s. cycles. Repeats on/off operations in 0.1 s. cycles. Repeats on/off operations in 0.2 s. cycles. Repeats on/off operations in 1 s. cycles. Repeats on/off operations in 2 s. cycles. Repeats on/off operations in 1 min. cycles. -

R9019

0.02 s clock pulse relay

R901A

0.1 s clock pulse relay

R901B

0.2 s clock pulse relay

R901C

1 s clock pulse relay

R901D

2 s clock pulse relay

R901E R901F

1 min clock pulse relay Not used

5-85
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR902 Relay No. R9020 R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 R9029 R902A R902B R902C R902D R902E R902F

Name RUN mode flag Not used Not used Not used Not used Not used Message flag Not used Not used Forcing flag Interrupt enable flag Interrupt error flag Sample point flag Note) Sample trace end flag
Note)

Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN.

Turns on while the F149 (MSG) instruction is executed.

Sampling stop trigger flag Note) Sampling enable flag


Note)

Turns on during forced on/off operation for input/output relay timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Turns on when an interrupt error occurs. Sampling by the instruction=0 Sampling at constant time intervals=1 When the sampling operation stops=1, When the sampling operation starts=0 When the sampling stop trigger activates=1 When the sampling stop trigger stops=0 When sampling starts=1 When sampling stops=0

Note) Available for the 32k type only.

5-86
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR903 Relay No. R9030 R9031 R9032

Name Not used Not used COM1 port communication mode flag Print instruction execution flag RUN overwrite complete flag Not used Not used COM1 port communication error flag -

Description

- Turns on when the general-purpose communication

function is being used


- Goes off when the MEWTOCOL-COM or the PLC link

R9033 R9034 R9035 R9036 R9037

function is being used. Off: Printing is not executed. On: Execution is in progress. Goes on for ony the first scan following completion of a rewrite during the RUN operation. - Goes on is a transmission error occurs during data communication. - Goes off when a request is made to send data, using the F159 (MTRN) instruction.

COM1 port reception - Turns on when the terminator is received during general done flag during general purpose serial communication. purpose communication COM1 port transmission - Goes on when transmission has been completed in done flag during general-purpose serial communication. R9039 general-purpose serial - Goes off when transmission is requested in generalcommunication purpose serial communication. High-speed Turn on while the high-speed counter instructions R903A counter control ch0 F166(HC15), F167(HC1R) and the pulse output instructions flag F171(SPDH) to F176(PWMH) are executed. High-speed Turn on while the high-speed counter instructions R903B counter control ch1 F166(HC15), F167(HC1R) and the pulse output instructions flag F171(SPDH) to F176(PWMH) are executed. High-speed Turn on while the high-speed counter instructions R903C counter control ch2 F166(HC15), F167(HC1R) and the pulse output instructions flag F171(SPDH) to F176(PWMH) are executed. High-speed Turn on while the high-speed counter instructions R903D counter control ch3 F166(HC15), F167(HC1R) and the pulse output instructions flag F171(SPDH) to F176(PWMH) are executed. TOOL port reception - Turns on when the terminator is received during general R903E done flag during general purpose serial communication. purpose communication TOOL port transmission - Goes on when transmission has been completed in done flag during general-purpose serial communication. R903F general-purpose serial - Goes off when transmission is requested in generalcommunication purpose serial communication. Note) R9030 to R9030F can be changed during 1 scan. R9038

5-87
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR904 Relay No. R9040 R9041 R9042 R9043

Name TOOL port operation mode flag COM1 port PLC link flag COM2 port communication mode flag Not used COM1 port SEND/RECV instruction execution flag function is being used

Description
- Turns on when the general-purpose communication - Goes off when the computer link function is being used.

R9044

R9045

COM1 port SEND/RECV instruction execution end flag Not used COM2 port communication error flag COM2 port port reception done flag during general-purpose communicating COM2 port transmission done flag during general-purpose communication COM2 port SEND/RECV instruction execution flag

R9046 R9047

Turn on while the PLC link function is used. - Goes on when the general-purpose serial communication is used. - Goes off when the MEWTOCOL is used. Monitors whether the F145 (SEND) or F146 (RECV) instructions can be executed or not. Off: None of the above mentioned instructions can be executed. (During executing the instruction) On: One of the above mentioned instructions can be executed. Monitors if an abnormality has been detected during the execution of the F145 (SEND) or F146 (RECV) instructions as follows: Off: No abonormality detected. On: An abnormality detected. (communication error) The error code is stored in DT90039. End code: DT90124 - Goes on if a transmission error occurs during data communication. - Goes off when a request is made to send data, using the F159 (MTRN) instruction.
- Turn on when the terminator is received during general-

R9048

purpose serial communication.


- Goes on when transmission has been completed in

R9049

general-purpose serial communication.


- Goes off when transmission is requested in general-

R904A

R904B

COM2 port SEND/RECV instruction execution end flag

purpose communication. Monitors whether the F145 (SEND) or F146 (RECV) instructions can be executed or not. Off: None of the above mentioned instructions can be executed. (During executing the instruction) On: One of the above mentioned instructions can be executed. Monitors if an abnormality has been detected during the execution of the F145 (SEND) or F146 (RECV) instructions as follows: Off: No abonormality detected. On: An abnormality detected. (communication error) The error code is stored in DT90039. End code: DT90125 -

R904C to R904D R904E

Not used

Circular interpolation Goes on when the F176 (SPCH) circular interpolation control flag instruction is executed. Circular interpolation It is used to overwrite next data when the circular R904F data overwrite interpolation instruction is used in the continuation mode. confirmation flag Note) R9040 to R904F can be changed during 1 scan. WR905 Relay No. Name Description When using MEWNET-W0 MEWNET-W0 - Turns on when a transmission error occurs at PLC link. R9050 PLC link transmission - Turns on when there is an error in the PLC link area error flag settings. R9051 to Not used R905F 5-88
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR906 Relay No. R9060

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 MEWNET-W0 PC(PLC) link 0 transmission assurance relay Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

R9061

R9062

R9063

R9064

R9065

R9066

R9067

R9068

R9069

R906A

R906B

R906C

R906D

R906E

R906F

Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 2 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 3 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 4 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 5 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 6 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 7 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 8 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 9 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 10 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 11 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 12 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 13 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 14 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 15 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. Turns on when Unit No. 16 is communicating properly in PC(PLC) link 0 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 0 mode. 5-89

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR907 Relay No. R9070 R9071 R9072 R9073 R9074 R9075 R9076 R9077 R9078 R9079 R907A R907B R907C R907D R907E R907F

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

MEWNET-W0 PC(PLC) link 0 operation mode relay

Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode. Turns off when Unit No. 2 is in the PROG. mode. Turns on when Unit No. 3 is in the RUN mode. Turns off when Unit No. 3 is in the PROG. mode. Turns on when Unit No. 4 is in the RUN mode. Turns off when Unit No. 4 is in the PROG. mode. Turns on when Unit No. 5 is in the RUN mode. Turns off when Unit No. 5 is in the PROG. mode. Turns on when Unit No. 6 is in the RUN mode. Turns off when Unit No. 6 is in the PROG. mode. Turns on when Unit No. 7 is in the RUN mode. Turns off when Unit No. 7 is in the PROG. mode. Turns on when Unit No. 8 is in the RUN mode. Turns off when Unit No. 8 is in the PROG. mode. Turns on when Unit No. 9 is in the RUN mode. Turns off when Unit No. 9 is in the PROG. mode. Turns on when Unit No. 10 is in the RUN mode. Turns off when Unit No. 10 is in the PROG. mode. Turns on when Unit No. 11 is in the RUN mode. Turns off when Unit No. 11 is in the PROG. mode. Turns on when Unit No. 12 is in the RUN mode. Turns off when Unit No. 12 is in the PROG. mode. Turns on when Unit No. 13 is in the RUN mode. Turns off when Unit No. 13 is in the PROG. mode. Turns on when Unit No. 14 is in the RUN mode. Turns off when Unit No. 14 is in the PROG. mode. Turns on when Unit No. 15 is in the RUN mode. Turns off when Unit No. 15 is in the PROG. mode. Turns on when Unit No. 16 is in the RUN mode. Turns off when Unit No. 16 is in the PROG. mode.

5-90
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR908 Relay No. R9080

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 MEWNET-W0 PC(PLC) link 1 transmission assurance relay (32k only) Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

R9081

R9082

R9083

R9084

R9085

R9086

R9087

R9088

R9089

R908A

R908B

R908C

R908D

R908E

R908F

Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 2 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 3 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 4 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 5 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 6 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 7 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 8 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 9 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 10 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 11 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 12 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 13 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 14 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 15 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. Turns on when Unit No. 16 is communicating properly in PC(PLC) link 1 mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link 1 mode. 5-91

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR909 Relay No. R9090 R9091 R9092 R9093 R9094 R9095 R9096 R9097 R9098 R9099 R909A R909B R909C R909D R909E R909F

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

MEWNET-W0 PC(PLC) link 1 operation mode relay (32k only)

Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode. Turns off when Unit No. 2 is in the PROG. mode. Turns on when Unit No. 3 is in the RUN mode. Turns off when Unit No. 3 is in the PROG. mode. Turns on when Unit No. 4 is in the RUN mode. Turns off when Unit No. 4 is in the PROG. mode. Turns on when Unit No. 5 is in the RUN mode. Turns off when Unit No. 5 is in the PROG. mode. Turns on when Unit No. 6 is in the RUN mode. Turns off when Unit No. 6 is in the PROG. mode. Turns on when Unit No. 7 is in the RUN mode. Turns off when Unit No. 7 is in the PROG. mode. Turns on when Unit No. 8 is in the RUN mode. Turns off when Unit No. 8 is in the PROG. mode. Turns on when Unit No. 9 is in the RUN mode. Turns off when Unit No. 9 is in the PROG. mode. Turns on when Unit No. 10 is in the RUN mode. Turns off when Unit No. 10 is in the PROG. mode. Turns on when Unit No. 11 is in the RUN mode. Turns off when Unit No. 11 is in the PROG. mode. Turns on when Unit No. 12 is in the RUN mode. Turns off when Unit No. 12 is in the PROG. mode. Turns on when Unit No. 13 is in the RUN mode. Turns off when Unit No. 13 is in the PROG. mode. Turns on when Unit No. 14 is in the RUN mode. Turns off when Unit No. 14 is in the PROG. mode. Turns on when Unit No. 15 is in the RUN mode. Turns off when Unit No. 15 is in the PROG. mode. Turns on when Unit No. 16 is in the RUN mode. Turns off when Unit No. 16 is in the PROG. mode.

5-92
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.12 Table of Special Data Registers for FP


The special data registers are one word (16-bit) memory areas which store specific information. (A: Available, N/A: Not available) Register Name Descriptions No. Self-diagnostic error The self-diagnostic error code is stored here DT90000 code when a self-diagnostic error occurs. DT90001 Not used When an error occurs at FP expansion I/O unit, the bit corresponding to the unit No. will Position of abnormal be set on 1. Monitor using binary display. DT90002 I/O unit for FP left side expansion

Read -ing A N/A

Writing N/A N/A

N/A

DT90003 DT90004 DT90005

Not used Not used Not used When an error condition is detected in an intelligent unit, the bit corresponding to the unit No. will turn on . Monitor using binary display.

N/A N/A N/A

N/A N/A N/A

DT90006

Position of abnormal intelligent unit for FP left side expansion

N/A

DT90007 DT90008 DT90009

Not used Not used Communication error flag for COM2

N/A N/A Stores the error contents when using COM2 port. When the state of installation of FP0 expansion I/O unit has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary display. A

N/A N/A N/A

DT90010

Position of I/O verify error unit for FP0 right side expansion

N/A

5-93
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No.

Descriptions When the state of installation of an FP expansion I/O unit has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary display.

Read -ing

Writing

DT90011

Position of I/O verify error unit for FP left side expansion

N/A

DT90012 DT90013

Not used Not used Operation auxiliary register for data shift instruction One shift-out hexadecimal digit is stored in bit positions 0 to 3 when the data shift instruction, F105 (BSR) or F106 (BSL) is executed. The value can be read and written by executing F0 (MV) instruction. The divided remainder (16-bit) is stored in DT90015 when the division instruction F32(%) or F52(B%) instruction is executed. The divided remainder (32-bit) is stored in DT90015 and DT90016 when the division instruction F33(D%) or F53(DB%) is executed. The value can be read and written by executing F0(MV) instruction. After commencing operation, the address where the first operation error occurred is stored. Monitor the address using decimal display. The address where an operation error occurred is stored. Each time an error occurs, the new address overwrites the previous address. At the beginning of a scan, the address is 0. Monitor the address using decimal display. The data stored here is increased by one every 2.5 ms. (H0 to HFFFF) Difference between the values of the two points (absolute value) x 2.5 ms = Elapsed time between the two points. The data stored here is increased by one every 10.24 s. (H0 to HFFFF) Difference between the values of the two points (absolute value) x 10.24 s = Elapsed time between the two points. Note) The exact value is 10.24 s.

N/A N/A

N/A N/A

DT90014

DT90015 Operation auxiliary register for division instruction DT90016

DT90017

Operation error address (hold type)

N/A

DT90018

Operation error address (non-hold type)

N/A

DT90019

2.5 ms ring counter


Note1)

N/A

DT90020

10 s ring counter
Note1) Note2)

N/A

DT90021 Not used N/A N/A Note1) It is renewed once at the beginning of each one scan. Note2) As DT90020 is renewed even if F0(MV), DT90020 and D instruction is being executed, it can be used to measure the block time.

5-94
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. Scan time (current Note) value)

Descriptions The current scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The minimum scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The maximum scan time is stored here. The scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K125 indicates 12.5 ms. The mask conditions of interrupts using the instruction can be stored here. Monitor using binary display.

Read -ing

Writing

DT90022

N/A

DT90023

Scan time (minimum Note) value)

N/A

DT90024

Scan time (maximum Note) value)

N/A

DT90025

Mask condition monitoring register for interrupts (INT0 to 7)

N/A

DT90026 DT90027

Not used Periodical interrupt interval (INT24) The value set by ICTL instruction is stored. K0: periodical interrupt is not used. K1 to K3000: 0.5ms to 1.5s or 10ms to 30s

N/A A

N/A N/A

DT90028 Not used N/A N/A DT90029 Not used N/A N/A DT90030 Message 0 DT90031 Message 1 The contents of the specified message (Data DT90032 Message 2 lenght) are stored in these special data A N/A registers when F149 (MSG) instruction is DT90033 Message 3 executed. DT90034 Message 4 DT90035 Message 5 DT90036 Not used N/A N/A Note) Scan time display is only possible in RUN mode, and shows the operation cycle time. (In PROG. mode, the scan time for the operation is not displayed.) The maximum and minimum values are cleared earh time the mode is switched from RUN to PROG.

5-95
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. Operation auxiliary DT90037 register for search instruction F96(SRC) Operation auxiliary DT90038 register for search instruction F96(SRC) DT90039 Not used Potentiometer DT90040 (volume) input V0 DT90041 DT90042 DT90043 DT90044 DT90045 High-speed counter elapsed value For CH0 Potentiometer (volume) input V1

Descriptions The number of data that match the searched data is stored here when F96 (SRC) insturction is executed. The position of the first matching data is stored here when an F96 (SRC) instruction is executed. The potentiometer value (K0 to K1000) is stored here. This value can be used in analog tiemrs and other applications by using the program to read this value to a data register. V0DT90040 V1DT90041 Used by the system. Used by the system. The elapsed value (32-bit data) of the highspeed counter is stored here. The value can be read or written by executing F1 (DMV) instruction. The targe value (32-bit data) of the highspeed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions to be used when the high-speed counter related instruction F166, F167, F171, F175 or F176 is executed. The value can be read by executing F1 (DMV) instruction. The elapsed value (32-bit data) of the highspeed counter is stored here. The value can be read and written by executing F1 (DMV) instruction. The target value (32-bit data) of the highspeed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions to be used when the high-speed counter related instruction F166 or F167 is executed. The value can be read by executing F1 (DMV) instruction.

Reading A

Writing N/A

A N/A

N/A N/A

N/A

N/A N/A A

N/A N/A A

DT90046 High-speed counter target value DT90047 For CH0

N/A

DT90048 DT90049

High-speed counter elapsed value area

For CH1

DT90050 High-speed counter target value area DT90051 For CH1

N/A

5-96
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No.

Descriptions A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction. Control code setting

Read -ing

Writing

DT90052

High-speed counter and pulse output control flag

N/A

DT90053

Real-Time Clock (Clock/Calendar) monitor (hour/minute)

Note) Refer to the Count for reset input in Count 6.3.2 Input Mode and Count Hour and minute data of the Real-Time Clock (Clock/Calendar) are stored here. This data is read-only data. It cannot be overwritten. A N/A

DT90054

DT90055

DT90056

Real-Time Clock (Clock/Calendar) setting (minute/second) Real-Time Clock (Clock/Calendar) setting (day/hour) Real-Time Clock(Clock/Calendar) setting (year/month)

The year, month, day, hour, minute, second and day-of-the-week data for the Real-Time Clock(Clock/Calendar) is stored. The built-in Real-Time Clock(Clock/Calendar) will operate correctly through the year 2099 and supports leap years. The Real-Time Clock (Clock/Calendar) can be set by writing a value using a programming tool software or a program that uses the F0 (MV) instruction.(see example for DT90058) A A

DT90057

Real-Time Clock (Clock/Calendar) setting (day-of-theweek) As a day of the week is not automatially set on FPWIN GR, fix what day is set to 00, and set each value for 00 to 06. 5-97

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No.

Descriptions The Real-Time Clock(Clock/Calendar) is adjusted as follows. When setting the Real-Time Clock(Clock/Calendar) by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.)

Reading

Writing

DT90058

Real-Time Clock (Clock/Calendar) time setting

<Example> Set the time to 12:00:00 on the 5th day when the X0 turns on.

Note) If the values of DT90054 to DT90057 are changed with the programming tool software, the time will be set when the new values are written. Therefore, it is unnecessary to write to DT90058. DT90059 Serial communication error code

Error code is sotred here when a communication error occurs.

N/A

N/A

5-98
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. Step ladder process DT90060 (0 to 15) Step ladder process DT90061 (16 to 31) Step ladder process DT90062 (32 to 47) Step ladder process DT90063 (48 to 63) Step ladder process DT90064 (64 to 79) Step ladder process DT90065 (80 to 95) Step ladder process DT90066 (96 to 111) Step ladder process DT90067 (112 to 127) Step ladder process DT90068 (128 to 143) Step ladder process DT90069 (144 to 159) Step ladder process DT90070 (160 to 175) Step ladder process DT90071 (176 to 191) Step ladder process DT90072 (192 to 207) Step ladder process DT90073 (208 to 223) Step ladder process DT90074 (224 to 239) Step ladder process DT90075 (240 to 255) Step ladder process DT90076 (256 to 271) Step ladder process DT90077 (272 to 287) Step ladder process DT90078 (288 to 303) Step ladder process DT90079 (304 to 319) Step ladder process DT90080 (320 to 335) Step ladder process DT90081 (336 to 351)

Descriptions

Reading

Writing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on. Monitor using binary display. A A

A programming tool software can be used to write data.

5-99
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. Step ladder process DT90082 (352 to 367) Step ladder process DT90083 (368 to 383) Step ladder process DT90084 (384 to 399) Step ladder process DT90085 (400 to 415) Step ladder process DT90086 (416 to 431) Step ladder process DT90087 (432 to 447) Step ladder process DT90088 (448 to 463) Step ladder process DT90089 (464 to 479) Step ladder process DT90090 (480 to 495) Step ladder process DT90091 (496 to 511) Step ladder process DT90092 (512 to 527) Step ladder process DT90093 (528 to 543) Step ladder process DT90094 (544 to 559) Step ladder process DT90095 (560 to 575) Step ladder process DT90096 (576 to 591) Step ladder process DT90097 (592 to 607)

Descriptions

Reading

Writing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on . Monitor using binary display. A A

A programming tool software can be used to write data.

5-100
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No.


DT90098 DT90099 DT90100 DT90101 DT90102 DT90103 DT90104 DT90105 DT90106 DT90107 DT90108 DT90109 DT90110 DT90111 DT90112 DT90113 DT90114 DT90115 DT90116 DT90117 DT90118 DT90119 DT90120 DT90121 Step ladder process (608 to 623) Step ladder process (624 to 639) Step ladder process (640 to 655) Step ladder process (656 to 671) Step ladder process (672 to 687) Step ladder process (688 to 703) Step ladder process (704 to 719) Step ladder process (720 to 735) Step ladder process (736 to 751) Step ladder process (752 to 767) Step ladder process (768 to 783) Step ladder process (784 to 799) Step ladder process (800 to 815) Step ladder process (816 to 831) Step ladder process (832 to 847) Step ladder process (848 to 863) Step ladder process (864 to 879) Step ladder process (880 to 895) Step ladder process (896 to 911) Step ladder process (912 to 927) Step ladder process (928 to 943) Step ladder process (944 to 959) Step ladder process (960 to 975) Step ladder process (976 to 991) Step ladder process DT90122 (992 to 999) (higher byte is not used.)

Descriptions

Reading

Writing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on 1. Monitor using binary display A A

A programming tool software can be used to write data.

5-101
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. DT90123 Not used COM1 SEND/RECV DT90124 instruction end code COM2 SEND/RECV DT90125 instruction end code Forced Input/Outptu DT90126 unit No. DT90127 to Not used DT90139 DT90140 DT90141 DT90142 DT90143 DT90144 DT90145 DT90146 DT90147 DT90148 DT90149 DT90150 DT90151 DT90152 DT90153 DT90154 DT90155 MEWNET-W0 PC(PLC) link 1 status (32k type only) MEWNET-W0 PC(PLC) link 0 status

Descriptions For details, refer to Programming Manual (F145 and F146). For details, refer to Programming Manual (F145 and F146). Used by the system The number of times the receiving operation is performed. The current interval between two receiving operations: value in the register x 2.5ms The minimum inerval between two receiving operations: value in the register x 2.5ms The maximum interval between two receiving operations: value in the register x 2.5ms The number of times the sending operation is performed. The current interval between two sending operations: value in the register x 2.5ms The minimum interval between two sending operations: value in the register x 2.5ms The maximum interval between two sending operations: value in the register x 2.5ms The number of times the receiving operation is performed. The current interval between two receiving operations: value in the register x 2.5ms The minimum inerval between two receiving operations: value in the register x 2.5ms The maximum interval between two receiving operations: value in the register x 2.5ms The number of times the sending operation is performed. The current interval between two sending operations: value in the register x 2.5ms The minimum interval between two sending operations: value in the register x 2.5ms The maximum interval between two sending operations: value in the register x 2.5ms

Reading N/A N/A N/A N/A N/A

Writing N/A N/A N/A N/A N/A

N/A

N/A

5-102
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. DT90156 DT90157 DT90158 DT90159 DT90160 DT90161 DT90162 to DT90169 DT90170 DT90171 DT90172 DT90173 DT90174 DT90175 DT90176 DT90177 DT90178 DT90179 DT90180 to DT90189 DT90190 Not used High-speed counter control flag monitor for CH0 High-speed counter control flag monitor for CH1 High-speed counter control flag monitor for CH2 High-speed counter control flag monitor for CH3 MEWNET-W0 PLC link status MEWNET-W0 PC(PLC) link 0 status MEWNET-W0 PC(PLC) link 1 Status (32k type only) MEWNET-W0 PLC link unit No. MEWNET-W0 PLC link error flag Not used

Descriptions Area used for measurement of receiving interval. Area used for measurement of sending interval. Area used for measurement of receiving interval. Area used for measurement of sending interval. Stores the unit No. of PLC link Stores the error contents of PLC link Duplicated destination for PLC inter-link address Counts how many times a token is lost. Counts how many times two or more tokens are detected. Counts how many times a signal is lost. No. of times underfined commands have been received. No. of times sum check errors have occurred during reception. No. of times format errors have occurred in received data. No. of times transmission errors have occurred. No. of times procedural errors have occurred. No. of times overlapping parent units have occurred. This monitors the data specified in DT90052.

Reading A

Writing N/A

N/A

A A N/A

N/A N/A N/A

N/A

N/A

N/A

DT90191

N/A

DT90192

DT90193

5-103
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name Descriptions No. DT90194 to Not used DT90199 The elapsed value (32-bit data) for the highDT90200 High-speed For speed counter is stored here. The value can counter CH2 be read and written by executing the F1 (DMV) DT90201 elapsed value instruction. The targe value (32-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction F166, F167, F171, F175 or F176 is executed. The value can be read by executing F1 (DMV) instruction. The elapsed value (32-bit data) for the highspeed counter is stored here. The value can be read and written by executing F1 (DMV) instruction. The target value (32-bit data) of the highspeed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions, to be used when the high-speed counter related instruction F166 or F167 is executed. The value can be read by executing the F1 (DMV) instruction.

Reading N/A

Writing N/A

DT90202 High-speed counter target value DT90203 For CH2

N/A

DT90204 DT90205

High-speed counter elapsed value

For CH3

DT90206 High-speed counter target value DT90207 For CH3

N/A

DT90208 to DT90218

Not used

N/A

N/A

5-104
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. Unit No. (Station No.) DT90219 selection for DT90220 to DT90251 DT90220 DT90221 DT90222 DT90223 DT90224 DT90225 DT90226 DT90227 DT90228 DT90229 DT90230 DT90231 DT90232 DT90233 DT90234 DT90235 DT90236 DT90237 DT90238 DT90239 PLC link Unit (station) No. 5 or 13 PLC link Unit (station) No. 4 or 12 PLC link Unit (station) No. 3 or 11 PLC link Unit (station) No. 2 or 10 PLC link Unit (station) No. 1 or 9
System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47

Descriptions 0: Unit No. (Station No.) 1 to 8, 1: Unit No. (Station No.) 9 to 16

Reading A

Writing N/A

The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. <Example> When DT90219 is 0 A N/A

5-105
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

(A: Available, N/A: Not available) Register Name No. DT90240 DT90241 DT90242 DT90243 DT90244 DT90245 DT90246 DT90247 DT90248 DT90249 DT90250 DT90251 DT90252 DT90253 DT90254 D590255 DT90256 PLC link Unit (station) No. 8 or 16 PLC link Unit (station) No. 7 or 15 PLC link Unit (station) No. 6 or 14
System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47

Descriptions

Reading

Writing

The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. <Example> when DT90219 is 0. A N/A

Not used Not used Not used Not used Unit No. (Station No.) switch monitor for COM port

N/A

N/A

Used by the system

N/A

N/A

5-106
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.13 Table of System Registers for FP-X


Item
Address

Name Starting number setting for counter Hold type area starting number setting for timer and counter Hold type area starting number setting for internal relays Hold type area starting number setting for data registers Hold or non-hold setting for step ladder process Previous value is held for a leading edge detection instruction (DF instruction) with MC Hold type area starting number for PC(PLC) W0-0 link relays Hold type area starting number for PC(PLC) W0-1 link relays Hold type area starting number for PC(PLC) W0-0 link registers Hold type area starting number for PC(PLC) W0-1 link registers Disable or enable setting for duplicated output Operation setting when an I/O verification error occurs Operation setting when an operation error occurs

Default value 1008 1008 248 C14: 12230 C30, C60: 32710 Non-hold 0 to 1024 0 to 1024 0 to 256

Description These settings are effective if the optional backup battery is installed. If no backup battery is used, do not change the default settings. Otherwise proper functioning of hold/non-hold values cannot be guaranteed.

5 6 7 Hold/ Nonhold 1 8 14

0 to 32765 Hold/ Non-hold Hold/ Non-hold 0 to 64 64 to 128 0 to 128 128 to 256

Hold

10 Hold/ Nonhold 2 11 12 13 20 23 26 Action on error

64 128 128 256 Disabled Stop Stop

Disabled/Enabled Stop/Continuation of operation Stop/Continuation of operation Disabled: When a battery error occurs, a self-diagnostic error is not issued and the ERROR/ALARM LED does not flash. When a battery error occurs, a self-diagnostic error is issued and the ERROR/ALARM LED flashes.

Alarm battery error 4

(Operating setting when battery error occurs)

Disabled

Enabled:

31 32 Time setting 34

Wait time setting for multi-frame communication Timeout setting for SEND/RECV, RMRD/RMWT commands Constant value settings for scan time Expansion unit recognition time

6500.0 ms 10000.0 ms Normal scan 0 (No wait time)

10 to 81900 ms 10 to 81900 ms 0: Normal scan 0 to 350 ms: Scans once each specified time interval 0 to 10 s (0.1 second bit)

36

5-107
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Item
Address

Name Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting number for link relay transmission Link relay transmission size Starting number for link data register transmission Link data register transmission size PC(PLC) link switch flag Maximum unit number setting for MEWNET-W0 PC(PLC) link Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting number for link relay transmission Link relay transmission size Starting number for link data register transmission Link data register transmission size Maximum unit number setting for MEWNET-W0 PC(PLC) link 0 0 0 0 0

Default value

Description 0 to 64 words 0 to 128 words 0 to 63 0 to 64 words 0 to 127 0 to 127 words Normal/reverse 1 to 16 0 to 64 words 0 to 128 words 64 to 127 0 to 64 words 128 to 255 0 to 127 words 1 to 16

40 41 PC (PLC) link W0-0 setting 42 43 44 45 46 47 50 PC (PLC) link W0-1 setting 51 52 53 54 55 57

0 Normal 16 0 0 64 0 128 0 16

5-108
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Tr type Item


Address

Name

Default value

Description Do not set input X0 as high-speed counter. Incremental input (X0) Decremental input (X0) Two-phase input (X0, X1) Individual input (X0, X1) Incremental/decremental control input (X0, X1) Do not set input X1 as high-speed counter. Incremental input (X1) Decremental input (X1) Do not set input X2 as high-speed counter. Incremental input (X2) Decremental input (X2) Two-phase input (X2, X3) Individual input (X2, X3) Incremental/decremental control input (X2, X3) Do not set input X3 as high-speed counter. Incremental input (X3) Decremental input (X3) Do not set input X4 as high-speed counter. Incremental input (X4) Decremental input (X4) Two-phase input (X4, X5) Individual input (X4, X5) Incremental/decremental control input (X4, X5) Normal input Home input of pulse output CH0 Do not set input X5 as high-speed counter. Incremental input (X5) Decremental input (X5) Normal input Home input of pulse output CH1 Do not set input X6 as high-speed counter. Incremental input (X6) Decremental input (X6) Two-phase input (X6, X7) Individual input (X6, X7) Incremental/decremental control input (X6, X7) Normal input Home input of pulse output CH2 Reset input of high-speed counter CH0 Do not set input X7 as high-speed counter. Incremental input (X7) Decremental input (X7) Normal input Home input of pulse output CH3 Reset input of high-speed counter CH2

CH0: Do not set input X0 as high-speed counter CH1: Do not set input X1 as high-speed counter CH2: Do not set input X2 as high-speed counter CH3: Do not set input X3 as high-speed counter CH4: Do not set input X4 as high-speed counter X4: Normal input CH5: Do not set input X5 as high-speed counter X5: Normal input CH6: Do not set input X6 as high-speed counter

Controller input settings 1 (HSC)

400

Highspeed counter settings (X0 to X3)

Controller input settings 2 (HSC/ PLS)

401

Highspeed counter/ pulse output settings (X4 to X7)

X6: Normal input CH7: Do not set input X7 as high-speed counter X7: Normal input

5-109
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Tr type Item


Address

Name

Default value CH0: Normal output

Description Normal output (Y0, Y1) Pulse output (Y0, Y1) PWM output (Y0), Normal output (Y1) Normal output (Y2, Y3) Pulse output (Y2, Y3) PWM output (Y2), Normal output (Y3) Normal output (Y4, Y5) Pulse output (Y4, Y5) PWM output (Y4), Normal output (Y5) Normal output (Y6, Y7) Pulse output (Y6, Y7) PWM output (Y6), Normal output (Y7)

Controller output settings (PLS/ PWM)

402

Pulse/ PWM output settings (Y0 to Y7)

CH1: Normal output CH2: Normal output CH3: Normal output

Interrupt/ Pulse catch settings

403

Pulse catch input settings Interrupt input settings

Not set

The pressed contact is set for the pulse catch input.

404

Not set

The pressed contact is set for the interrupt input.

The pressed contact is up and set to trailing edge. Note1) If CH0, CH2, CH4 and CH6 of the high-speed counter is set to the two-phase input, individual input or incremental/decremental control input, the settings of CH1, CH3, CH and CH7 will be invalid. Note2) Only CH0 and CH2 are available for the reset input of the high-speed counter. X6 for CH0 and X7 for CH2 can be allocated. Note3) X4 to X7 can be used as the home input of the pulse output CH0 to CH3. When using the home return function of the pulse output, always set the home input. In that case, X4 to X7 cannot be set as the high-speed counter. Note4) When using the pulse output/PWM output, the controller output settings must be specified. The output that has been set to the pulse output/PWM output cannot be used as the normal output. Note5) If the same input has been set to the high-speed, pulse catch and interrupt input simultaneously, the following precedence order is effective: [High-speed counter] [Pulse catch] [Interrupt input]

Interrupt edge settings

405

Interrupt edge setting for controller input

Leading edge

5-110
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Ry type Item


Address

Name

Default value

Description Do not set input X100 as high-speed counter. Two-phase input (X100, X101) Two-phase input (X100, X101), Reset input (X102) Incremental input (X100) Incremental input (X100), Reset input (X102) Decremental input (X100) Decremental input (X100), Reset input (X102) Incremental/decremental input (X100, X101) Incremental/decremental input (X100, X101), Reset input (X102) Incremental/decremental control input (X100, X101) Incremental/decremental control input (X100, X101), Reset input (X102) Do not set input X101 as high-speed counter. Incremental input (X101) Incremental input (X101), Reset input (X102) Decremental input (X101) Decremental input (X101), Reset input (X102) Normal output (Y100, Y101) Pulse output (Y100, Y101) PWM output (Y100), Normal output (Y101) Do not set input X200 as high-speed counter. Two-phase input (X200, X201) Two-phase input (X200, X201), Reset input (X202) Incremental input (X200) Incremental input (X200), Reset input (X202) Decremental input (X202) Decremental input (X202), Reset input (X202) Incremental/decremental input (X200, X201) Incremental/decremental input (X200, X201), Reset input (X202) Incremental/decremental control (X200, X201) Incremental/decremental control (X200, X201), Reset input (X202) Does not set input X201 as high-speed counter. Incremental input (X201) Incremental input (X201), Reset input (X202) Decremental input (X201) Decremental input (X201), Reset input (X202) Normal output (Y200, Y201) Pulse output (Y200, Y201) PWM output (Y200), Normal output (Y201)

400

High-speed counter settings (X100 to X102)

CH8: Do not set input X100 as high-speed counter

Pulse I/O cassette settings (HSC/ PLS)

Pulse output settings (Y100 to Y101)

CH9: Do not set input X101 as high-speed counter CH0: Normal output

401

High-speed counter settings (X200 to X202)

CHA: Do not set input X200 as high-speed counter

Pulse output settings (Y200 to Y201)

CHB: Do not set input X201 as high-speed counter CH1: Normal output

5-111
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Note1) If the operation mode is set to Two-phase, incremental/decremental, or incremental/decremental control, the setting for CH9 is invalid in system register 400 and the setting for CHB is invalid in system register 401. Note2) If reset input settings overlap, the CH9 setting takes precedence in system register 400 and the CHB setting takes precedence in system register 401. Note3) CHA, CHB and CH1 input signals in system register 401 are the signals when the pulse I/O cassette (AFPX-PLS) is installed in the cassette mounting part 2. Note4) If the operation mode setting for the pulse output CH0 and CH1 is carried out, it cannot be used as normal output. When the operation mode for the pulse output CH0 is set to 1, the reset input setting for the high-speed counter CH8 and CH9 is invalid. When the operation mode for the pulse output CH1 is set to 1, the reset input setting for the high-speed counter CHA and CHB is invalid. Note5) Upgrade FPWIN GR to Ver2.6 or higher version if the No. of I/O allocation is indicated with 1-digit number such as X0 in the setting window No. 400 and 401 of FPWIN GR.

5-112
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Ry type Item


Address

Name

Default value CH0: Do not set input X0 as high-speed counter CH1: Do not set input X1 as high-speed counter CH2: Do not set input X2 as high-speed counter

Description Do not set input X0 as high-speed counter. Incremental input (X0) Decremental input (X0) Two-phase input (X0, X1) Do not set input X1 as high-speed counter. Incremental input (X1) Decremental input (X1) Two-phase input (X0, X1) Do not set input X2 as high-speed counter. Incremental input (X2) Decremental input (X2) Two-phase input (X2, X3) Do not set input X3 as high-speed counter. Incremental input (X3) Decremental input (X3) Two-phase input (X2, X3) Do not set input X4 as high-speed counter. Incremental input (X4) Decremental input (X4) Two-phase input (X3 X4) Do not set input X5 as high-speed counter. Incremental input (X5) Decremental input (X5) Two-phase input (X4, X5) Do not set input X6 as high-speed counter. Incremental input (X6) Decremental input (X6) Two-phase input (X5, X6) Do not set input X7 as high-speed counter. Incremental input (X7) Decremental input (X7) Two-phase input (X6, X7)

Controller input settings (HSC)

402

Highspeed counter settings (X0 to X7)

CH3: Do not set input X3 as high-speed counter CH4: Do not set input X4 as high-speed counter CH5: Do not set input X5 as high-speed counter CH6: Do not set input X6 as high-speed counter CH7: Do not set input X7 as high-speed counter

Interrupt/ pulse catch settings

403

Pulse catch input settings Interrupt input settings

Not set The pressed contact is set for the pulse catch input.

404

Not set The pressed contact is set for the interrupt input.

5-113
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Ry type Item


Address

Name Interrupt edge setting for controller input

Default value

Description

405 Interrupt edge settings 406

Leading edge The pressed contact is up and set to trailing edge.

Interrupt edge setting for pulse I/O cassette

Leading edge The pressed contact is up and set to trailing edge.

Note1) For counting two-phase input, only CH0, CH2, CH4 and CH6 can be used. When two-phase input is specified for CH0, CH2, CH4 and CH6, the settings for CH1, CH3, CH5 and CH7 corresponding to each CH No. are ignored, however, specify the same setting for those channels. Note2) The settings for pulse catch and interrupt input can only be specified in system registers 403 and 404. Note3) If system register 400 to 404 have been set simultaneously for the same input relay, the following precedence order is effective: [High-speed counter][Pulse catch][Interrupt input]. <Example> When the high-speed counter is being used in the addition input mode, even if input X0 is specified as an interrupt input or as pulse catch input, those settings are invalid, and X0 functions as counter input for the high-speed counter. Note4) Upgrade FPWIN GR to Ver2.6 or higher version if the No. of I/O allocation is indicated with 1-digit number such as X0 in the setting window No. 403,404 and 406 of FPWIN GR.

5-114
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Item
Address

Name Unit No. setting Communication mode setting Selection of modem connection 1

Default value Computer link Disabled

Description 1 to 99 Computer link General-purpose communications Enabled/Disabled Enter the settings for the various items. - Data length bit: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator: CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 57600 bps 115200 bps 0 to 32764

410 412

413

Communication format setting

Data length bit: 8 bits Parity check: with odd Stop bit: 1 bit

Tool port setting 415 Baud rate setting 9600 bps

420

421

Starting address for received buffer of general (serial data) communication mode Buffer capacity setting for data received of general (serial data) communication mode

2048

0 to 2048

5-115
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X
Item
Address

Name Unit No. setting Communication mode setting Selection of modem connection 1

Default value

Description 1 to 99 Computer link General-purpose serial communication PC(PLC) link MODBUS RTU Enabled/Disabled Enter the settings for the various items.
- Data length bit: 7 bits/8 bits - Parity check: none/with odd/with even - Stop bit: 1 bit/2 bits - The following setting is valid only when

410

Computer link

412

Disabled

413 COM. 1 port setting 415

Communication format setting

Data length bit: 8 bits Parity check: Odd Stop bit: 1 bit

Baud rate setting

9600 bps

the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator: CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 57600 bps 115200 bps

Starting address for received buffer of 416 0 0 to 32764 general (serial data) communication mode Buffer capacity setting for data 417 received of general 2048 0 to 2048 (serial data) communication mode Note1) The communication format in a PC(PLC) link is fixed at the following settings: Data length is 8 bits, odd parity, stop bit is 1. The communication speed (baud rate) is fixed at 115200 bps. Note2) Reference: For information on MODBUS RTU mode operation, <MODBUS RUT Specifications>.

5-116
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X
Item
Address

Name Unit No. setting Communication mode setting 1

Default value Computer link Disabled Built-in USB

Description 1 to 99 Computer link General-purpose serial communication MODBUS RTU Enabled/Disabled Built-in USB Communication cassette Enter the settings for the various items. - Data length bit: 7 bits/8 bits - Parity check: none/odd/even - Stop bit: 1 bit/2 bits - The following setting is valid only when the communication mode specified by system register 412 has been set to General-purpose serial communication. - Terminator: CR/CR+LF/None - Header: STX not exist/STX exist 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 57600 bps 115200 bps

411

412

Selection of modem connection Selection of port

414 COM. 2 port setting

Communication format setting

Data length bit: 8 bits Parity check: with odd Stop bit: 1 bit

415

Baud rate setting

9600 bps

Starting address for received buffer of 416 2048 0 to 32764 general (serial data) communication mode Buffer capacity setting for data 417 received of general 2048 0 to 2048 (serial data) communication mode Note1) The communication format in a PC(PLC) link is fixed at the following settings: the data length is 8 bits, odd parity, stop bit is 1. The communication speed (baud rate) is fixed at 115200 bps. Note2) The USB port for C30 and C60 can be selected by the system register setting. The USB port has been selected for the COM2 port of C30 and C60 as default setting. The USB port is 115.2 kbps despite of the baud rate setting No. 415. The setting for No. 412 must be changed to communication cassette for using the COM2 port of the communication cassette. The COM2 port of the USB port and the communication cassette cannot be used at the same time.

5-117
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X
Item
Address

Name

Default value

Description

Controller input time constant setting 1 X0 to X3 Controller input time 431 constant setting 1 X4 to X7 Controller input time None 432 constant setting 2 Cont1 ms X8 to XB roller 2 ms Controller input time input 4 ms 433 constant setting 2 time 8 ms XC to XF None consController input time 16 ms tant 434 constant setting 3 32 ms setX10 to X13 64 ms tings (Note1) Controller input time 128 ms 435 constant setting 3 156 ms X14 to X17 Controller input time 436 constant setting 4 X18 to X1B Controller input time 437 constant setting 4 X1C to X1F Note1) These settings are available for the FP-X V2.0 or later. 430

5-118
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.14 Table of Special Internal Relays for FP-X


The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. WR900 FP-X Address Name Self-diagnostic error R9000 flag R9001 Not used Application cassette R9002 I/O error flag Application cassette R9003 abnormal error flag I/O verification error R9004 flag R9005 Backup battery error flag (non-hold)

Description Turns on when a self-diagnostic error occurs. The content of self-diagnostic error is stored in DT90000. Turns on when an error is detected in the I/O type application cassette. Turns on when an error is detected in the application cassette. Turns on when an I/O verification error occurs. Turns on when a backup battery error occurs. Turns on when the battery has run out even if the system register No. 4 has been set not to inform the battery error. Turns on when a backup battery error occurs. Turns on when the battery has run out even if the system register No. 4 has been set not to inform the battery error. Once a battery error has been detected, this is held even after recovery has been made. It goes off if the power supply is turned off, or if the system is initialized. Turns on and keeps the on state when an operation error occurs. The address where the error occurred is stored in DT90017. (indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT90018. The contents change each time a new error occurs. This is set if an overflow or underflow occurs in the calculation results, and as a result of a shift system instruction being executed. Turns on for an instant when the compared results become larger in the comparison instructions. Turns on for an instant, - when the compared results are equal in the comparison instructions. - when the calculated results become 0 in the arithmetic instructions. Turns on for an instant when the compared results become smaller in the comparison instructions. Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137(STMR)/F183(DSTM) auxiliary timer instruction. The flag turns off when the trigger for auxiliary timer instruction turns off. Turns on when communication error at tool port is occurred. Turns on when scan time exceeds the time specified in system register 34 during constant scan execution. This goes on if 0 has been set using system register 34. 5-119

R9006

Backup battery error flag (hold)

R9007

Operation error flag (hold) Operation error flag (non-hold) Carry flag > Flag

R9008

R9009 R900A

R900B

= Flag

R900C

< Flag Auxiliary timer Contact Tool port communication error Constant scan error flag

R900D

R900E R900F

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR901 FP-X Address Name R9010 Always on relay R9011 Always off relay R9012 Scan pulse relay R9013 Initial (on type) pulse relay Initial (off type) pulse relay Step ladder initial pulse relay (on type) Not used Not used 0.01 s clock pulse relay

Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans. Goes off for only the first scan after operation (RUN) has been started, and goes on for the second and subsequent scans. Turns on for only the first scan of a process after the boot at the step ladder control.

R9014 R9015 R9016 R9017 R9018

Repeats on/off operations in 0.01 sec. cycles. Repeats on/off operations in 0.02 s. cycles. Repeats on/off operations in 0.1 s. cycles. Repeats on/off operations in 0.2 s. cycles. Repeats on/off operations in 1 s. cycles. Repeats on/off operations in 2 s. cycles. Repeats on/off operations in 1 min. cycles. -

R9019

0.02 s clock pulse relay

R901A

0.1 s clock pulse relay

R901B

0.2 s clock pulse relay

R901C

1 s clock pulse relay

R901D

2 s clock pulse relay

R901E R901F

1 min clock pulse relay Not used

5-120
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR902 FP-X Address R9020 R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 R9029 R902A R902B R902C R902D R902E R902F

Name

RUN mode flag Not used Not used Not used Not used Not used Message flag Not used Not used Forcing flag Interrupt enable flag Interrupt error flag Sample point flag Sample trace end flag Sampling stop trigger flag Sampling enable flag

Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Turns on while the F149 (MSG) instruction is executed. Turns on during forced on/off operation for input/output relay timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Turns on when an interrupt error occurs. Sampling by the instruction=0 Sampling at constant time intervals=1 When the sampling operation stops=1, When the sampling operation starts=0 When the sampling stop trigger activates=1 When the sampling stop trigger stops=0 When sampling starts=1 When sampling stops=0

5-121
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR903 FP-X Address Name R9030 Not used R9031 Not used R9032 COM1 port mode flag

Description - Turns on when the general-purpose communication

function is being used


- Goes off when any function other than the general-

R9033 R9034 R9035 R9036 R9037

PR instruction flag Editing in RUN mode flag Not used Not used COM1 port communication error flag

purpose communication function is being used. Off: Printing is not executed. On: Execution is in progress. Goes on for ony the first scan following completion of a rewrite during the RUN operation. - Goes on if a transmission error occurs during data communication. - Goes off when a request is made to send data, using the F159 (MTRN) instruction.

COM1 port reception done flag during - Turns on when the terminator is received during general R9038 general- purpose serial purpose serial communication. communication COM1 port transmission - Goes on when transmission has been completed in done flag during general-purpose serial communication. R9039 general-purpose serial - Goes off when transmission is requested in generalcommunication purpose serial communication. R903A Not used R903B Not used R903C Not used R903D Not used TOOL port reception - Turns on when the terminator is received during general R903E done flag during general purpose serial communication. purpose communication TOOL port transmission - Goes on when transmission has been completed in done flag during general-purpose serial communication. R903F general-purpose serial - Goes off when transmission is requested in generalcommunication purpose serial communication. Note) R9030 to R903F can be changed during 1 scan.

5-122
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR904 FP-X Address R9040 R9041 R9042 R9043

Name

TOOL port mode flag COM1 port PC(PLC) link flag COM2 port mode flag Not used

R9044

COM1 port SEND/RECV instruction execution flag

R9045

COM1 port SEND/RECV instruction execution end flag Not used COM2 port communication error flag COM2 port reception done flag during general-purpose communicating COM2 port transmission done flag during general-purpose communication

R9046 R9047

Description - Goes on when the general-purpose serial communication is used. - Goes off when the MEWTOCOL is used. Turn on while the PC(PLC) link function is used. - Goes on when the general-purpose serial communication is used. - Goes off when the MEWTOCOL is used. Monitors whether the F145 (SEND) or F146 (RECV) instructions can be executed or not for the COM1 port. Off: None of the above mentioned instructions can be executed. (During executing the instruction) On: One of the above mentioned instructions can be executed. Monitors if an abnormality has been detected during the execution of the F145 (SEND) or F146 (RECV) instructions for the COM1 port as follows: Off: No abonormality detected. On: An abnormality detected. (communication error) The error code is stored in DT90124. - Goes on if a transmission error occurs during data communication. - Goes off when a request is made to send data, using the F159 (MTRN) instruction.
- Turn on when the terminator is received during

R9048

general-purpose serial communication.


- Goes on when transmission has been completed in

R9049

general-purpose serial communication.


- Goes off when transmission is requested in general-

R904A

COM2 port SEND/RECV instruction execution flag

R904B

COM2 port SEND/RECV instruction execution end flag

purpose communication. Monitors whether the F145 (SEND) or F146 (RECV) instructions can be executed or not for the COM2 port. Off: None of the above mentioned instructions can be executed. (During executing the instruction) On: One of the above mentioned instructions can be executed. Monitors if an abnormality has been detected during the execution of the F145 (SEND) or F146 (RECV) instructions for the COM2 port as follows: Off: No abonormality detected. On: An abnormality detected. (communication error) The error code is stored in DT90125.

R904C to Not used R904F Note) R9040 to R904F can be changed during 1 scan. 5-123
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR905 FP-X Address

Name

R9050

MEWNET-W0 PC(PLC) link transmission error flag Not used

Description When using MEWNET-W0 - Turns on when a transmission error occurs at PC(PLC) link. - Turns on when there is an error in the PC(PLC) link area settings.

R9051 to R905F

5-124
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR906 FP-X Address R9060

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7

R9061

R9062

R9063

R9064

R9065

R9066 MEWNET-W0 PC(PLC) link 0 transmission assurance relay

R9067

Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

R9068

R9069

R906A

R906B

R906C

R906D

R906E

R906F

Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 2 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 3 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 4 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 5 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 6 is communicating properly in PLC link mode. Turns off when operation is stopped, when an error occurs, or when not in the PLC link mode. Turns on when Unit No. 7 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 8 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 9 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 10 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 11 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 12 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 13 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 14 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 15 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 16 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. 5-125

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR907 FP-X Address R9070 R9071 R9072 R9073 R9074 R9075 R9076 R9077 R9078 R9079 R907A R907B R907C R907D R907E R907F

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

MEWNET-W0 PC(PLC) link 0 operation mode relay

Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode. Turns off when Unit No. 2 is in the PROG. mode. Turns on when Unit No. 3 is in the RUN mode. Turns off when Unit No. 3 is in the PROG. mode. Turns on when Unit No. 4 is in the RUN mode. Turns off when Unit No. 4 is in the PROG. mode. Turns on when Unit No. 5 is in the RUN mode. Turns off when Unit No. 5 is in the PROG. mode. Turns on when Unit No. 6 is in the RUN mode. Turns off when Unit No. 6 is in the PROG. mode. Turns on when Unit No. 7 is in the RUN mode. Turns off when Unit No. 7 is in the PROG. mode. Turns on when Unit No. 8 is in the RUN mode. Turns off when Unit No. 8 is in the PROG. mode. Turns on when Unit No. 9 is in the RUN mode. Turns off when Unit No. 9 is in the PROG. mode. Turns on when Unit No. 10 is in the RUN mode. Turns off when Unit No. 10 is in the PROG. mode. Turns on when Unit No. 11 is in the RUN mode. Turns off when Unit No. 11 is in the PROG. mode. Turns on when Unit No. 12 is in the RUN mode. Turns off when Unit No. 12 is in the PROG. mode. Turns on when Unit No. 13 is in the RUN mode. Turns off when Unit No. 13 is in the PROG. mode. Turns on when Unit No. 14 is in the RUN mode. Turns off when Unit No. 14 is in the PROG. mode. Turns on when Unit No. 15 is in the RUN mode. Turns off when Unit No. 15 is in the PROG. mode. Turns on when Unit No. 16 is in the RUN mode. Turns off when Unit No. 16 is in the PROG. mode.

5-126
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR908 FP-X Address R9080

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7

R9081

R9082

R9083

R9084

R9085

R9086 MEWNET-W0 PC(PLC) link 1 transmission assurance relay

R9087

Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

R9088

R9089

R908A

R908B

R908C

R908D

R908E

R908F

Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 2 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 3 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 4 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 5 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 6 is communicating properly in PLC link mode. Turns off when operation is stopped, when an error occurs, or when not in the PLC link mode. Turns on when Unit No. 7 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 8 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 9 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 10 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 11 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 12 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 13 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 14 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 15 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. Turns on when Unit No. 16 is communicating properly in PC(PLC) link mode. Turns off when operation is stopped, when an error occurs, or when not in the PC(PLC) link mode. 5-127

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR909 FP-X Address R9090 R9091 R9092 R9093 R9094 R9095 R9096 R9097 R9098 R9099 R909A R909B R909C R909D R909E R909F

Name Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16

MEWNET-W0 PC(PLC) link 1 operation mode relay

Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode. Turns off when Unit No. 2 is in the PROG. mode. Turns on when Unit No. 3 is in the RUN mode. Turns off when Unit No. 3 is in the PROG. mode. Turns on when Unit No. 4 is in the RUN mode. Turns off when Unit No. 4 is in the PROG. mode. Turns on when Unit No. 5 is in the RUN mode. Turns off when Unit No. 5 is in the PROG. mode. Turns on when Unit No. 6 is in the RUN mode. Turns off when Unit No. 6 is in the PROG. mode. Turns on when Unit No. 7 is in the RUN mode. Turns off when Unit No. 7 is in the PROG. mode. Turns on when Unit No. 8 is in the RUN mode. Turns off when Unit No. 8 is in the PROG. mode. Turns on when Unit No. 9 is in the RUN mode. Turns off when Unit No. 9 is in the PROG. mode. Turns on when Unit No. 10 is in the RUN mode. Turns off when Unit No. 10 is in the PROG. mode. Turns on when Unit No. 11 is in the RUN mode. Turns off when Unit No. 11 is in the PROG. mode. Turns on when Unit No. 12 is in the RUN mode. Turns off when Unit No. 12 is in the PROG. mode. Turns on when Unit No. 13 is in the RUN mode. Turns off when Unit No. 13 is in the PROG. mode. Turns on when Unit No. 14 is in the RUN mode. Turns off when Unit No. 14 is in the PROG. mode. Turns on when Unit No. 15 is in the RUN mode. Turns off when Unit No. 15 is in the PROG. mode. Turns on when Unit No. 16 is in the RUN mode. Turns off when Unit No. 16 is in the PROG. mode.

5-128
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

WR910 FP-X Address Name Description R9100 to Not used R910F R9110 HSC-CH0 R9111 HSC-CH1 R9112 HSC-CH2 R9113 HSC-CH3 - Turns on while the F166 (HC1S) and F167 (HC1R) R9114 HSC-CH4 instructions are executed. R9115 HSC-CH5 - Turns off when the F166 (HC1S) and F167 (HC1R) R9116 HSC-CH6 instructions are completed. R9117 HSC-CH7 Control flag R9118 HSC-CH8 Note1) R9119 HSC-CH9 Note1) R911A HSC-CHA Note1) R911B HSC-CHB Note1) R911C PLS-CH0 - Turns on while the pulses are being output by the F171 R911D PLS-CH1 (SPDH), F172 (PLSH), F173 (PWMH) and F174 (SP0H) Note2) R911E PLS-CH2 instructions. Note2) R911F PLS-CH3 Note1) This relay is avaialble for the FP-X Ry type only. Note2) This relay is available for the FP-X Tr type only.

5-129
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.15 Table of Special Data Registers for FP-X


FP-X (A: Available, N/A: Not available) Read WritDescription -ing ing The self-diagnostic error code is stored here A N/A when a self-diagnostic error occurs. N/A N/A When an error occurs at the I/O board for the application cassette, the bit corresponding to the board will be set on. A N/A

Address DT90000 DT90001

Name Self-diagnostic error code Not used

DT90002

Position of abnormal I/O board for application cassette

DT90003 DT90004 DT90005

Not used Not used Not used

When an error occurs at the intelligent board for the application cassette, the bit corresponding to the board will be set on.

N/A N/A N/A

N/A N/A N/A

DT90006

Position of abnormal application cassette

N/A

DT90007 DT90008 DT90009

Not used Not used Communication error flag for COM2

DT90010

Extension I/O verify error unit

Stores the error contents when using COM2 port. When the state of installation of FP-X expansion I/O unit has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary display.

N/A N/A A

N/A N/A N/A

N/A

5-130
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

DT90011

Add-on cassette verify error unit

FP-X (A: Available, N/A: Not available) Read WritDescription -ing ing When the state of installation of an FP-X addon cassette has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary display. A N/A

DT90012 DT90013

Not used Not used Operation auxiliary register for data shift instruction

DT90014

One shift-out hexadecimal digit is stored in bit positions 0 to 3 when the data shift instruction, F105 (BSR) or F106 (BSL) is executed. The value can be read and written by executing F0 (MV) instruction. The divided remainder (16-bit) is stored in DT90015 when the division instruction F32(%) or F52(B%) instruction is executed. The divided remainder (32-bit) is stored in DT90015 and DT90016 when the division instruction F33(D%) or F53(DB%) is executed. The value can be read and written by executing F0(MV) instruction.

N/A N/A

N/A N/A

DT90015 Operation auxiliary register for division instruction DT90016

After commencing operation, the address where the first operation error occurred is DT90017 A N/A stored. Monitor the address using decimal display. The address where an operation error occurred is stored. Each time an error occurs, Operation error the new address overwrites the previous DT90018 address (non-hold A N/A address. At the beginning of a scan, the type) address is 0. Monitor the address using decimal display. The data stored here is increased by one every 2.5 ms. (H0 to HFFFF) 2.5 ms ring counter DT90019 Note1) Difference between the values of the two A N/A points (absolute value) x 2.5 ms = Elapsed time between the two points. The data stored here is increased by one every 10.24 s. (H0 to HFFFF) 10 s ring counter Difference between the values of the two DT90020 Note1) Note2) A N/A points (absolute value) x 10.24 s = Elapsed time between the two points. Note) The exact value is 10.24 s. DT90021 Not used N/A N/A Note1) It is renewed once at the beginning of each one scan. Note2) As DT90020 is renewed even if F0(MV), DT90020 and D instruction is being executed, it can be used to measure the block time. Operation error address (hold type) 5-131
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

DT90022

Scan time (current Note) value)

DT90023

Scan time (minimum Note) value)

DT90024

Scan time (maximum Note) value)

DT90025

Mask condition monitoring register for interrupts (INT0 to 13) Not used Periodical interrupt interval (INT24) Sample trace interval

FP-X (A: Available, N/A: Not available) Read WritDescription -ing ing The current scan time is stored here. Scan time is calculated using the formula: A N/A Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The minimum scan time is stored here. Scan time is calculated using the formula: A N/A Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms. The maximum scan time is stored here. The scan time is calculated using the formula: A N/A Scan time (ms) = stored data (decimal) x 0.1 ms Example: K125 indicates 12.5 ms. The mask conditions of interrupts using the instruction can be stored here. Monitor using binary display. A N/A

DT90026 DT90027 DT90028

DT90029 Not used N/A N/A DT90030 Message 0 DT90031 Message 1 The contents of the specified message (Data length) are stored in these special data DT90032 Message 2 A N/A registers when F149 (MSG) instruction is DT90033 Message 3 executed. DT90034 Message 4 DT90035 Message 5 DT90036 Not used N/A N/A Note) Scan time display is only possible in RUN mode, and shows the operation cycle time. (In PROG. mode, the scan time for the operation is not displayed.) The maximum and minimum values are cleared each time the mode is switched from RUN to PROG.

The value set by ICTL instruction is stored. K0: periodical interrupt is not used. K1 to K3000: 0.5ms to 1.5s or 10ms to 30s K0: Sampling by the SMPL instruction K1 to K3000 (x 10 ms): 10 ms to 30 s -

N/A A A

N/A N/A N/A

5-132
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90037

Name Work1 for SRC instructions Work2 for SRC instructions Not used Volume input 0

DT90038 DT90039 DT90040

DT90041

Volume input 1

DT90042

Volume input 2

DT90043

Volume input 3

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing The number of data that match the searched data is stored here when F96 (SRC) A N/A insturction is executed. The position of the first matching data is stored here when an F96 (SRC) instruction is A N/A executed. N/A N/A The potentiometer value (K0 to K1000) is stored here. This value can be used in analog timers and other applications by using the A N/A program to read this value to a data register. V0DT90040 V1DT90041 For C60 only: The potentiometer value (K0 to K1000) is stored here. This value can be used in analog A N/A timers and other applications by using the program to read this value to a data register. V2DT90042 V3DT90043 Used by the system. A N/A N/A N/A N/A N/A N/A N/A A N/A N/A N/A N/A N/A N/A N/A

DT90044 DT90045 DT90046 DT90047 DT90048 DT90049 DT90050 DT90051

System work Not used Not used Not used Not used Not used Not used Not used

5-133
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

(A: Available, N/A: Not available) Read WritDescription -ing ing A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction. Control code setting

FP-X

DT90052

High-speed counter control flag

N/A

5-134
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

(A: Available, N/A: Not available) Read WritDescription -ing ing A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction. Control code setting

FP-X

DT90052

Pulse output control flag

N/A

5-135
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

(A: Available, N/A: Not available) Read WritDescription -ing ing Hour and minute data of the Real-Time Clock are stored here. This data is read-only data. It cannot be overwritten. A N/A

FP-X

DT90053

Real-Time Clock monitor (hour/minute)

DT90054

Real-Time Clock setting (minute/second)

DT90055

Real-Time Clock setting (day/hour)

The year, month, day, hour, minute, second and day-of-the-week data for the Real-Time Clock is stored. The built-in Real-Time Clock will operate correctly through the year 2099 and supports leap years. The Real-Time Clock can be set by writing a value using a programming tool software or a program that uses the F0 (MV) instruction.(see example for DT90058)

DT90056

Real-Time Clock setting (year/month)

DT90057

Real-Time Clock setting (day-of-theweek) As a day of the week is not automatially set on FPWIN GR, fix what day is set to 00, and set each value for 00 to 06.

5-136
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address

Name

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing The Real-Time Clock is adjusted as follows. When setting the Real-Time Clock by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.) <Example> Set the time to 12:00:00 on the 5th day when the X0 turns on.

DT90058

Real-Time Clock time setting and 30 seconds correction register

Note) If the values of DT90054 to DT90057 are changed with the programming tool software, the time will be set when the new values are written. Therefore, it is unnecessary to write to DT90058. When the correcting times less than 30 seconds By setting the lowest bit of DT90058 to 1, the value will be moved up or down and become exactly 0 seconds. After the correction is completed, DT90058 is cleared to 0. Example: Correct to 0 seconds with X0: on

At the time of coorection, if between 0 and 29 seconds, it will be moved down, and if between 30 and 59 seconds, it will be moved up. In the example above, if the time was 5 minutes 29 seconds, it will become 5 minutes 0 seconds;and, if the time was 5 minutes 35 seconds, it will become 6 minutes 0 seconds. DT90059 Communication error code

Error code is sotred here when a communication error occurs.

N/A

N/A

5-137
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90060 DT90061 DT90062 DT90063 DT90064 DT90065 DT90066 DT90067 DT90068 DT90069 DT90070 DT90071 DT90072 DT90073 DT90074 DT90075 DT90076 DT90077 DT90078 DT90079 DT90080 DT90081

Name Step ladder process (0 to 15) Step ladder process (16 to 31) Step ladder process (32 to 47) Step ladder process (48 to 63) Step ladder process (64 to 79) Step ladder process (80 to 95) Step ladder process (96 to 111) Step ladder process (112 to 127) Step ladder process (128 to 143) Step ladder process (144 to 159) Step ladder process (160 to 175) Step ladder process (176 to 191) Step ladder process (192 to 207) Step ladder process (208 to 223) Step ladder process (224 to 239) Step ladder process (240 to 255) Step ladder process (256 to 271) Step ladder process (272 to 287) Step ladder process (288 to 303) Step ladder process (304 to 319) Step ladder process (320 to 335) Step ladder process (336 to 351)

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on. Monitor using binary display. A A

A programming tool software can be used to write data.

5-138
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90082 DT90083 DT90084 DT90085 DT90086 DT90087 DT90088 DT90089 DT90090 DT90091 DT90092 DT90093 DT90094 DT90095 DT90096 DT90097

Name Step ladder process (352 to 367) Step ladder process (368 to 383) Step ladder process (384 to 399) Step ladder process (400 to 415) Step ladder process (416 to 431) Step ladder process (432 to 447) Step ladder process (448 to 463) Step ladder process (464 to 479) Step ladder process (480 to 495) Step ladder process (496 to 511) Step ladder process (512 to 527) Step ladder process (528 to 543) Step ladder process (544 to 559) Step ladder process (560 to 575) Step ladder process (576 to 591) Step ladder process (592 to 607)

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on . Monitor using binary display. A A

A programming tool software can be used to write data.

5-139
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address
DT90098 DT90099 DT90100 DT90101 DT90102 DT90103 DT90104 DT90105 DT90106 DT90107 DT90108 DT90109 DT90110 DT90111 DT90112 DT90113 DT90114 DT90115 DT90116 DT90117 DT90118 DT90119 DT90120 DT90121

Name
Step ladder process (608 to 623) Step ladder process (624 to 639) Step ladder process (640 to 655) Step ladder process (656 to 671) Step ladder process (672 to 687) Step ladder process (688 to 703) Step ladder process (704 to 719) Step ladder process (720 to 735) Step ladder process (736 to 751) Step ladder process (752 to 767) Step ladder process (768 to 783) Step ladder process (784 to 799) Step ladder process (800 to 815) Step ladder process (816 to 831) Step ladder process (832 to 847) Step ladder process (848 to 863) Step ladder process (864 to 879) Step ladder process (880 to 895) Step ladder process (896 to 911) Step ladder process (912 to 927) Step ladder process (928 to 943) Step ladder process (944 to 959) Step ladder process (960 to 975) Step ladder process (976 to 991) Step ladder process (992 to 999) (higher byte is not used.)

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on. Monitor using binary display A A

A programming tool software can be used to write data.

DT90122

5-140
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90123 DT90124 DT90125 DT90126 DT90127 to DT90139 DT90140 DT90141 DT90142 DT90143 DT90144 DT90145 DT90146 DT90147 DT90148 DT90149 DT90150 DT90151 DT90152 DT90153 DT90154 DT90155 DT90156 DT90157

Name Not used COM1 SEND/RECV instruction end code COM2 SEND/RECV instruction end code Forced ON/OFF operating station display Not used

FP-X (A: Available, N/A: Not available) Read Writ Description -ing -ing N/A N/A For details, refer to Programming Manual N/A N/A (F145 and F146). For details, refer to Programming Manual N/A N/A (F145 and F146). Used by the system The number of times the receiving operation is performed. The current interval between two receiving operations: value in the register x 2.5ms The minimum inerval between two receiving operations: value in the register x 2.5ms The maximum interval between two receiving operations: value in the register x 2.5ms The number of times the sending operation is performed. The current interval between two sending operations: value in the register x 2.5ms The minimum interval between two sending operations: value in the register x 2.5ms The maximum interval between two sending operations: value in the register x 2.5ms The number of times the receiving operation is performed. The current interval between two receiving operations: value in the register x 2.5ms The minimum inerval between two receiving operations: value in the register x 2.5ms The maximum interval between two receiving operations: value in the register x 2.5ms The number of times the sending operation is performed. The current interval between two sending operations: value in the register x 2.5ms The minimum interval between two sending operations: value in the register x 2.5ms The maximum interval between two sending operations: value in the register x 2.5ms Area used for measurement of receiving interval. Area used for measurement of sending interval. N/A N/A N/A N/A

MEWNET-W0 PC(PLC) link 0 status

N/A

MEWNET-W0 PC(PLC) link 1 status

N/A

MEWNET-W0 PC(PLC) link 0 status

N/A

5-141
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90158 DT90159 DT90160 DT90161 DT90162 to DT90169 DT90170 DT90171 DT90172 DT90173 DT90174 DT90175 DT90176 DT90177 DT90178 DT90179 DT90180 to DT90189 DT90190 DT90191 DT90192 DT90193 DT90194 to DT90218

Name MEWNET-W0 PC(PLC) link 1 status MEWNET-W0 PC(PLC) link 0 unit No. MEWNET-W0 PC(PLC) link 0 error flag Not used

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Area used for measurement of receiving interval. A N/A Area used for measurement of sending interval. Stores the unit No. of PC(PLC) link 0. Stores the error contents of PC(PLC) link 0. A A N/A N/A

Duplicated destination for PC(PLC) inter-link address Counts how many times a token is lost. Counts how many times two or more tokens are detected. Counts how many times a signal is lost. No. of times underfined commands have been received. No. of times sum check errors have occurred during reception. No. of times format errors have occurred in received data. No. of times transmission errors have occurred. No. of times procedural errors have occurred. No. of times overlapping parent units have occurred. -

N/A

N/A

MEWNET-W0 PC(PLC) link 0 status

N/A

Not used Not used Not used Not used Not used Not used

N/A N/A N/A N/A N/A N/A

N/A N/A N/A N/A N/A N/A

5-142
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90219 DT90220 DT90221 DT90222 DT90223 DT90224 DT90225 DT90226 DT90227 DT90228 DT90229 DT90230 DT90231 DT90232 DT90233 DT90234 DT90235 DT90236 DT90237 DT90238 DT90239 PC(PLC) link Unit (station) No. 1 or 9

Name Unit No. (Station No.) selection for DT90220 to DT90251


System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41 System register 42 and 43 System register 44 and 45 System register 46 and 47

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing 0: Unit No. (Station No.) 1 to 8, 1: Unit No. (Station No.) 9 to 16 A N/A

The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. <Example> When DT90219 is 0

PC(PLC) link Unit (station) No. 2 or 10

PC(PLC) link Unit (station) No. 3 or 11

PC(PLC) link Unit (station) No. 4 or 12

PC(PLC) link Unit (station) No. 5 or 13

When the system register 46 in the home unit is in the standard setting, the values in the home unit are copied in the system registers 46 and 47. When the system register 46 in the home unit is in the reverse setting, the registers 40 to 45 and 47 corresponding to the home unit mentioned in the left column will be changed to 50 to 55 and 57, and the system register 46 will be set as it is. Also, the system registers 40 to 45 corresponding to other units will be changed to the values which the received values are corrected, and the registers 46 and 57 in the home unit are set for the registers 46 and 47.

N/A

5-143
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90240

Name
System register 40 and 41

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. <Example> when DT90219 is 0.

DT90241

DT90242

PC(PLC) link Unit (station) No. 6 or 14

System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41

DT90243

DT90244 PC(PLC) link Unit (station) No. 7 or 15

DT90245

System register 42 and 43 System register 44 and 45 System register 46 and 47 System register 40 and 41

DT90246

DT90247

DT90248 PC(PLC) link Unit (station) No. 8 or 16

DT90249

System register 42 and 43 System register 44 and 45 System register 46 and 47

DT90250

DT90251 DT90252 DT90253 DT90254 DT90255 DT90256 Not used Not used Not used Not used Not used

When the system register 46 in the home unit is in the standard setting, the values in the home unit are copied in the system registers 46 and 47. When the system register 46 in the home unit is in the reverse setting, the registers 40 to 45 and 47 corresponding to the home unit mentioned in the left column will be changed to 50 to 55 and 57, and the system register 46 will be set as it is. Also, the system registers 40 to 45 corresponding to other units will be changed to the values which the received values are corrected, and the registers 46 and 57 in the home unit are set for the registers 46 and 47.

N/A

N/A

N/A

N/A

N/A

5-144
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90300 DT90301 DT90302 DT90303 DT90304 DT90305 DT90306 DT90307 DT90308 DT90309 DT90310 DT90311 DT90312 DT90313 DT90314 DT90315 DT90316 DT90317 DT90318 DT90319 Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area

Name Lower words Higher words HSC-CH0 Lower words Higher words Lower words Higher words HSC-CH1 Lower words Higher words Lower words Higher words HSC-CH2 Lower words Higher words Lower words Higher words HSC-CH3 Lower words Higher words Lower words Higher words HSC-CH4 Lower words Higher words

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X0) or A A Note) (X0, X1) of the main unit. A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X1) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X2) or (X2, X3) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X3) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X4) or (X4, X5) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. A A A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note)

Note) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F166 (HC1S) and F167 (HC1R) instructions only.

5-145
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90320 DT90321 DT90322 DT90323 DT90324 DT90325 DT90326 DT90327 DT90328 DT90329 DT90330 DT90331 DT90332 DT90333 DT90334 DT90335 Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area

Name Lower words Higher words HSC-CH5 Lower words Higher words Lower words Higher words HSC-CH6 Lower words Higher words Lower words Higher words HSC-CH7 Lower words Higher words Lower words Higher words Lower words Higher words HSC-CH8
Note2)

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X5) of A A Note1) the main unit. A A Note1) The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X6) or (X6, X7) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X7) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X0) or (X0, X1) of the main unit. A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. A A A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

Note1) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F166 (HC1S) and F167 (HC1R) instructions only. Note2) Available for the FP-X Ry type only.

5-146
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Address DT90336 DT90337 DT90338 DT90339 DT90340 DT90341 DT90342 DT90343 DT90344 DT90345 DT90346 DT90347 Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area

Name Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words HSC-CHB
Note2)

HSC-CH9
Note2)

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X1) of A A Note1) the pulse I/O cassette. A A Note1) The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X3) or (X3, X4) of the pulse I/O cassette. A A A A A A A A The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. A A A
Note1)

A
Note1)

A
Note1)

A
Note1)

HSC-CHA
Note2)

The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed. Counting area for input (X4) of the pulse I/O cassette.

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

A
Note1)

Note1) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F166 (HC1S) and F167 (HC1R) instructions only. Note2) Available for the FP-X Tr type only.

5-147
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Tr type Address DT90348 DT90349 DT90350 DT90351 DT90352 DT90353 DT90354 DT90355 DT90356 DT90357 DT90358 DT90359 DT90360 DT90361 DT90362

FP-X (A: Available, N/A: Not available) Name Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words Lower words PLS-CH3 PLS-CH2 The target value is set when instructions F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) are executed. Counting area for the pulse I/O CH3 (Y6, Y7). PLS-CH1 The target value is set when instructions F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) are executed. Counting area for the pulse I/O CH2 (Y4, Y5). PLS-CH0 The target value is set when instructions F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) are executed. Counting area for the pulse I/O CH1 (Y2, Y3). Description Counting area for the pulse I/O CH0 (Y0, Y1). Reading A A A A A A A A A A A A A A Writing A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note) A Note)

The target value is set when A A Note) instructions F171 (SPDH), F172 (PLSH), F174 (SP0H) A A Note) Higher words DT90363 and F175 (SPSH) are executed. Note) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) instructions only.

5-148
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Tr type Address Name

DT90370 HSC-CH0 DT90371 HSC-CH1 DT90372 HSC-CH2 DT90373 HSC-CH3 DT90374 HSC-CH4 DT90375 HSC-CH5 DT90376 Control flag monitor HSC-CH6 DT90377 area HSC-CH7 DT90378 DT90379 DT90380 PLS-CH0 A N/A DT90381 PLS-CH1 A N/A DT90382 PLS-CH2 A N/A A N/A DT90383 PLS-CH3 Note) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) instructions only.

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing A N/A When HSC control is executed by F0 (MV)S, DT90052 A N/A instruction, the setting value for A N/A the target CH is stored in each A N/A CH. A N/A A N/A A N/A A N/A

5-149
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP-X Ry type Address DT90348 DT90349 DT90350 DT90351 DT90352 DT90353 DT90354 DT90355 Elapsed value area Target value area Elapsed value area Target value area Name Lower words Higher words Lower words Higher words Lower words Higher words Lower words Higher words PLS-CH1 PLS-CH0

FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for output A A Note) (Y100, Y101) of the pulse I/O cassette. A A Note) The target value is set when instructions F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) are executed. Counting area for output (Y200, Y201) of the pulse I/O cassette. The target value is set when instructions F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) are executed. When HSC control is executed by F0 (MV)S, DT90052 instruction, the setting value for the target CH is stored in each CH. A A A A A A A Note) A Note) A Note) A Note) A Note) A Note)

DT90356 Not used N/A N/A DT90357 Not used N/A N/A DT90358 Not used N/A N/A DT90359 Not used N/A N/A DT90360 HSC-CH0 A N/A DT90361 HSC-CH1 A N/A DT90362 HSC-CH2 A N/A DT90363 HSC-CH3 A N/A DT90364 HSC-CH4 A N/A DT90365 HSC-CH5 A N/A DT90366 Control flag monitor HSC-CH6 A N/A DT90367 area HSC-CH7 A N/A DT90368 HSC-CH8 A N/A DT90369 HSC-CH9 A N/A DT90370 HSC-CHA A N/A DT90371 HSC-CHB A N/A DT90372 PLS-CH0 A N/A A N/A DT90373 PLS-CH1 Note) Writing in the elapsed value area is available by F1 (DMV) instruction only. Writing in the target value area is available by F171 (SPDH), F172 (PLSH), F174 (SP0H) and F175 (SPSH) instructions only.

5-150
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.16 Table of System Registers for FP2/FP2SH/FP10SH


Allocation of user memory (system registers 0, 1 and 2) Available PLC: FP2 The configuration of user memory of FP2 is as follows:

Be sure to set the A (using system ergister 0), B (using system register 1), and C (using system register 2) as even numbers. The area remaining in A after 512 words are subtracted is the sequence program area that can actually be used. File register area D is the area that remains after A, B, and C have been subracted from the user memory capacity. The configuration area is reserved for future expansion. FP2 (16K) Users memory capacity : 16K words Setting range of A : 2K to 16K words (default value: 12k) Setting range of B : 0 to 14K words (default value: 0) Setting range of C :0 to 14K words (default value: 0) Allocate so that A+B+C16 Setting example: The values of D when B = C = 0. A 2 4 6 8 10 12 14 16 Area for sequence program (1024 x A-512) 1,535 steps 3,583 steps 5,631 steps 7,679 steps 9,727 steps 11,775 steps (default value) 13,823 steps 15,871 steps Area for file registers (D) 14,333 words 12,285 words 10,237 words 8,189 words 6,141 words 4,093 words (default value) 2,045 words 0 word

5-151
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2 (32K) Users memory capacity Setting range of A Setting range of B Setting range of C

: 32K words : 2K to 32K words (default value: 12k) : 0 to 30K words (default value: 0) :0 to 30K words (default value: 0)

Allocate so that A + B + C 32. Setting example: The values of D when B = C = 0. A 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 Area for sequence program (1024 x A-512) 1,535 steps 3,583 steps 5,631 steps 7,679 steps 9,727 steps 11,775 steps (default value) 13,823 steps 15,871 steps 17,919 steps 19,967 steps 22,015 steps 24,063 steps 26,111 steps 28,159 steps 30,207 steps 32,255 steps Area for file registers (D) 30,717 words 28,669 words 26,621 words 24,573 words 22,525 words 20,477 words (default value) 18,429 words 16,381 words 14,333 words 12,285 words 10,237 words 8,189 words 6,141 words 4,093 words 2,045 words 0 word

Setting example for each area When not using the machine language program area Refer to the tables for the different types given above. When using the machine language program area A 2 4 6 8 10 12 14 16 Area for machine language program 4,096 words 8,192 words 12,288 words 16,384 words 20,480 words 24,576 words 28,672 words 32,768 words B 18 20 22 24 26 28 30 Area for machine language program 36,864 words 40,960 words 45,056 words 49,152 words 53,248 words 57,344 words 61,440 words

For example, for the FP2 (16K-step type), when the area for the sequence program (A) is set to 10K words and the area for configuration (C) is set to 0K words, the area for the machine language program can be set up to 6K words.

5-152
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Setting the number of timers and counter (system register 5) Timers and counters share the same area. If the method of dividing the area is changed, the number of timers and counters will also change. Type FP2 FP2SH/FP10SH Total point numbers 1,024 points 3,072 points Default value of system register 5 1000 3000 Timer 1000 points (No. 0 to 999) 3000 points (No. 0 to 2999) Counter 24 points (No. 1000 to 1023) 72 points (No. 3000 to 3071)

For FP2/FP2SH, set the system registers 5 and 6 to the same value. This sets the timer to a non-hold type and counter to a hold type. By setting system register 5 to 0, the whole area becomes the counter. Also, by setting it to the value 1 higher than the last number, the whole area becomes the timer. Hold type area starting address (system registers 6 to 13) Set each relay and register to a hold type or non-hold type.

For normal situations, set the system registers 5 and 6 to the same value. This sets the timer to a nonhold type and counter to a hold type. By setting this value to the first number, the whole area becomes hold type. Also, by setting it to the valeu 1 higher than the last number, the whold area becomes non-hold type. The relays and registers for links not specified in the send area of system registers 40 to 55 are non-hold type regardless of what is set here.

5-153
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

For the FP2SH/FP10SH, the index registers can be set to hold type or non-hold type. The register numbers and settings are related as shown below. Bank number Set value for I0 to ID Bank number Set value for I0 to ID Bank 0 0 to 13 Bank 8 112 to 125 Bank 1 14 to 27 Bank 9 126 to 139 Bank 2 28 to 41 Bank A 140 to 153 Bank 3 42 to 45 Bank B 154 to 167 Bank 4 56 to 69 Bank C 168 to 181 Bank 5 70 to 83 Bank D 182 to 195 Bank 6 84 to 97 Bank E 196 to 209 Bank 7 98 to 111 Bank F 210 to 223 Default value of hold type area setting Type FP2 Area Timer All non-hold type Counter All hold type Non-hold type: 200 words (WR0 to WR199) Internal relay Hold type: 53 words (WR200 to WR252) Data register All hold type File register All hold type Link relay for MEWNET-W All hold type Link register for MEWNET-W All hold type Index register Type Area Timer Counter Internal relay Data register File register Link relay for MEWNET-W/P Link register for MEWNET-W/P Link relay for MEWNET-H Link register for MEWNET-H Index register for FP10SH

FP2SH

Non-hold type: 500 words (WR0 to WR499) Hold type: 387 words (WR500 to WR886)

All hold type FP10SH

All non-hold type All hold type Non-hold type: 500 words (WR0 to WR499) Hold type: 387 words (WR500 to WR886) All hold type All hold type All hold type All hold type All hold type All hold type All hold type

5-154
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

MEWNET-W PC link setting For PC link (W) 0: System register 40 to 45 For PC link (W) 1: System register 50 to 55 Regarding the link relays and link data registers, specify the range for communication and divide it up for sending and receiving.

The default settings have the range for communication (system register 40, 41, 50 and 51) set to 0 so that PC link communication is not possible. If the range for sending (system register 43, 45, 53 and 55) is set to 0, the range for communication will all be for receiving. The link relay and link data register ranges not used for communication, can each be used as internal relays and data registers.

5-155
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of system registers for FP2/FP2SH/FP10SH AddDefault Item Name ress value Sequence program area 12K 0 capacity setting words Available PLC: FP2 AllocaMachine language tion of program area capacity 1 0 word user setting memory Available PLC: FP2 Configuration capacity 2 setting 0 word Available PLC: FP2

Descriptions FP2 (16K): 2 to 16K words FP2 (32K): 2 to 32K words FP2 (16K): 0 to 14K words FP2 (32K): 0 to 30K words FP2 (16K): 0 to 14K words FP2 (32K): 0 to 30K words Enabled: When a battery error occurs, a self-diagnostic error is issued and the ERROR LED lights. (BATT. LED lights.) Disabled: When a battery error occurs, a self-diagnostic error is not issued and the ERROR LED does not light. (BATT. LED does not lights.) Cleared: When the initialize/ test switch is set to INITIALIZE position while in the PROG. mode, you can specify the type of memory to be cleared. Not cleared: When the initialize/test switch is set to INITIALIZE position while in the PROG. mode, you can specify the tyep of memory to be not cleared

Battery error alarm

Enabled

Action on error

Internal relay (R) Link relay (L) Memory Timers/ area Counters (T, contents C, SV, EV) setting at Data register INITIALIZE (DT) position Link data register (LD) Available File register PLC: (FL) FP2SH, Index FP10SH register (I) Error alarm relay (E) Differential type instructions setting between MC and MCE instructions Available PLC: FP2SH, FP10SH TM instruction operation setting Available PLC: FP2SH, FP10SH

Cleared Cleared Cleared Cleared Cleared Cleared Cleared Cleared

Conventional

Conventional: Holds preceded result in the MC and MCE instruction set. New: Disregards preceded result in the MC and MCE instruction set.

Conventional

Conventional: Scan synchronous

New: Scan asynchronous


Enabled: Checks for overflow of the index modifier area, and performs normal processing. Disabled: Performs processing without checking for overflow of the index modifier area.

Index modifier check setting

Enabled

5-156
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH AddItem ress

Name Counter starting address (setting the number of timers and counters)

Hold type area starting address setting for timer/counter

Hold type area starting address setting for 7 internal relays (in word units) Hold type area starting 8 0 address setting for data registers Hold type area starting address setting for file 9 0 registers (For FP2SH, bank 0) Hold/ Hold type area starting Nonaddress setting for hold 10 0 MEWNET-W/P link relays (for PC link 0) Note) Hold type area starting address setting for 11 64 MEWNET-W/P link relays (for PC link 1) Note) Hold type area starting address setting for 12 MEWNET-W/P link data 0 registers (for PC link 0) Note) Hold type area starting address setting for 13 MEWNET-W/P link data 128 registers (for PC link 1) Note) Hold or non-hold setting 14 Non-hold for step ladder process Hold type area starting 15 0 address setting for file register (for bank 1) Note) Available PLC MEWNET-W: FP10SH, FP2, FP2SH MEWNET-P: FP10SH

Default value FP2SH/ FP10SH: 3000 FP2: 1000 FP2SH/ FP10SH: 3000 FP2: 1000 FP2SH/ FP10SH: 500 FP2: 200

Descriptions FP2SH/ FP10SH: 0 to 3072 FP2: 0 to 1024 FP2SH/ FP10SH: 0 to 3072 FP2: 0 to 1024

Set the system registers 5 and 6 to the same value.

FP2SH/FP10SH: 0 to 887 FP2: 0 to 253 FP2SH/FP10SH: 0 to 10240 FP2: 0 to 6000 FP2SH/FP10SH: 0 to 32765 FP2 (16K): 0 to 14333 FP2 (32K): 0 to 30717

0 to 64

64 to 128

0 to 128

128 to 256

Hold/non-hold 0 to 32765

5-157
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH AddItem ress 16

Name Hold type area starting address setting for MEWNET-H link relays Available PLC: FP10SH Hold type area starting address setting for MEWNET-H link data registers Available PLC: FP10SH Hold type area starting address setting for index register Available PLC: FP2SH/ FP10SH Hold type area starting address setting for file register (for bank 2) Disable or enable setting for duplicated output Operation settings when MEWNET-TR communication error occurs Available PLC: FP10SH Operation setting when I/O error occurs Available PLC: FP2SH/ FP2 Operation settings when an intelligent unit error occurs Operation settings when an I/O verification error occurs Operation settings when a system watching dog timer error occurs Available PLC: FP2SH/ FP10SH Operation settings when connection time error occurs in the remote slave station Available PLC: FP2SH Operation settings when an operation error occurs Operation settings when communication error occurs in the MEWNET-F system Operation settings when error occurs in the slave station of the MEWNET-F system

Default value 128 128 to 640

Descriptions

17 Hold/ Nonhold 18

256

256 to 8448

0 to 224

19 20

0 Disable

0 to 32765 Disable/enable

Stop

Stop/continuation

21

Stop

Stop/continuation

22

Stop

Stop/continuation

23 Action on error

Stop

Stop/continuation Stop/continuation

24

Stop

Set the time-out time for watching dog timer with system register 30.

25

Stop

Stop/continuation

26

Stop

Stop/continuation

27

Stop

Stop/continuation

28

Stop

Stop/continuation

5-158
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH AddItem ress 29

Name Operation time setting for communication processing Time-out time setting of system watching dog timer Multi-frame communication time settings in the computer link and communication time setting for data sending buffer Time-out time setting for the F145 (SEND)/P145 (PSEND), F146 (RECV)/P146 (PRECV), F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instructions Effective time setting for monitoring

Default value 240 s

Descriptions 0 to 52428 s If the response of the connected programmable display is show, please make the value bigger. 0.4 to 640 ms

30

100 ms

31

6500 ms

10 to 81917.5 ms

Time setting for FP2SH/ FP10SH

32

10000 ms

10 to 81917.5 ms

33

163837.5 ms

2500 to 163837.5 ms 0 to 640 ms: Scans once each specified time interval. Set 0: Normal scan Setting time can be obtained using the formula Set time = Set value x 0.1 (ms) 10.0 to 8190.0 ms

34

Constant scan time setting

0 ms: Normal scan

31

Time setting for FP2

32

33

Multi-frame communication time settings in the computer link Time-out time setting for the F145 (SEND)/P145 (PSEND), F146 (RECV)/P146 (PRECV), F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instructions Program block-editing time in the RUN mode Constant scan time setting

6500 ms

2000 ms

10.0 to 8190.0 ms

10000 s 0: Normal scan

800.0 to 52428.0 s 0 to 640 ms: Scans once each specified time interval. Set 0: Normal scan

34

5-159
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH AddItem ress

Name Operation settings when connection time error occurs in the remote slave station Available PLC: FP2SH

Default value

Descriptions

25

Stop

Stop/continuation

Remote I/O control

35

Operation mode setting when the MEWNET-F system is used

Enabled (wait for connection)

CPU starts operation after all the salve stations are recognized. Disabled: CPU starts operation without waiting for slave station connections. Only effective when registering remote I/O allocation. Scan asynchronous mode/ Scan synchronous mode

Enabled:

36

40

41

42

43 PC link 0 setting 44

45

I/O data updating mode settings for MEWNET-F system Size of link relays used for communication Size of link data registers used for PC link 0 settings for communication MEWNETW/-P link Send area system starting Available address of PLC: link relay MEWNETSize of link W: relays used FP10SH, for send FP2, FP2SH area MEWNETSend area P: starting FP10SH address of link data register Size of link data registers used for send area PC link 0 and 1 allocation setting for MEWNET-W/-P link system Available PLC: MEWNET-W: FP10SH, FP2, FP2SH MEWNET-P: FP10SH

Scan synchronous

0 to 64 words

0 to 128 words

0 to 63

0 to 64 words

0 to 127

0 to 127 words

46

Normal allocation

Normal allocation: (PC link 0 for the link unit with a smaller slot number and PC link 1 for one with a larger slot number) Reverse allocation: (PC link 1 for the link unit with a smaller slot number and PC link 0 for one with a larger slot number)

5-160
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH AddItem ress MEWNET -H setting

Name Processing capacity setting for PC link of MEWNET-H link system Available PLC: FP10SH Size of link relays used for communication Size of link data registers PC link 1 used for settings for commuMEWNETnication W/-P link Send area system starting Available address of PLC: link relay MEWNETSize of link W: relays used FP10SH, for send FP2, area FP2SH Send area MEWNETstarting P: address of FP10SH link data register Size of link data registers used for send area Unit number setting for tool port Available PLC: FP2/ FP2SH

Default value 4 (1024 bytes per scan)

Descriptions 0: All data in a scan 1 to 65535: Setting processing capacity per scan can be obtained using the formula Capacity = Set value x 256 bytes 0 to 64 words

49

50

51

0 to 128 words

52 PC link 1 setting 53

64

64 to 127

0 to 64 words

54

128

128 to 255

55

0 to 127 words

410

1 Communication format (character bit): 8 bits, Modem communication: Disabled

1 to 99 (unit No. 1 to 99)

Tool port setting 411

Communication format setting for tool port Available PLC: FP2/ FP2SH

Character bits: 7 bits/8bits Modem communication: Enabled/Disabled When connecting a modem, set the unit number to 1 with system register 410.

5-161
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP10SH AddItem ress

Name

Default value

Descriptions In the FP10SH, when the dip switch SW1 on the CPU is off, the baud rate setting is effective. In the FP2/FP2SH, when the dip switch SW1 on the rear of the CPU is off, the baud rate setting is effective. 19200 bps 19200 bps 1200 bps 38400 bps 2400 bps 57600 bps 4800 bps 115200 bps 9600 bps UNUSED: COM port is not used. COMPUTER LINK: computer link mode (when connecting C-NET) GENERAL: serial data communication mode

Tool port setting

414

Baud rate setting for the tool port

19200 bps

412

Communication method setting for COM port

413 COM port setting

Communication format setting (Common setting for both computer link and serial data communication) When used for computer link, the start and end code settings of format for MEWTOCOL-COM will not be effective. Available PLC: FP2/ FP2SH Baud rate setting for the COM port Available PLC: FP2/ FP2SH Unit number setting for COM port Available PLC: FP2/ FP2SH Modem compatibility setting for COM port Available PLC: FP2/ FP2SH Starting address setting for received buffer of serial data communication mode (data register number) Capacity setting for received buffer of serial data communication mode (word number)

FP2: Not used FP2SH/ FP10SH: Computer link Character bit: 8 bits, Parity chk: With, odd Stop bit: 1 bit, End code: CR, Start code: NO STX

Character bit: 7 bits/8 bits Paritch chk: non/with odd/with even Stop bit: 1 bit/2 bits End code: CR/CR+LF/NON/ETX Start code: NO STX/STX

414

19200 bps

19200 bps 19200 bps 1200 bps 38400 bps 2400 bps 57600 bps 4800 bps 115200 bps 9600 bps 1 to 99 (unit No. 1 to 99) Modem enabled/Modem disabled When connecting a modem, set the unit number to 1 with system register 415. FP2SH/FP10SH: 0 to 10240 FP2: 0 to 5999

415

416

Modem disabled

General communication setting

417

418

1024

0 to 1024

For details about its usage, refer to the F144 (TRNS)/ P144 (PTRNS) instructions.

5-162
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Operation of DF instruction between MC and MCE instructions When a leading edge detection instruction (DF instruction) is used with the MC and MCE instructions, the derivative output may change as follows depending on the trigger of MC instruction and input timing of DF instruction. Take care regarding this point.

Example 1: When system register 4 sets 0 (conventional) Time chart 1

Time chart 2

5-163
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Example 2: When system register 4 sets 1 (new) Time chart 1

Time chart 2

5-164
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.17 Table of Special Internal Relays for FP1/FP-M/FP2/FP2SH/FP10SH/FP3


FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Self-diagnostic error flag R9000 (Available PLC: All types) R9001 Not used MEWNET-TR master error flag (Available PLC: FP3/ FP10SH) I/O error flag (Available PLC: FP2/ FP2SH) Description Turns on when a self-diagnostic error occurs. The self-diagnostic error code is stored in: - FP1/FP-M/FP3: DT9000 - FP2/FP2SH/FP10SH: DT90000

Turns on when a communication error occurs in the MEWNET-TR master unit or MEWNET-TR network. The slot, where the erroneous MEWNET-TR master unit is installed, can be checked using: - FP3: DT9002 and DT9003 - FP10SH: DT90002, DT90003 Turns on when the error occurs in the I/O unit. The slot number of the unit where the error was occurred is stored in DT90002, DT90003. Turns on when an error occurs in an intelligent unit. The slot number, where the erroneous intelligent unit is installed is stored in: - FP3: DT9006 and DT9007 - FP2/FP2SH/FP10SH: DT90006, DT90007 Turns on when an I/O verification error occurs. The slot number of the I/O unit where the verification error was occurred is stored in: - FP3: DT9010 and DT9011 -FP2/FP2SH/FP10SH: DT90010, DT90011

R9002

R9003

Intelligent unit error flag

R9004

I/O verification error flag Backup battery error flag (non-hold) (Available PLC: FP-M C20, C32/FP1 C24, C40, C56, C72/FP2/ FP2SH/FP3/FP10SH) Backup battery error flag (hold) (Available PLC: FP-M C20, C32/FP1 C24, C40, C56, C72/FP2/ FP2SH/FP3/FP10SH) Operation error flag (hold) Operation error flag (non-hold) (Available PLC: FP1/FP-M/FP2/FP2SH/ FP10SH)

R9005

Turns on for an instant when a backup battery error occurs.

R9006

Turns on and keeps the on state when a backup battery error occurs. To reset R9006, - turn the power to off and then turn it on, - initialize, after removing the cause of error. Turns on and keeps the on state when an operation error occurs. The address where the error occurred is stored in: - FP1/FP-M/FP3: DT9017 FP2/FP2SH/FP10SH: DT90017 (Indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in: - FP1/FP-M/FP3: DT9018 -FP2/FP2SH/FP10SH: DT90018 The contents change each time a new error occurs.

R9007

R9008

5-165
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name R9009 Carry flag

R900A

> Flag

R900B

= Flag

R900C

< Flag

R900D

Auxiliary timer contact (Available PLC: FP-M C20, C32/FP1 C56, C72/FP2/FP2SH/FP3/ FP10SH) Tool port error flag (Available PLC: FP1/ FP-M/FP2SH/FP10SH) Constant scan error flag Always on relay Always off relay Scan pulse relay Initial on pulse relay Initial off pulse relay Step ladder initial on pulse relay Not used 0.01 s clock pulse relay 0.02 s clock pulse relay 0.1 s clock pulse relay 0.2 s clock pulse relay 1 s clock pulse relay

Description Turns on for an instant, - when an overflow or underflow occurs. - when 1 is set by one of the shift instructions. Turns on for an instant when the compared results become larger in the F60 (CMP)/P60 (PCMP), F61(DCMP)P61(PDCMP),F62 (WIN)/P62 (PWIN) or F63 (DWIN)/P63 (PDWIN) comparison instructions. Turns on for an instant, - when the compared results are equal in the comparison instructions. - when the calculated results become 0 in the arithmetic instructions. Turns on for an instant when the compared results become smaller in the F60 (CMP)/P60 (PCMP), F61(DCMP)P61(PDCMP), F62 (WIN)/P62 ,(PWIN) or F63 (DWIN)/P63 (PDWIN) comparison instructions. Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137(STMR)/F183(DSTM) auxiliary timer instruction. Available PLC for F183 (DSTM) instruction: FP2/FP2SH/ FP10SH The R900D turns off when the trigger for auxiliary timer instruction turns off. Turns on when communication error at tool port is occurred. Turns on when the scan time exceeds the time specified in system register 34 during constant scan execution. Always on. Always off. Turns on and off alternately at each scan. Turns on only at the first scan in the operation. Turns off from the second scan and maintains the off state. Turns off only at the first scan in the operation. Turns on from the second scan andmaintains the on state. Turns on for an instant only in the first scan of the process the moment step ladder process is opened.

R900E R900F R9010 R9011 R9012 R9013 R9014 R9015 R9016, R9017 R9018 R9019 R901A R901B R901C

Repeats on/off operations in 0.01 s cycles. Repeats on/off operations in 0.02 s cycles. Repeats on/off operations in 0.1 s cycles. Repeats on/off operations in 0.2 s cycles. Repeats on/off operations in 1 s cycles.

5-166
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name R901D R901E R901F R9020 2 s clock pulse relay 1 min clock pulse relay Not used RUN mode flag Test RUN mode flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) Break flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) Break enable flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) Output update enable flag in the test RUN mode (Available PLC: FP2/ FP2SH/FP3/FP10SH) Single instruction flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) Message flag (Available PLC: FP-M C20, C32/FP1 C24, C40, C56, C72/FP2/ FP2SH/FP3/FP10SH) Remote mode flag Break clear flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) Forcing flag External interrupt enable flag (Available PLC: FPM/FP1 C24, C40, C56, C72/FP2/FP2SH/FP3/ FP10SH) Interrupt flag (Available PLC: FP2) Interrupt error flag (Available PLC: FP-M/FP1 C24, C40, C56, C72/FP2/FP2SH/ FP3/FP10SH) Sampling point flag

Description Repeats on/off operations in 2 s cycles. Repeats on/off operations in 1 min cycles. Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Turns on while the initialize/test switch of the CPU is set to TEST and mode selector is set to RUN. (test run operation start) Turns off during the normal RUN mode. Turns on while the BRK instruction is executing or the step run is executing. Turns on while the BRK instruction is enabled in the test RUN mode.

R9021

R9022

R9023

R9024

Turns on while the output update is enabled in the test RUN mode.

R9025

Turns on while the single instruction execution is selected in the test RUN mode.

R9026

Turns on while the F149 (MSG)/P149 (PMSG) instruction is executed. Turns on while the mode selector is set to REMOTE. Turns on when the break operation is cleared. Turns on during forced on/off operation for I/O relay and timer/counter contacts.

R9027 R9028 R9029

R902A

Turns on while the external interrupt trigger is enabled by the ICTL instruction.

Turns on while the periodical interrupt is executed by the ICTL instruction.

R902B

Turns on when an interrupt error occurs.

R902C

Turns off during instructed sampling. Turns on while sampling is triggered by the periodical interrupt. 5-167

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Sampling trace end flag R902D (Available PLC: FP2/ FP2SH/FP3/FP10SH) Sampling trigger flag R902E (Available PLC: FP2/ FP2SH/FP3/FP10SH) Sampling enable flag R902F (Available PLC: FP2/ FP2SH/FP3/FP10SH) F145 (SEND)/P145 (PSEND) and F146 (RECV)/P146 (PRECV) instruction executing flag

Description Turns on when the sampling trace ends.

Turns on when the sampling trace trigger of the F156 (STRG)/P156 (PSTGR) instruction is turned on. Turns on when the starting point of sampling is specified. Monitors if CPU is in the F145 (SEND)/P145 (PSEND) and F146 (RECV)/P146 (PRECV) instructions executable condition as follows: - off: None of the above mentioned instructions can be executed. - on: One of the above mentioned instructions can be executed. Monitors if an abnormality has been detected during the execution of the F145 (SEND)/P145 (PSEND) and F146 (RECV)/P146 (PRECV) instructions as follows: - off: No abnormality detected. - on: An abnormality detected. (communication error) The error code is stored in: - FP3: DT9039 - FP2/FP10SH: DT90039 Monitors the mode of the COM port as: - on: Serial data communication mode - off: Computer link mode

R9030

R9031

F145 (SEND)/P145 (PSEND) and F146 (RECV)/P146 (PRECV) instruction end flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) COM port mode flag (Available PLC: FP-M C20C, C32C/FP1 C24C, C40C, C56C, C72C/FP2/FP2SH/ FP10SH) F147 (PR) instruction flag (Available PLC: FP-M C20, C32/FP1 C24, C40, C56,C72/ FP2/FP2SH/FP3/ FP10SH) Editing in RUN mode flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instruction execution flag (Available PLC: FP2/ FP2SH/FP3/FP10SH)

R9032

R9033

Turns on while a F147 (PR) instruction is executed. Turns off when a F147 (PR) instruction is not executed.

R9034

Turns on while editing a program in the RUN mode. Monitors if FP3/FP10SH is in the F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instructions executable condition as follows: - off: None of the above mentioned instructions can be executed. - on: One of the above mentioned instructions can be executed.

R9035

5-168
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instruction end flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) I/O link error flag (Available PLC: FP-M C20, C23/FP1) COM port communication error flag (Available PLC: FP-M C20C, C32C/FP1 C24C, C40C, C56C, C72C/FP2/FP2SH/ FP10SH) COM port receive flag (Available PLC: FP-M C20C, C32C/FP1 C24C, C40C, C56C, C72C/FP2/FP2SH/ FP10SH) COM port send flag (Available PLC: FP-M C20C, C32C/FP1 C24C, C40C, C56C, C72C/FP2/FP2SH/ FP10SH) High-speed counter control flag (ch0) (Available PLC: FP-M C20, C32/FP1) Cam control flag (Available PLC: FP-M/ FP1) High-speed counter control flag (ch1) High-speed counter control flag (ch2) High-speed counter control flag (ch3) Not used Not used Error alarm (0 to 2047)

R9036

Description Monitors if an abnormality has been detected during the execution of the F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instructions as follows: - off: No abnormality detected. - on: An abnormality detected. (access error) The error code is stored in: - FP3: DT9036 - FP2/FP2SH/FP10SH: DT90036 Turns on when the erroro occurs using the I/O link function.

R9037

Turns on when the serial data communication error occurs using COM port. Turns off when data is being sent by the F144 (TRNS) instruction.

R9038

Turns on when the end code is received during the serial data communicating.

R9039

Turns on while data is not send during the serial data communicating. Turns off while data is being sent during the serial data communicating.

R903A

Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed. Turns on while the cam control instruction F165 (CAMO) is executed. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed. Turns on while the high-speed counter instructions F166(HC1S) to F170(PWM) are executed.
-

R903B

R903C R903D R903E R903F R9040

Turns on while the error alarm relay (E0 to E2047) acts. Turns off when the all error alarm relay turns off.

5-169
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name MEWNET-W/-P link transmission error flag R9050 [W/P LINK 1] for FP3/ FP10SH [W LINK 1] for FP2/FP2SH MEWNET-W/-P link transmission error flag R9051 [W/P LINK 2] for FP3/ FP10SH [W LINK 2] for FP2/FP2SH MEWNET-W/-P link transmission error flag R9052 [W/P LINK 3] for FP3/ FP10SH [W LINK 3] for FP2/FP2SH MEWNET-W/-P link transmission error flag R9053 [W/P LINK 4] for FP2/ FP10SH [W LINK 4] for FP2SH MEWNET-W/-P link transmission error flag R9054 [W/P LINK 5] for FP2/ FP10SH [W LINK 5] for FP2SH MEWNET-H link transmission error flag R9055 [H LINK 1]: for FP3/ FP10SH MEWNET-H link transmission error flag R9056 [H LINK 2]: for FP3/ FP10SH MEWNET-H link transmission error flag R9057 [H LINK 3]: for FP3/ FP10SH Remote I/O transmis-sion error flag (master 1) R9058 (Available PLC: FP2/ FP2SH/FP3/FP10SH) Remote I/O transmis-sion error flag (master 2) R9059 (Available PLC: FP2/ FP2SH/FP3/FP10SH) Remote I/O transmission error flag (master 3) R905A (Available PLC: FP2/ FP2SH/FP3/FP10SH) Remote I/O transmis-sion error flag (master 4) R905B (Available PLC: FP2/ FP2SH/FP3/FP10SH) R905C to Not used R905F 5-170

Description When using MEWNET-W link unit or MEWNET-P link unit: - turns on when transmission error occurs at link 1. - turns on when there is an error in the link area settings. When using MEWNET-W link unit or MEWNET-P link unit: - turns on when transmission error occurs at link 2. - turns on when there is an error in the link area settings. When using MEWNET-W link unit or MEWNET-P link unit: - turns on when transmission error occurs at link 3. - turns on when there is an error in the link area settings. When using MEWNET-W link unit or MEWNET-P link unit: - turns on when transmission error occurs at link 4. - turns on when there is an error in the link area settings. When using MEWNET-W link unit or MEWNET-P link unit: - turns on when transmission error occurs at link 5. - turns on when there is an error in the link area settings. When using MEWNET -H link unit: - turns on when transmission error occurs at H link 1. - turns on when there is an error in the link area settings. When using MEWNET -H link unit: - turns on when transmission error occurs at H link 2. - turns on when there is an error in the link area settings. When using MEWNET-H link unit: - turns on when transmission error occurs at H link 3. - turns on when there is an error in the link area settings. When using MEWNET -F (remote I/O) system: - turns on when transmission error occurs on master 1. - turns on when there is an error in the settings. When using MEWNET -F (remote I/O) system: - turns on when transmission error occurs on master 2. - turns on when there is an error in the settings. When using MEWNET -F (remote I/O) system: - turns on when transmission error occurs on master 3. - turns on when there is an error in the settings. When using MEWNET -F (remote I/O) system: - turns on when transmission error occurs on master 4. - turns on when there is an error in the settings. -

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name

Description Turns on when Unit No. 1 is communicating properly in the PC Unit R9060 link mode. Turns off when operation is stopped, when an error No.1 occurs, or when not in the PC link mode. Turns on when Unit No. 2 is communicating properly in the PC Unit R9061 link mode. Turns off when operation is stopped, when an error No.2 occurs, or when not in the PC link mode. Turns on when Unit No. 3 is communicating properly in the PC Unit R9062 link mode. Turns off when operation is stopped, when an error No.3 occurs, or when not in the PC link mode. Turns on when Unit No. 4 is communicating properly in the PC Unit R9063 link mode. Turns off when operation is stopped, when an error No.4 occurs, or when not in the PC link mode. Turns on when Unit No. 5 is communicating properly in the PC Unit R9064 link mode. Turns off when operation is stopped, when an error No.5 occurs, or when not in the PC link mode. Turns on when Unit No. 6 is communicating properly in the PC Unit R9065 link mode. Turns off when operation is stopped, when an error No.6 occurs, or when not in the PC link mode. Turns on when Unit No. 7 is communicating properly in the PC Unit R9066 link mode. Turns off when operation is stopped, when an error No.7 occurs, or when not in the PC link mode. MEWNET-W/ Turns on when Unit No. 8 is communicating properly in the PC Unit -P R9067 link mode. Turns off when operation is stopped, when an error No.8 PC link occurs, or when not in the PC link mode. transmission Turns on when Unit No. 9 is communicating properly in the PC assurance Unit R9068 link mode. Turns off when operation is stopped, when an error relay [for PC No.9 occurs, or when not in the PC link mode. link 0 (W/P)] Turns on when Unit No. 10 is communicating properly in the Unit R9069 PC link mode. Turns off when operation is stopped, when an No.10 error occurs, or when not in the PC link mode. Turns on when Unit No. 11 is communicating properly in the Unit R906A PC link mode. Turns off when operation is stopped, when an No.11 error occurs, or when not in the PC link mode. Turns on when Unit No. 12 is communicating properly in the Unit R906B PC link mode. Turns off when operation is stopped, when an No.12 error occurs, or when not in the PC link mode. Turns on when Unit No. 13 is communicating properly in the Unit R906C PC link mode. Turns off when operation is stopped, when an No.13 error occurs, or when not in the PC link mode. Turns on when Unit No. 14 is communicating properly in the Unit R906D PC link mode. Turns off when operation is stopped, when an No.14 error occurs, or when not in the PC link mode. Turns on when Unit No. 15 is communicating properly in the Unit R906E PC link mode. Turns off when operation is stopped, when an No.15 error occurs, or when not in the PC link mode. Turns on when Unit No. 16 is communicating properly I n the Unit PC link mode. Turns off when operation is stopped, when an R906F No.16 error occurs, or when not in the PC link mode. Note) When the system registers 46=K0, PC link 0 for the link unit with a smaller slot No. and PC link 1 for one with a larger slot No. When the system registers 46=K1, PC link 1 for the link unit with a smaller slot No. and PC link 0 for one with a larger slot No. 5-171
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description Unit Turns on when unit No. 1 is in the RUN mode. R9070 No.1 Turns off when unit No. 1 is in the PROG. mode. Unit Turns on when unit No. 2 is in the RUN mode. R9071 No.2 Turns off when unit No. 2 is in the PROG. mode. Unit Turns on when unit No. 3 is in the RUN mode. R9072 No.3 Turns off when unit No. 3 is in the PROG. mode. Unit Turns on when unit No. 4 is in the RUN mode. R9073 No.4 Turns off when unit No. 4 is in the PROG. mode. Unit Turns on when unit No. 5 is in the RUN mode. R9074 No.5 Turns off when unit No. 5 is in the PROG. mode. Unit Turns on when unit No. 6 is in the RUN mode. R9075 No.6 Turns off when unit No. 6 is in the PROG. mode. Unit Turns on when unit No. 7 is in the RUN mode. R9076 Turns off when unit No. 7 is in the PROG. mode. MEWNET-W/-P No.7 PC link Unit Turns on when unit No. 8 is in the RUN mode. R9077 operation No.8 Turns off when unit No. 8 is in the PROG. mode. mode relay Unit Turns on when unit No. 9 is in the RUN mode. R9078 [for PC link 0 No.9 Turns off when unit No. 9 is in the PROG. mode. (W/P)] Unit Turns on when unit No. 10 is in the RUN mode. R9079 No.10 Turns off when unit No. 10 is in the PROG. mode. Unit Turns on when unit No. 11 is in the RUN mode. R907A No.11 Turns off when unit No. 11 is in the PROG. mode. Unit Turns on when unit No. 12 is in the RUN mode. R907B No.12 Turns off when unit No. 12 is in the PROG. mode. Unit Turns on when unit No. 13 is in the RUN mode. R907C No.13 Turns off when unit No. 13 is in the PROG. mode. Unit Turns on when unit No. 14 is in the RUN mode. R907D No.14 Turns off when unit No. 14 is in the PROG. mode. Unit Turns on when unit No. 15 is in the RUN mode. R907E No.15 Turns off when unit No. 15 is in the PROG. mode. Unit Turns on when unit No. 16 is in the RUN mode. R907F No.16 Turns off when unit No. 16 is in the PROG. mode. Note) When the system registers 46=K0, PC link 0 for the link unit with a smaller slot No. and PC link 1 for one with a larger slot No. When the system registers 46=K1, PC link 1 for the link unit with a smaller slot No. and PC link 0 for one with a larger slot No.

5-172
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name

Description Turns on when unit No. 1 is communicating properly in the PC Unit R9080 link mode. Turns off when operation is stopped, when an error No.1 occurs, or when not in the PC link mode. Turns on when unit No. 2 is communicating properly in the PC Unit R9081 link mode. Turns off when operation is stopped, when an error No.2 occurs, or when not in the PC link mode. Turns on when unit No. 3 is communicating properly in the PC Unit R9082 link mode. Turns off when operation is stopped, when an error No.3 occurs, or when not in the PC link mode. Turns on when unit No. 4 is communicating properly in the PC Unit R9083 link mode. Turns off when operation is stopped, when an error No.4 occurs, or when not in the PC link mode. Turns on when unit No. 5 is communicating properly in the PC Unit R9084 link mode. Turns off when operation is stopped, when an error No.5 occurs, or when not in the PC link mode. Turns on when unit No. 6 is communicating properly in the PC Unit R9085 link mode. Turns off when operation is stopped, when an error No.6 occurs, or when not in the PC link mode. Turns on when unit No. 7 is communicating properly in the PC Unit R9086 link mode. Turns off when operation is stopped, when an error No.7 occurs, or when not in the PC link mode. MEWNET-W/-P Turns on when unit No. 8 is communicating properly in the PC Unit PC link R9087 link mode. Turns off when operation is stopped, when an error No.8 transmission occurs, or when not in the PC link mode. assurance Turns on when unit No. 9 is communicating properly in the PC relay Unit R9088 link mode. Turns off when operation is stopped, when an error [for PC link 1 No.9 occurs, or when not in the PC link mode. (W/P)] Turns on when unit No. 10 is communicating properly in the Unit R9089 PC link mode. Turns off when operation is stopped, when an No.10 error occurs, or when not in the PC link mode. Turns on when unit No. 11 is communicating properly in the Unit R908A PC link mode. Turns off when operation is stopped, when an No.11 error occurs, or when not in the PC link mode. Turns on when unit No. 12 is communicating properly in the Unit R908B PC link mode. Turns off when operation is stopped, when an No.12 error occurs, or when not in the PC link mode. Turns on when unit No. 13 is communicating properly in the Unit R908C PC link mode. Turns off when operation is stopped, when an No.13 error occurs, or when not in the PC link mode. Turns on when unit No. 14 is communicating properly in the Unit R908D PC link mode. Turns off when operation is stopped, when an No.14 error occurs, or when not in the PC link mode. Turns on when unit No. 15 is communicating properly in the Unit R908E PC link mode. Turns off when operation is stopped, when an No.15 error occurs, or when not in the PC link mode. Turns on when unit No. 16 is communicating properly in the Unit PC link mode. Turns off when operation is stopped, when an R908F No.16 error occurs, or when not in the PC link mode. Note) When the system registers 46=K0, PC link 0 for the link unit with a smaller slot No. and PC link 1 for one with a larger slot No. When the system registers 46=K1, PC link 1 for the link unit with a smaller slot No. and PC link 0 for one with a larger slot No. 5-173
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description Unit Turns on when unit No. 1 is in the RUN mode. R9090 No.1 Turns off when unit No. 1 is in the PROG. mode. Unit Turns on when unit No. 2 is in the RUN mode. R9091 No.2 Turns off when unit No. 2 is in the PROG. mode. Unit Turns on when unit No. 3 is in the RUN mode. R9092 No.3 Turns off when unit No. 3 is in the PROG. mode. Unit Turns on when unit No. 4 is in the RUN mode. R9093 No.4 Turns off when unit No. 4 is in the PROG. mode. Unit Turns on when unit No. 5 is in the RUN mode. R9094 No.5 Turns off when unit No. 5 is in the PROG. mode. Unit Turns on when unit No. 6 is in the RUN mode. R9095 No.6 Turns off when unit No. 6 is in the PROG. mode. Unit Turns on when unit No. 7 is in the RUN mode. R9096 No.7 Turns off when unit No. 7 is in the PROG. mode. MEWNET-W/-P PC link Unit Turns on when unit No. 8 is in the RUN mode. R9097 operation mode No.8 Turns off when unit No. 8 is in the PROG. mode. relay Unit Turns on when unit No. 9 is in the RUN mode. R9098 [for PC link 1 No.9 Turns off when unit No. 9 is in the PROG. mode. (W/P)] Unit Turns on when unit No. 10 is in the RUN mode. R9099 No.10 Turns off when unit No. 10 is in the PROG. mode. Unit Turns on when unit No. 11 is in the RUN mode. R909A No.11 Turns off when unit No. 11 is in the PROG. mode. Unit Turns on when unit No. 12 is in the RUN mode. R909B No.12 Turns off when unit No. 12 is in the PROG. mode. Unit Turns on when unit No. 13 is in the RUN mode. R909C No.13 Turns off when unit No. 13 is in the PROG. mode. Unit Turns on when unit No. 14 is in the RUN mode. R909D No.14 Turns off when unit No. 14 is in the PROG. mode. Unit Turns on when unit No. 15 is in the RUN mode. R909E No.15 Turns off when unit No. 15 is in the PROG. mode. Unit Turns on when unit No. 16 is in the RUN mode. R909F No.16 Turns off when unit No. 16 is in the PROG. mode. IC memory card Monitors whether the IC memory card is installed or not: installation flag - on: IC memory card is installed. R9100 (Available PLC: FP2SH/ - off: IC memory card is not installed. FP10SH) Monitors the voltage drop condition for the IC memory card IC memory card backup as: battery flag 1 R9101 - on: Data in the IC memory card cannot be guaranteed. (Available PLC: FP2SH/ (*Note) - off: Data in the IC memory card can be maintained. FP10SH) Monitors the voltage drop condition for the IC memory card IC memory card backup as: battery flag 2 R9102 - on: Battery replacement is required. (Available PLC: FP2SH/ (*Note) - off: Battery replacement is not required. FP10SH) Note) When the system registers 46=K0, PC link 0 for the link unit with a smaller slot No. and PC link 1 for one with a larger slot No. When the system registers 46=K1, PC link 1 for the link unit with a smaller slot No. and PC link 0 for one with a larger slot No. 5-174
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name IC memory card protect switch flag (Available PLC: FP2SH/ FP10SH) IC memory card access switch flag (Available PLC: FP2SH/ FP10SH)

R9103

R9104

Description Monitors the protective condition of the IC memory card as: - on: The protect switch is not in the write-protected (WP) position. - off: The protect switch is in the write-protected (WP) position. Monitors the condition of the IC memory card access enables switch as: - on (access enabled): The access enable switch is in the on position. off (access disabled): The access enable switch is in the off position.

R9105 Through Note used R910F Note) The IC memory card backup battery condition can be judged using special internal relays R9101 and R9102 as follows: R9101 R9102 IC memory card condition OFF OFF Not battery replacement required. ON OFF Replace backup battery. The data in the IC memory card is maintained. ON ON The data in the IC memory card cannot be maintained. Replace backup battery.

5-175
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.1.18 Special Data Registers for FP2/FP2SH/FP3/FP10SH


FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The self-diagnostic error code is stored here when a self-diagnostic error occurs. Self-diagnostic DT9000 DT90000 Monitor the error code using decimal error code display. DT9001 DT90001 Not used Communication The slot number, where an erroneous error of unit is installed, can be monitored here. MEWNET-TR 1 (on) is set in the bit position master unit (slot corresponding to the slot number when one of the errors below id detected. No. 0 to 15) Communication error MEWNET-TR (Available PLC: master unit DT9002 DT90002 FP3/FP10SH) When a communication error occurs at Position of the MEWNET-TR master unit, the bit abnormal I/O corresponding to the slot no. of the unit slot (slot No. 0 will be set on 1. Monitor using binary to 15) display. (Available PLC: (1: erroneous MEWNET-TR master unit, FP2/FP2SH) Communication 0: normal) Position of abnormal I/O slot error of When an error occurs at an I/O unit, the MEWNET-TR master unit (slot bit corresponding to the slot of the unit will be set on 1. Monitor sing binary No. 16 to 31) display. (Available PLC: (1: error, 0: normal) DT9003 DT90003 FP3/FP10SH) Position of abnormal I/O slot (slot No. 16 to 31) (Available PLC: FP2/FP2SH)

Reading

Writing

A N/A

N/A N/A

N/A

5-176
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH When an error condition is detected in an intelligent unit, the bit corresponding Abnormal to the slot of the unit will be set to on. DT9006 DT90006 intelligent unit Monitor using binary display. (slot No. 0 to 15) (1: abnormal intelligent unit, 0: normal intelligent unit) Abnormal intelligent unit (slot No. 16 to 31) When the state of installation of an I/O unit has changed since the power was turned on, the bit corresponding to the slot of the unit will be set to on. Monitor using binary display. (1: error, 0: normal)

Reading

Writing

DT9007

DT90007

DT9010

DT90010

I/O verify error unit (slot No. 0 to 15)

DT9011

DT90011

I/O verify error unit (slot No. 16 to 31) One shift-out hexadecimal digit is stored in bit positions 0 to 3 when F105 (BSR)/P105 (PBSR) or f106 (BSL)/P106 (PBSL) instruction is executed. The divided remainder (16-bit) is stored in DT9015/DT90015 when F32 (%)/P32 (P%) or F52(B%)/P52 (PB%) instruction is executed. The divided remainder (32-bit) is stored in DT9015 and DT9016/DT90015 and DT90016 when F33 (D%)/P33 (PD%) or F53(DB%)/P53 (PDB%) instruction is executed. After commencing operation, the address whre the first operation error occurred is stored. Monitor the address using decimal display. (Reference: DT90257)

N/A

DT9014

DT90014

Auxiliary register for operation

DT9015

DT90015 Auxiliary register for operation

DT9016

DT90016

DT9017

DT90017

Operation error address (hold)

5-177
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The address whre an operation error occurred is stored. Each time an error occurs, the new address overwrites the Operation error DT9018 DT90018 address previous address. At the beginning of scan, the addressis 0. Monitor the (non-hold) address using decimal display. (Reference: DT90258) The data stored here is increased by one very 2.5 ms (H0 to HFFFF) 2.5 ms ring DT9019 DT90019 Difference between the values of the two counter points (absolute value) x 2.5 ms = Elapsed time between the two points. Maximu value of The last address of sequence program program DT9020 area set in system register 0 is stored. (Available PLC: FP3) The program capacity is stored in Display of decimal. program Example: capacity K30: approx. 30 K steps (Available PLC: K60: approx. 60 K steps (with memory FP10SH) expansion) DT90020 The program capacity is stored in Display of decimal. program Example: capacity K16: approx. 16 K steps (K15870) (Available PLC: K32: approx. 32 K steps (with memory FP2) expansion) Maximum value The maximum (last) address of the file of file register DT9021 (*Note) registers available are stored in here. (Available PLC: FP3) Maximum value The maximum (last) address of the file DT90021 of file register (*Note) registers available are stored in here. (Available PLC: FP2/FP10SH) Note) Used by the system.

Reading

Writing

N/A

N/A

N/A

5-178
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The current scan time is stored here. Scan time is Scan time calculated using the display is formula: Scan time DT9022 DT90022 only possible Scan time (ms) = stored (current value) in RUN data (decimal) x 0.1 mode, and Example: shows the K50 indicates 5 ms. operation The minimum scan time cycle time. is stored here. Scan time The is calculated using the maximum Scan time formula: DT9023 DT90023 (minimum and Scan time (ms) = stored minimum value) data (decimal) x 0.1 values are Example: cleared K50 indicates 5 ms. when each The maximum scan time the mode is is stored here. Scan time switched is calculated using the between Scan time formula: RUN mode DT9024 DT90024 (maximum Scan time (ms) = stored and PROG. value) data (decimal) x 0.1 mode. Example: K125 indicates 12.5 ms. The mask conditions of interrupt unit Mask condition initiated interrupts using ICTL instruciton monitoring can be monitored here. Monitor using register for binary display. DT9025 DT90025 interrupt unit (*Note) (*Note) initiated interrupts (INT 0 to 15) 0: interrupt disabled (masked) (*FP2: Not used) 1: interrupt enabled (unmasked) Mask condition monitoring register for interrupt unit initiated interrupts (INT 16 to 23) (*FP2: Not used) Periodical interrupt interval (INT24) The mask conditions of interrupt unit initiated interrupts using ICTL instruciton can be monitored here. Monitor using binary display.

Reading

Writing

N/A

DT9026 (*Note)

DT90026

DT9027 (*Note)

DT90027

0: interrupt disabled (masked) 1: interrupt enabled (unmasked) The value set by ICTL instruction is stored. K0: periodical interrupt is not used. K1 to K3000: 10ms to 30s or 0.5ms to 1.5s 5-179

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The value registered using programming tool software is stored. DT9028 DT90028 Sample trace - K0: sampling triggered by F155 (*Note) (*Note) interval (SMPL)/P155 (PSMPL) instruciton - K1 to K3000 (x 10ms): 10ms to 30s DT9029 DT90029 The address (K constant) of a break in a Break address (*Note) (*Note) test run is stored. DT9030 DT90030 Message 0 (*Note) (*Note) DT9031 DT90031 Message 1 (*Note) (*Note) The contents of the specified message DT9032 DT90032 Message 2 are stored in these special data registers (*Note) (*Note) when F149 (MSG)/P149 (PMSG) DT9033 DT90033 Message 3 instruction is executed. (*Note) (*Note) DT9034 DT90034 Message 4 (*Note) (*Note) DT9035 DT90035 Message 5 (*Note) (*Note) F152 (RMRD)/ The error code is stored here if F152 P152 (PRMRD) (RMRD)/P152 (PRMRD) or F153 and (RMWT)/P153 (PRMWT) instruction was F153 (RMWT)/ executed abnormally. P153 (PRMWT) When the instruction was successfully DT9036 DT90036 instructions end executed, 0 is stored. code If an abnormal unit is installed to the backplane, the slot number of that unit Abnormal unit display will be stored. Monitor using decimal display. Work 1 for The number of data that match the F96 (SRC)/ searched data is stored here when F96 DT9037 DT90037 P96 (PSRC) (SRC)/P96 (PSRC) instruction is instructions executed. Work 2 for The position of the first matching data, F96 (SRC)/ counting from the starting 16-bit area, is DT9038 DT90038 P96 (PSRC) stored here when an F96 (SRC)/P96 instructions (PSRC) instruction is executed. F145 (SEND)/ The error code is stored here if F145 P145 (PSEND) (SEND)/P145 (PSEND) or F146 (RECV)/ and P146 (PRECV) instruction was executed DT9039 DT90039 F146 (RECV)/ abnormally. P146 (PRECV) When the instruction was successfully instructions end executed, 0 is stored. code Note) Used by the system. 5-180

Reading

Writing

N/A

N/A

N/A

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Hour and minute data of the Real-Time Clock(Clock/Calendar) are stored here. This data is read-only data. It cannot be Real-Time Clock overwritten. DT90053 (Clock/Calendar DT9053 ) monitor (*Note) (hour/minute)

Reading

Writing

N/A

DT9054

DT90054 (*Note)

DT9055

DT90055 (*Note)

DT9056

DT90056 (*Note)

Real-Time Clock (Clock/Calendar ) monitor and setting (minute/second) Real-Time Clock (Clock/Calendar ) monitor and setting (day/hour) Real-Time Clock (Clock/Calendar ) monitor and setting (year/month) Real-Time Clock (Clock/Calendar ) monitor and setting (day-ofthe-week)

The year, month, day, hour, minute, second and day-of-the-week data for the calender timer is stored. The built-in Real-Time Clock(Clock/Calendar) will operate correctly through the year 2099 and supports leap years. The Real-Time Clock (Clock/Calendar) can be set (the time set) by writing a value using a programming tool software or a program that uses the F0 (MV) transfer instruction.

DT9057

DT90057 (*Note)

Note) In the FP2, an expansion memory unit is necessary.

5-181
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The Real-Time Clock(Clock/Calendar) is adjusted as follows. When setting the Real-Time Clock (Clock/Calendar) by program By setting the highest bit of DT9058/DT90058 to 1, the time becomes that written to DT9054 to DT9057/DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT9058/DT90058 is cleared to 0. (Cannot be performed with any instruciton other than F0 (MV) instruction.) <Example> Set the time to 12:00:00 on the 5th day when the X0 turns on.

Reading

Writing

DT9058

DT90058 (*Note)

Real-Time Clock (Clock /Calendar) setting and 30 seconds correction

If you changed the values of DT9054 to DT9057/DT90054 to DT90057 with programming tool software, the time will be set when the new values are written. Therefore, it is unnecessary to write to DT9058/DT90058. When the correcting times less than 30 secondsBy setting the lowest bit of DT9058/DT90058 to 1, the value will be moved up or down and become exactly 0 seconds. After the correction is completed, DT9058/DT90058 is cleared to 0. <Example> Correct to 0 seconds with X0 turns on.

At the time of correction, if between 0 and 29 seconds, it will be moved down, and if the etween 30 and 59 seconds, it will be moved up. In the example above, if the time was 5 minutes 29 seconds, it will become 5 minutes 0 second; and, if the time was 5 minutes 35 seconds, it will become 6 minutes 0 second. Note) In the FP2, an expansion memory unit is necessary. 5-182
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The system uses this as a communication status when Serial communication error occurs. DT9059 DT90059 communication error code Step ladder process (0 to 15) Step ladder DT9061 DT90061 process (16 to 31) Step ladder DT9062 DT90062 process (32 to 47) Step ladder DT9063 DT90063 process (48 to 63) Step ladder DT9064 DT90064 process (64 to 79) Step ladder DT9065 DT90065 process (80 to 95) Step ladder proDT9066 DT90066 cess (96 to 111) Step ladder proDT9067 DT90067 cess (112 to 127) Step ladder proDT9068 DT90068 cess (128 to 143) Step ladder proDT9069 DT90069 cess (144 to 159) Step ladder proDT9070 DT90070 cess (160 to 175) Step ladder proDT9071 DT90071 cess (176 to 191) Step ladder proDT9072 DT90072 cess (192 to 207) Step ladder proDT9073 DT90073 cess (208 to 223) Step ladder proDT9074 DT90074 cess (224 to 239) Step ladder proDT9075 DT90075 cess (240 to 255) Step ladder proDT9076 DT90076 cess (256 to 271) Step ladder proDT9077 DT90077 cess (272 to 287) Note) Used by the system. DT9060 DT90060

Read -ing

Writing

N/A

Indicates the startup condition of the step ladder process. When the process starts up, the bit corresponding to the process number turns on 1. Monitor using binary display. (0: not-executing, 1: executing) Example: A A

Since bit position 0 of DT9060/DT90060 is 1, step ladder process 0 is executing. A programming tool software can be used to write data.

5-183
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Step ladder proDT9078 DT90078 cess (288 to 303) Step ladder proDT9079 DT90079 cess (304 to 319) Step ladder proDT9080 DT90080 cess (320 to 335) Step ladder proDT9081 DT90081 cess (336 to 351) Step ladder proDT9082 DT90082 cess (352 to 367) Step ladder proDT9083 DT90083 cess (368 to 383) Step ladder proDT9084 DT90084 Indicates the startup condition of the cess (384 to 399) step ladder process. When the process Step ladder proDT9085 DT90085 starts up, the bit corresponding to the cess (400 to 415) process number turns on 1. Step ladder proDT9086 DT90086 cess (416 to 431) Monitor using binary display. Step ladder proDT9087 DT90087 cess (432 to 447) (0: not-executing, 1: executing) Step ladder proDT9088 DT90088 cess (448 to 463) Example: Step ladder proDT9089 DT90089 cess (464 to 479) Step ladder proDT9090 DT90090 cess (480 to 495) Since bit position 0 of Step ladder proDT9080/DT90080 is 1, step ladder DT9091 DT90091 cess (496 to 511) process 320 is executing. Step ladder proDT9092 DT90092 cess (512 to 527) A programming tool software can be Step ladder proused to write data. DT9093 DT90093 cess (528 to 543) Step ladder proDT9094 DT90094 cess (544 to 559) Step ladder proDT9095 DT90095 cess (560 to 575) Step ladder proDT9096 DT90096 cess (576 to 591) Step ladder proDT9097 DT90097 cess (592 to 607) Step ladder proDT9098 DT90098 cess (608 to 623) Step ladder proDT9099 DT90099 cess (624 to 639)

Read -ing

Writing

5-184
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Step ladder proDT9100 DT90100 cess (640 to 655) Step ladder proDT9101 DT90101 cess (656 to 671) Step ladder proDT9102 DT90102 cess (672 to 687) Step ladder proDT9103 DT90103 cess (688 to 703) Step ladder proDT9104 DT90104 cess (704 to 719) Step ladder proDT9105 DT90105 cess (720 to 735) Step ladder proDT9106 DT90106 cess (736 to 751) Indicates the startup condition of the Step ladder proDT9107 DT90107 step ladder process. When the process cess (752 to 767) starts up, the bit corresponding to the Step ladder proDT9108 DT90108 cess (768 to 783) process number turns on 1. Step ladder proDT9109 DT90109 cess (784 to 799) Monitor using binary display. Step ladder proDT9110 DT90110 cess (800 to 815) (0: not-executing, 1: executing) Step ladder proDT9111 DT90111 cess (816 to 831) Step ladder proExample: DT9112 DT90112 cess (832 to 847) Step ladder proDT9113 DT90113 cess (848 to 863) Step ladder proDT9114 DT90114 Since bit position 0 of cess (864 to 879) DT9100/DT90100 is 1, step ladder Step ladder proDT9115 DT90115 cess (880 to 895) process 640 is executing. Step ladder proDT9116 DT90116 cess (896 to 911) A programming tool software can be Step ladder proDT9117 DT90117 used to write data. cess (912 to 927) Step ladder proDT9118 DT90118 cess (928 to 943) Step ladder proDT9119 DT90119 cess (944 to 959) Step ladder proDT9120 DT90120 cess (960 to 975) Step ladder proDT9121 DT90121 cess (976 to 991) Step ladder process (992 to 999) DT9122 DT90122 (higher byte is not used.)

Read -ing

Writing

5-185
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH DT9123 DT90123 Not used DT9124 DT90124 Not used DT9125 DT90125 Not used Forced on/off This displays the unit number that has DT9126 DT90126 operating station executed forced on/off operation. (*Note) (*Note) display The number of times, which MEWNETF remote I/O service was performed by each master, is stored. DT9127 DT90127 (*Note) (*Note) MEWNET-F system remote I/O service time DT9128 (*Note) DT90128 (*Note)

Read -ing

Writing

N/A

N/A

A The number of times, which MEWNETF remote I/O service was performed by each master, is stored.

N/A

DT9129 DT9130

DT90129 DT90130

Not used Not used

DT9131

DT90131

MEWNET-F (remote I/O) slave stations abnormality checking (for selecting the display contents and master of DT9132 to DT9135/DT90132 to DT90135)

The contents displayed by DT9132 to DT9135/DT90132 to DT90135 will change depending on the contents of stored in DT9131/DT90131. Use the programming tools software to write the settings for what you want to display (this can also be done with the F0 (MV) move instruction). Set the code (H0 or H1) specifying the display contents in the higher 8 bits and set the code (H0 to H3) specifying the display master in the lower 8 bits.

N/A

N/A

N/A

Note) Used by the system. 5-186


CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The bit corresponding to the station number of the MEWNET-F where an MEWNET-F error is occurring is set to on. Monitor (remote I/O) error using binary display. slave station (1: Error slave station, 0: Normal slave number current station) condition (when DT9131/ DT90131 is H0, H1, H2 or H3) DT9132 DT9133 DT90132 DT90133 MEWNET-F (remote I/O) I/O verify error slave station number (when DT9131/ DT90131 is H100, H101, H102 or H103)

Read -ing

Writing

When the installed condition of a MEWNET-F slave station set unit has changed since the power was turned on, the bit corresponding to that slave station number will be set to on. Monitor using ibnary display. (1: Error slave station, 0: Normal slave station)

A The bit corresponding to the slave station number of the MEWNET-F where an error is occurring will be set to on. Monitor using binary display. (1: Error slave station, 0: Normal slave station)

N/A

MEWNET-F (remote I/O) error slave station number record (when DT9131/ DT90131 is H0, H1, H2 or H3) DT9134 DT9135 DT90134 DT90135 MEWNET-F (remote I/O) momentary voltage drop slave station number (when DT9131/ DT90131 is H100, H101, H102 or H103)

If a momentary voltage drop at MEWNET-F slave station set, the bit corresponding to that slave station number will be set to on. Monitor using binary display. (1: Error slave station, 0: Normal slave station)

5-187
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Display the error conditions for 8 types of errors using 1 byte.

Read -ing

Writing

DT9136 DT9137

DT90136 DT90137

Error code of MEWNET-F (remote I/O) system

N/A

DT9138 DT90138 Not used DT9139 DT90139 Not used The number of times the receiving operation is DT9140 DT90140 (*Note1) (*Note1) performed (counted using ring counter) The current interval between two receiving DT9141 DT90141 (*Note1) (*Note1) operations: value in the register x 2.5 ms The minimum interval between two receiving DT9142 DT90142 (*Note1) (*Note1) operations: value in the register x 2.5 ms MEWNETThe maximum interval between two receiving DT9143 DT90143 W/-P PC (*Note1) (*Note1) operations: value in the register x 2.5 ms link status The number of times the sending operation is DT9144 DT90144 [PC link 0 (W/P)] (*Note1) (*Note1) performed (counted using ring counter) The current interval between two sending DT9145 DT90145 (*Note2, 3) (*Note1) (*Note1) operations: value in the register x 2.5 ms The minimum interval between two sending DT9146 DT90146 (*Note1) (*Note1) operations: value in the register x 2.5 ms The maximum interval between two sending DT9147 DT90147 (*Note1) (*Note1) operations: value in the register x 2.5 ms Note1) Used by the system. Note2) When the system register 46 = K0, First: PC link 0, second: PC link 1 When the system register 46 = K1, First: PC link 1, second: PC link 0 Note3) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

N/A

N/A

N/A

N/A

5-188
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The number of times the receiving operation is DT9148 DT90148 (*Note1) (*Note1) performed (counted using ring counter) The current interval between two receiving DT9149 DT90149 (*Note1) (*Note1) operations: value in the register x 2.5 ms The minimum interval between two receiving DT9150 DT90150 (*Note1) (*Note1) operations: value in the register x 2.5 ms MEWNETThe maximum interval between two receiving DT9151 DT90151 W/-P PC (*Note1) (*Note1) operations: value in the register x 2.5 ms link status The number of times the sending operation is DT9152 DT90152 [PC link 1 (W/P)] (*Note1) (*Note1) performed (counted using ring counter) The current interval between two sending DT9153 DT90153 (*Note2, 3) (*Note1) (*Note1) operations: value in the register x 2.5 ms The minimum interval between two sending DT9154 DT90154 (*Note1) (*Note1) operations: value in the register x 2.5 ms The maximum interval between two sending DT9155 DT90155 (*Note1) (*Note1) operations: value in the register x 2.5 ms MEWNETArea used for measurement of receiving DT9156 DT90156 W/-P PC (*Note1) (*Note1) interval. link status [PC link 0 Area used for measurement of sending DT9157 DT90157 (W/P)] (*Note1) (*Note1) interval. (*Note2, 3) MEWNETArea used for measurement of receiving DT9158 DT90158 W/-P PC (*Note1) (*Note1) interval. link status [PC link 1 Area used for measurement of sending DT9159 DT90159 (W/P)] (*Note1) (*Note1) interval. (*Note2, 3) Note1) Used by the system. Note2) When the system register 46 = K0, First: PC link 0, second: PC link 1 When the system register 46 = K1, First: PC link 1, second: PC link 0 Note3) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

Read -ing

Writing

N/A

N/A

5-189
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Link unit no. DT9160 DT90160 [W/P link 1] Stores the unit No. of link 1. (*Note) Error flag DT9161 DT90161 [W/P link 1] Stores the error flag of link 1. (*Note) Link unit no. DT9162 DT90162 [W/P link 2] Stores the unit No. of link 2. (*Note) Error flag DT9163 DT90163 [W/P link 2] Stores the error flag of link 2. (*Note) Link unit no. DT9164 DT90164 [W/P link 3] Stores the unit No. of link 3. (*Note) Error flag DT9165 DT90165 [W/P link 3] Stores the error flag of link 3. (*Note) Link unit no. [W/P link 4] DT9166 DT90166 Available Stores the unit No. of link 4. PLC: FP2SH, FP10SH Error flag [W/P link 4] DT9167 DT90167 Available Stores the error flag of link 4. PLC: FP2SH, FP10SH Link unit no. [W/P link 5] DT9168 DT90168 Available Stores the unit No. of link 5. PLC: FP2SH, FP10SH Error flag [W/P link 5] DT9169 DT90169 Available Stores the error flag of link 5. PLC: FP2SH, FP10SH Note) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

Read -ing

Writing

N/A

5-190
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Station number, whre the send area address DT9170 DT90170 for the PC link is overlapped with this station, is stored here. Test result in the optical transmission path DT9171 DT90171 test mode for MEWNET-P link system is stored here. DT9172 DT90172 Counts how many times a token is lost. Counts how many times two or more tokens DT9173 DT90173 are detected. DT9174 DT90174 Counts how many times a signal is lost. Counts how many times a synchronous DT9175 DT90175 abnormality is detected. DT9176 DT90176 Send NACK DT9177 DT90177 Send NACK DT9178 DT90178 Send WACK DT9179 DT90179 Send WACK DT9180 DT90180 Send answer DT9181 DT90181 Send answer DT9182 DT90182 Unidentified command MEWNETCounts how many times a parity error is DT9183 DT90183 W/-P link detected. status DT9184 DT90184 [W/P link 1] End code receiving error DT9185 DT90185 (*Note) Format error DT9186 DT90186 Not support error DT9187 DT90187 Self-diagnostic result Counts how many times loop change is DT9188 DT90188 detected. Available PLC: FP3, FP10SH Counts home many times link error is DT9189 DT90189 detected. Counts how many times main loop break is DT9190 DT90190 detected. Available PLC: FP3, FP10SH Counts how many times sub loop break is DT9191 DT90191 detected. Available PLC: FP3, FP10SH Loop reconstruction condition DT9192 DT90192 Available PLC: FP3, FP10SH Loop operation mode DT9193 DT90193 Available PLC: FP3, FP10SH Loop input status DT9194 DT90194 Available PLC: FP3, FP10SH Note) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

Read -ing

Writing

N/A

5-191
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH MEWNET-H The link status for the MEWNET-H link is link status/ monitored as: link unit number (H DT9195 DT90195 link 1) (For FP2/ FPSH, using W2 mode) MEWNET-H The link status for the MEWNET-H link is link status/ monitored as: link unit number (H DT9196 DT90196 link 2) (For FP2/ FPSH, using W2 mode) MEWNET-H The link status for the MEWNET-H link is link status/ monitored as: link unit number (H DT9197 DT90197 link 3) (For FP2/ FPSH, using W2 mode) DT9198 DT90198 Not used DT9199 DT90199 Not used Station number, whre the send area address DT9200 DT90200 for the PC link is overlapped with this station, is stored here. Test result in the optical transmission path DT9201 DT90201 test mode for MEWNET-P link system is stored here. DT9202 DT90202 Counts how many times a token is lost. Counts how many times two or more tokens DT9203 DT90203 MEWNETare detected. W/-P link DT9204 DT90204 status Counts how many times a signal is lost. [W/P link 2] Counts how many times a synchronous DT9205 DT90205 (*Note) abnormality is detected. DT9206 DT90206 Send NACK DT9207 DT90207 Send NACK DT9208 DT90208 Send WACK DT9209 DT90209 Send WACK DT9210 DT90210 Send answer DT9211 DT90211 Send answer DT9212 DT90212 Unidentified command Note) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH 5-192

Read -ing

Writing

N/A

N/A

N/A

N/A

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Counts how many times a parity error is DT9213 DT90213 detected. DT9214 DT90214 End code receiving error DT9215 DT90215 Format error DT9216 DT90216 Not support error DT9217 DT90217 Self-diagnostic result Counts how many times loop change is DT9218 DT90218 detected. Available PLC: FP3, FP10SH Counts home many times link error is DT9219 DT90219 MEWNETdetected. W/-P link status Counts how many times main loop break is DT9220 DT90220 [W/P link 2] detected. (*Note) Available PLC: FP3, FP10SH Counts how many times sub loop break is DT9221 DT90221 detected. Available PLC: FP3, FP10SH Loop reconstruction condition DT9222 DT90222 Available PLC: FP3, FP10SH Loop operation mode DT9223 DT90223 Available PLC: FP3, FP10SH Loop input status DT9224 DT90224 Available PLC: FP3, FP10SH DT9225 DT90225 Not used DT9226 DT90226 Not used DT9227 DT90227 Not used DT9228 DT90228 Not used DT9229 DT90229 Not used Station number, whre the send area address DT9230 DT90230 for the PC link is overlapped with this station, is stored here. Test result in the optical transmission path DT9231 DT90231 test mode for MEWNET-P link system is MEWNETstored here. DT9232 DT90232 W/-P link Counts how many times a token is lost. status Counts how many times two or more tokens DT9233 DT90233 [W/P link 3] are detected. (*Note) DT9234 DT90234 Counts how many times a signal is lost. Counts how many times a synchronous DT9235 DT90235 abnormality is detected. DT9236 DT90236 Send NACK DT9237 DT90237 Send NACK Note) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

Read -ing

Writing

N/A

N/A

5-193
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH DT9238 DT90238 Send WACK DT9239 DT90239 Send WACK DT9240 DT90240 Send answer DT9241 DT90241 Send answer DT9242 DT90242 Unidentified command Counts how many times a parity error is DT9243 DT90243 detected. DT9244 DT90244 End code receiving error DT9245 DT90245 Format error DT9246 DT90246 Not support error DT9247 DT90247 Self-diagnostic result Counts how many times loop change is MEWNETDT9248 DT90248 detected. W/-P link Available PLC: FP3, FP10SH status Counts home many times link error is DT9249 DT90249 [W/P link 3] detected. (*Note) Counts how many times main loop break is DT9250 DT90250 detected. Available PLC: FP3, FP10SH Counts how many times sub loop break is DT9251 DT90251 detected. Available PLC: FP3, FP10SH Loop reconstruction condition DT9252 DT90252 Available PLC: FP3, FP10SH Loop operation mode DT9253 DT90253 Available PLC: FP3, FP10SH Loop input status DT9254 DT90254 Available PLC: FP3, FP10SH Monitoring tool port Station number BCD (H1 to H32) set for tool station No. DT90255 (Available port is stored here. PLC: FP2SH/ FP10SH) Monitoring COM port Station number BCD (H1 to H32) set for tool station No. DT90256 (Available port is stored here. PLC: FP2SH/ FP10SH) Note) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

Read -ing

Writing

N/A

N/A

5-194
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH An Operation error program block number Operation is stored (higher byte) here when an error program operation error is detected. No. (hold) DT90257 (Available Program block number PLC: FP2SH/ - H1: In the first program block FP10SH) - H2: In the 2nd program block The program block number for the latest Operation operation error is stored here each time an error program operation error is detected. No. (non-hold) DT90258 (Available Program block number PLC: FP2SH/ - H1: In the first program block FP10SH) - H2: In the 2nd program block Break The program block number where the BRK occurrence instruction occurred is stored here. program DT90259 number Program block number (Available - H1: In the first program block PLC: FP2SH/ - H2: In the 2nd program block FP10SH) Type of IC memory card is monitored here as: - H5: Flash-EEPROM type IC memory card Type of IC - H6: SRAM type IC memory card memory card - H506: For FP10SH, flashDT90260 (Available EEPROM/SRAM mixed type IC memory PLC: FP2SH/ card FP10SH) - H6: No archival information is stored - H6: No data is written - Other than above: ERROneous condition (self-diagnostic error code E56) Capacity of IC The capacity of IC memory card is stored memory card 1 in units of KB. If Flash-EEPROM/SRAM DT90261 (Available mixed type IC memory card is used, PLC: FP2SH/ SRAM capacity is stored. FP10SH) Capacity of IC memory card 2 If Flash-EEPROM/SRAM mised type IC DT90262 (Available memory card is used, flash-EEPROM PLC: FP2SH/ capacity is stored in units of KB. FP10SH) File register The current value of file register bank is DT90263 bank (current stored here. value) Note) For MEWNET-W system, available PLC type: FP2/FP2SH/FP3/FP10SH For MEWNET-P system, available PLC type: FP3/FP10SH

Read -ing

Writing

N/A

5-195
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH File register bank (shelter The shelter number of the file register DT90264 number) bank is stored here. (Available PLC: FP2SH) Free compile Free capacity of compile memory is stored memory here. If the program memory is 120K capacity DT90265 (Available steps, the capacity of 1st program block is PLC: FP2SH/ stored. FP10SH) Free compile memory capacity for If the program memory is 120K steps, free program block DT90266 caqpacity of program block 2 compile 2 memory is stored here. (Available PLC: FP2SH/ FP10SH) DT90267 Not used Index register bank (current The current value of index register bank is value) DT90268 (Available stored here. PLC: FP2SH/ FP10SH) Index register bank (shelter The shelter number of index register bank number) DT90269 (Available is stored here. PLC: FP2SH/ FP10SH) DT90399 Not used Number of the The total of the error alarm relay which error alarm went on is stored here. (Max. 500) relay which To reset all data in the error alarm buffer, DT90400 went on use an RST instruction and DT90400. (Available PLC: FP2SH/ FP10SH)

Read -ing

Writing

N/A

N/A

N/A

N/A

N/A

N/A

5-196
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The first error alarm relay number which went on is stored. The error has been reset by executing a RST instruction. Example 1: Using RST instruction
First error alarm relay which went on (Available PLC: FP2SH/ FP10SH)

Read -ing

Writing

DT90401

Example 2: Using RST instruction and DT90401

DT90402

DT90403

DT90404

DT90405

DT90406

DT90407

Second error alarm relay which went on (Available PLC: FP2SH/ FP10SH) Third error alarm relay which went on (Available PLC: FP2SH/ FP10SH) Forth error alarm relay which went on (Available PLC: FP2SH/ FP10SH) Fifth error alarm relay which went on (Available PLC: FP2SH/ FP10SH) Sixth error alarm relay which went on (Available PLC: FP2SH/ FP10SH) Seventh error alarm relay which went on (Available PLC: FP2SH/ FP10SH)

N/A

The error alarm relay number which went on is stored. To reset the specified error alarm relay, use an RST instruction only.

5-197
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Eighth error alarm relay which went on DT90408 (Available PLC: FP2SH/ FP10SH) Ninth error alarm relay which went on DT90409 (Available PLC: FP2SH/ FP10SH) Tenth error alarm relay which went on DT90410 (Available PLC: FP2SH/ FP10SH) The error alarm relay number which went Eleventh error on is stored. To reset the specified error alarm relay which went on alarm relay, use an RST instruction only. DT90411 (Available PLC: FP2SH/ FP10SH) Twelth error alarm relay which went on DT90412 (Available PLC: FP2SH/ FP10SH) Thirteenth error alarm relay which DT90413 went on (Available PLC: FP2SH/ FP10SH) Fourteenth error alarm relay which DT90414 went on (Available PLC: FP2SH/ FP10SH)

Read -ing

Writing

N/A

5-198
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Fifteenth alarm relay which went on DT90415 (Available PLC: FP2SH/ FP10SH) Sixteenth error alarm relay which went on DT90416 (Available PLC: FP2SH/ FP10SH) Seventeenth The error alarm relay number which went error alarm on is stored. To reset the specified error relay which alarm relay, use an RST instruction only. DT90417 went on (Available PLC: FP2SH/ FP10SH) Eighteenth error alarm relay which DT90418 went on (Available PLC: FP2SH/ FP10SH) Nineteenth error alarm relay which DT90419 went on (Available PLC: FP2SH/ FP10SH)

Read -ing

Writing

N/A

5-199
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Time at which the first error alarm relay (DT90401) The time (minute and second) data at went on (for which the first error alarm relay in DT90420 minute and DT90401 went on is stored. second data) (Available PLC: FP2SH/ FP10SH) Time at which the first error alarm relay (DT90401) The time (day and hour) data at which the went on (for first error alarm relay in DT90401 went on DT90421 day and hour is stored. data) (Available PLC: FP2SH/ FP10SH) Time at which the first error alarm relay (DT90401) The time (year and month) data at which went on (for the first error alarm relay in DT90401 went DT90422 year and on is stored. month data) (Available PLC: FP2SH/ FP10SH)

Read -ing

Writing

N/A

5-200
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.2 Table of Basic Instructions


FP2SH/FP10SH Steps *3 FP0R FP-X
*2 *2 *2 *2 *2 *2

FP-e

FP

FP0

Name

Boolean

Symbol

Description

Sequence basic instructions Start ST Start Not Out Not AND AND Not OR OR Not Leading edge start Trailing edge start Leading edge AND Trailing edge AND Leading edge OR Trailing edge OR Leading edge out Trailing edge out Alternative out AND stack OR stack ST/ OT / AN AN/ OR OR/ ST

ST

AN

AN

OR

OR

OT

OT ALT ANS ORS

Begins a logic operation with a Form A (normally open) contact. Begins a logic operation with a Form B (normally closed) contact. Outputs the operated result to the specified output. Inverts the operated result up to this instruction. Connects a Form A (normally open) contact serially. Connects a Form B (normally closed) contact serially. Connects a Form A (normally open) contact in parallel. Connects a Form B (normally closed) contact in parallel. Begins a logic operation only for one scan when the leading edge of the trigger is detected. Begins a logic operation only for one scan when the trailing edge of the trigger is detected. Connects a Form A (normally open) contact serially only for one scan when the leading edge of the trigger is detected. Connects a Form A (normally open) contact serially only for one scan when the trailing edge of the trigger is detected. Connects a Form A (normally open) contact in parallel only for one scan when the leading edge of the trigger is detected. Connects a Form A (normally open) contact in parallel only for one scan when the trailing edge of the trigger is detected. Outputs the operated result to the specified output only for one scan when leading edge of the trigger is detected. (for pulse relay) Outputs the operated result to the specified output only for one scan when trailing edge of the trigger is detected. (for pulse relay) Inverts the output condition (on/off) each time the leading edge of the trigger is detected. Connects the multiple instruction blocks serially. Connects the multiple instruction blocks in parallel.

1 (2) 1 (2) 1 (2) 1 1 (2) 1 (2) 1 (2) 1 (2) 2


*2

*2

*2

*2

*2

*2

2 3 1 1

: Available, : Not available, : Not available partially *1) The type of the devices that can be specified depends on the models. *2) This instruction is available for FP-X Ver. 2.0 or later, and FP Ver. 3.10 or later. *3) In the FP2/FP2SH/10SH, when using X1280, Y1280, R1120 (special internal relay included), L1280, T256, C256 or anything beyond for the ST, ST/, OT, AN, AN/, OR and OR/ instructions, the number of steps is shown in parentheses. Also, in the FP2/FP2SH/FP10SH, when a relay number has an index modifier, the number of steps is shown in parentheses. For the FP and FP-X, the number of steps varies according to the relay number to be used.

5-201
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Name

Boolean

Symbol

Description

Push stack Read stack Pop stack Leading edge differential Trailing edge differential Leading edge differ-ential (initial execution type) Set Reset Keep No operation

PSHS RDS POPS DF

DF/

DFI

Stores the operated result up to this instruction. *2 Reads the operated result stored by the PSHS instruction. *2 Reads and clears the operated result stored by the PSHS instruction Turns on the contact for only one scan when the leading edge of the trigger is detected. Turns on the contact for only one scan when the trailing edge of the trigger is detected. Turns on the contact for only one scan when the leading edge of the trigger is detected. The leading edge detection is possible on the first scan. Output is set to and held at on. Output is set to and held at off. Outputs at set trigger and holds until reset trigger turns on. No operation. After set value n x 0.001 seconds, timer contact a is set to on. After set value n x 0.01 seconds, timer contact a is set to on. After set value n x 0.1 seconds, timer contact a is set to on. After set value n x 1 second, timer contact a is set to on. After set value S x 0.01 seconds, the specified output and R900D are set to on. After set value S x 0.01 seconds, the specified output and R900D are set to on. Executes the filter processing for the specified input. Decrements from the preset value n

1 1 1 1

SET RST KP NOP

3 3 1 (2) 1 3 (4) 3 (4) 3 (4) 4 (5) 5

Basic function instructions On-delay timer TML TMR TMX TMY Auxiliary timer (16-bit) Auxiliary timer (32-bit) Time constant processing Counter F137 (STMR) F183 (DSTM) F182

*3 *3 *3 *3

*4

*4

CT

3 (4)

*3

*3

*3

: Available, : Not available, : Not available partially *1) The type of the devices that can be specified depends on the models. *2) The allowable number of using the PSHS and RDS instruction depends on the models. *3) For FP2SH, FP10SH and FP-X Ver2.0 or later, any device can be set for the setting value of counter or timer instruction. *4) This instruction is available for FP-X Ver. 2.0 or later. *5) In the FP2/FP2SH/FP10SH, when using Y1280, R1120 (special internal relay included), L1280 or anything beyond for the KP instruction, the number of steps is shown in parentheses. Also, in the FP2/FP2SH/FP10SH, when a relay number has an index modifier, the number of steps is shown in parentheses. *6) In the FP2/FP2SH/FP10SH, when timer 256 or higher, or counter 255 or lower, is used, the number of steps is the number in parentheses. Also, in the FP2/FP2SH/FP10SH, when a timer number or counter number has an index modifier, the number of steps is the number in parentheses. For the FP and FP-X, the number of steps varies according to the specified timer number or counter number.

5-202
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps *5 *6

FP0R

FP-X

FP-e

FP

FP0

FP2

Name

Boolean

Symbol

Description

UP/DOWN counter

F118 (UDC)

Increments or decrements from the preset value S based on up/donw input. Shifts one bit of 16-bit [word internal relay (WR)] data to the left.

Shift register

SR

1 (2) *1

Left/right shift register

F119 (LRSR)

Shifts one bit of 16-bit data range specified by D1 and D2 to the left or to the right.

Control instructions Master MC control relay Master MCE control relay end Jump JP

Starts the master control program.


2

Ends the master control program.


2

The program jumps to the label instruction and continues from there.

2 (3) *2 1

Label Auxiliary jump Label Loop

LBL F19 (SJP) LBL LOOP

The program jumps to the label instruction specified by S and continues from there. The program jumps to the label instruction and continues from there (the number of jumps is set in S).

3 1 4 (5) *3 1

Label Break

LBL BRK

Stops program execution when the predetermined trigger turns on in the 1 TEST/RUN mode only. : Available, : Not available, : Not available partially *1) In the FP2/FP2SH/FP10SH, when internal relay WR240 or higher is used, the number of steps is the number in parentheses. Also, in the FP2/FP2SH/FP10SH, when the specified internal relay number (word address has an index modfier, the number of steps is the number in parentheses. *2) In the FP2/FP2SH/FP10SH, when the number n in a jump instruction has an index modifier, the number of steps isthenumber in parentheses. *3) In the FP2/FP2SH/FP10SH, when the number n in a loop instruction has an index modifier, the number of steps is the number in parentheses.

5-203
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

Name

Boolean

Symbol

Description

End Conditional end Eject

ED CNDE EJECT

The operation of program is ended. Indicates the end of a main program. The operation of program is ended when the trigger turns on. Adds page break fo ruse when printing.

1 1 1

Step ladder instructions Start step SSTP Next step NSTL

NSTP

Clear step Clear multiple steps Step end

CSTP SCLR

The start of program n for process control Start the specified process n and clear the process currently started. (Scan execution type) Start the specified process n and clear the process currently started. (Pulse execution type) Resets the specified process n. Resets multiple processes specified by n1 and n2. End of step ladder area

3 5 1 2 (3) *1

STPE

Subroutine instructions Subroutine CALL call

Output off type subroutine call

FCAL

Subroutine SUB entry Subroutine RET return Interrupt instructions Interrupt INT

When the trigger is on: Executes the subroutine. When the trigger is off: Not execute the subroutine. The output in the subroutine is maintained. When the trigger is on: Executes the subroutine. When the trigger is off: Not execute the subroutine. But, the output in the subroutine is cleared. Indicates the start of the subroutine program n. Ends the subroutine program.

4 (5) *1

1 1

Interrupt IRET 1 return Interrupt ICTL Select interrupt enable/disable or clear in 5 control S1 and S2 and execute. : Available, : Not available, : Not available partially *1) In the FP2/FP2SH/FP10SH, when the number n of a subroutine program has an index modifier, the number of steps is the number in parentheses.

Indicates the start of the interrupt program n. Ends the interrupt program.

5-204
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

FP0 (FP0R mode)

Name

Boolean

Symbol

Description

Special setting instructions SYS1 Communication conditions setting

Password setting Interrupt setting PLC link time setting MEWTOCOLCOM response control High-speed counter operation mode changing System registers No. 40 to No. 47 changing : Available,

Change the communication conditions for the COM port or tool port based on the contents specified by the character constant. Change the password specified by the PLC based on the contents specified by the character constant. Set the interrupt input based on the contents specified by the character constant. Set the system setting time when a PLC link is used, based on the contents specified by the character constant. Change the communication conditions of the COM. port or tool port for MEWTOCOL-COM based on the contents specified by the character constant. Change the operation mode of the highspeed counter, based on the contents specified by the character constant.

*1

*1

*2

*2

13

*3

*3

SYS2

Change the setting value of the system register for the PLC link function.
7

: Not available,

: Not available partially

*1) With FP-X Ver2.0 or later, and FP Ver 3.10 or later, the baud rate can be selected from 300, 600 or 1200 bps. *2) With FP 32k type, the 8-digit password can be selected. *3) With FP 32k type and FP-X Ver1.10 or later, it can be used.

5-205
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP-X

FP-e

FP

FP0

FP2

Name

Boolean

Symbol

Description

Data compare instructions 16-bit data compare (Start) ST> ST>= ST<> ST= Begins a logic operation by comparing two 16bit data in the comparative condition S1=S2. Begins a logic operation by comparing two 16bit data in the comparative condition S1<S2 or S1>S2. Begins a logic operation by comparing two 16bit data in the comparative condition S1>S2. Begins a logic operation by comparing two 16bit data in the comparative condition S1>S2 or S1=S2. Begins a logic operation by comparing two 16bit data in the comparative condition S1<S2. Begins a logic operation by comparing two 16bit data in the comparative condition S1<S2 or S1=S2. Connects a Form A (normally open) contact serially by comparing two 16-bit data in the comparative condition S1=S2. Connects a Form A (normally open) contact serially by comparing two 16-bit data in the comparative condition S1<S2 or S1>S2. Connects a Form A (normally open) contact serially by comparing two 16-bit data in the comparative condition S1>S2. Connects a Form A (normally open) contact serially by comparing two 16-bit data in the comparative condition S1>S2 or S1=S2. Connects a Form A (normally open) contact serially by comparing two 16-bit data in the comparative condition S1<S2. Connects a Form A (normally open) contact serially by comparing two 16-bit data in the comparative condition S1<S2 or S1=S2. Connects a Form A (normally open) contact in parallel by comparing two 16-bit data in the comparative condition S1=S2. Connects a Form A (normally open) contact in parallel by comparing two 16-bit data in the comparative condition S1<S2 or S1>S2. Connects a Form A (normally open) contact in parallel by comparing two 16-bit data in the comparative condition S1>S2. Connects a Form A (normally open) contact in parallel by comparing two 16-bit data in the comparative condition S1>S2 or S1=S2. Connects a Form A (normally open) contact in parallel by comparing two 16-bit data in the comparative condition S1<S2. Connects a Form A (normally open) contact in parallel by comparing two 16-bit data in the comparative condition S1<S2 or S1=S2. : Not available partially
5

ST< ST<=

16-bit data compare (AND)

AN=

AN<>

AN>

AN>=

AN<

AN<=

16-bit data compare (OR)

OR=

OR<>

OR>

OR>=

OR<

OR<=

: Available,

: Not available,

5-206
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

Name

Boolean

Symbol

Description

32-bit data compare (Start)

STD=

STD<>

STD>

STD>=

STD<

STD<=

32-bit data compare (AND)

AND=

AND<>

AND>

AND>=

AND<

AND<=

32-bit data compare (OR)

ORD=

ORD<>

ORD>

ORD>=

ORD<

ORD<=

Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, S1)=(S2+1, S2). Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)>(S2+1, S2). Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, S1)>(S2+1, S2). Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, S1)>(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, S1)<(S2+1, S2). Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact serially by comparing two 32-bit data in the comparative condition (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact serially by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)>(S2+1, S2). Connects a Form A (normally open) contact serially by comparing two 32-bit data in the comparative condition (S1+1, S1)>(S2+1, S2). Connects a Form A (normally open) contact serially by comparing two 32-bit data in the comparative condition (S1+1, S1)>(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact serially by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2). Connects a Form A (normally open) contact serially by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact in parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact in parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)>(S2+1, S2). Connects a Form A (normally open) contact in parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)>(S2+1, S2). Connects a Form A (normally open) contact in parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)>(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact in parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2). Connects a Form A (normally open) contact in parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)=(S2+1, S2). : Not available partially

: Available,

: Not available,

5-207
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

Name

Boolean

Symbol

Description

Begins a logic operation by comparing two 32bit data in the comparative condition (S1+1, point S1)=(S2+1, S2). Begins a logic operation by comparing two 32type real STF<> bit data in the comparative condition (S1+1, number S1)<(S2+1, S2) or (S1+1, S1)>(S2+1, S2). Begins a logic operation by comparing two 32data STF> bit data in the comparative condition (S1+1, compare S1)>(S2+1, S2). (Start) Begins a logic operation by comparing two 32STF>= bit data in the comparative condition (S1+1, S1)>(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Begins a logic operation by comparing two 32STF< bit data in the comparative condition (S1+1, S1)<(S2+1, S2). Begins a logic operation by comparing two 32STF<= bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact Floating ANF= serially by comparing two 32-bit data in the point comparative condition (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact type real ANF<> serially by comparing two 32-bit data in the number comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)>(S2+1, S2). data Connects a Form A (normally open) contact ANF> compare serially by comparing two 32-bit data in the (AND) comparative condition (S1+1, S1)>(S2+1, S2). Connects a Form A (normally open) contact ANF>= serially by comparing two 32-bit data in the comparative condition (S1+1, S1)>(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact ANF< serially by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2). Connects a Form A (normally open) contact ANF<= serially by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact in Floating ORF= parallel by comparing two 32-bit data in the point comparative condition (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact in type real ORF<> parallel by comparing two 32-bit data in the number comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)>(S2+1, S2). data Connects a Form A (normally open) contact in ORF> compare parallel by comparing two 32-bit data in the (OR) comparative condition (S1+1, S1)>(S2+1, S2). Connects a Form A (normally open) contact in ORF>= parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)>(S2+1, S2) or (S1+1, S1)=(S2+1, S2). Connects a Form A (normally open) contact in ORF< parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2). Connects a Form A (normally open) contact in ORF<= parallel by comparing two 32-bit data in the comparative condition (S1+1, S1)<(S2+1, S2) or (S1+1, S1)=(S2+1, S2). : Available, : Not available, : Not available partially *1) This instruction is available for FP-X V1.10 or later and FP 32k type Floating STF=

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

5-208
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

5.3 Table of High-level Instructions


The high-level instructions are expressed by the prefixes F or P with numbers. For most of the high-level instructions, F and P types are available. The differences between the two types are explained as follows: - Instructions with the prefix F are executed in every scan while its trigger is in the on. - Instructions with the prefix P are executed only when the leading edge of its trigger is detected. For the FP0/FP0R/FP/FP-X, the P type high-level instructions are not available.
FP2SH/FP10SH
*1

Steps

FP0R

Number

Name

Boolean

FP

FP0

rand

Description

The specified one bit in S is transferred to the specified one bit in D. The bit is specified by n. F6 Hexadecimal DGT S, n, d The specified one digit in S is transferred P6 digit (4-bit) PDGT to the specified one digit in D. The digit is data move specified by n. F7 Two 16-bit MV2 S1, (S1)(D), P7 data move PMV2 S2, D (S2)(D+1) F8 Two 32-bit DMV2 S1, (S1+1, S1)(D+1, D), P8 data move PDMV2 S2, D (S2+1, S2)(D+3, D+2) F10 Block move BKMV S1, The data between S1 and S2 is P10 PBKMV S2, D transferred to the area starting at D. F11 Block copy COPY S, D1, The data of S is transferred to the all area P11 PCOPY D2 between D1 and D2. F12 Data read ICRD S1, The data stored in the expansion memory from EEPS2, D of the EEP-ROM specified by S1 and S2 ROM are transferred to the area startign at D. P13 Data write to PICWT S1, The data specified by S1 and S2 are EEP-ROM S2, D transferred to the EEP-ROM starting at D. F12 Data read ICRD S1, The data stored in the expansion memory from F-ROM S2, D of the F-ROM specified by S1 and S2 are transferred to the area startign at D. P13 Data write to PICWT S1, The data specified by S1 and S2 are F-ROM S2, D transferred to the F-ROM starting at D. F12 Data read ICRD S1, The data stored in the expansion memory P12 from IC card PICRD S2, D of the IC card specified by S1 and S2 are transferred to the area startign at D. F13 Data write to ICWT S1, The data specified by S1 and S2 are P13 IC card PICWT S2, D transferred to the IC card expansion memory area starting at D. F14 Program read PGRD S The program specified using S is P14 from IC PPGRD transferred into the CPU from IC memory memory card card and executes it. : Available, : Not available, : Not available partially *1) This instruction is available for FP2/FP2SH Ver. 1.5 or later.FP10SH cannot be used *2) This instruction is available for FP0 Ver. 2.0 or later.

Data transfer instructions F0 16-bit data MV P0 move PMV F1 32-bit data DMV P1 move PDMV F2 16-bit data MV P2 invert and PMV/ move F3 32-bit data DMV/ P3 invert and PDMV/ move F4 Reading of GETS P4 head word PGETS No. of the specified slot F5 Bit data BTM P5 move PBTM

S, D S, D S, D

(S)(D) (S+1, S)(D+1, D)

5 7 5

(S)(D) S, D (S+1, S)(D+1, D) S, D The head word No. of the specified slot is read.

S, n, D

7 7 11 7 7 11 11 11 11 11

*2

*2

11

5-209
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2
*1

Ope-

FP-X

FP-e

Number

FP

FP0

Name

Boo-lean

rand

Description

F15 P15 F16 P16 F17 P17

16-bit data exchange 32-bit data exchange Higher/lower byte in 16-bit data exchange F18 16-bit data P18 block exchange Control instruction F19 Auxiliary jump

XCH PXCH DXCH PDXCH SWAP PSWAP BXCH PBXCH

D1, D2 D1, D2 D

(D1)(D2), (D2)(D1) (D1+1, D1)(D2+1, D2) (D2+1, D2)(D1+1, D1) The higher byte and lower byte of D are exchanged. Exchange the data between D1 and D2 with the data specified by D3.

5 5 3

D1, D2, D3

SJP

The program jumps to the label instruction specified by S and continues from there.

Binary arithmetic instructions F20 16-bit data + S, D (D)+(S)(D) P20 addition P+ F21 32-bit data D+ S, D (D+1, D)+(S+1, S)(D+1, D) P21 addition PD+ F22 16-bit data + S1, (S1)+(S2)(D) P22 addition P+ S2, D F23 32-bit data D+ S1, (S1+1, S1)+(S2+1, S2)(D+1, D) P23 addition PD+ S2, D F25 16-bit data S, D (D)-(S)(D) P25 subtraction PF26 32-bit data DS, D (D+1, D)-(S+1, S)(D+1, D) P26 subtraction PDF27 16-bit data S1, (S1)-(S2)(D) P27 subraction PS2, D F28 32-bit data DS1, (S1+1, S1)-(S2+1, S2)(D+1, D) P28 subtraction PDS2, D F30 16-bit data * S1, (S1)X(S2)(D+1, D) P30 multiplication P* S2, D F31 32-bit data D* S1, (S1+1, S1)X(S2+1, S2)(D+3, D+2, D+1, P31 multiplication PD* S2, D D) F32 16-bit data % S1, (S1)(S2)quotient (D) P32 division P% S2, D remainder (DT9015) F33 32-bit data D% S1, (S1+1, S1)(S2+1, S2)quotient (D+1, D) P33 division PD% S2, D remainder (DT9016, DT9015) F34 16-bit data *W S1, (S1)X(S2)(D) P34 multiplication P*W S2, D (result in 16 bits) F35 16-bit data +1 D (D)+1(D) P35 increment P+1 F36 32-bit data D+1 D (D+1, D)+1(D+1, D) P36 increment PD+1 F37 16-bit data -1 D (D)-1(D) P37 decrement P-1 F38 32-bit data D-1 D (D+1, D)-1(D+1, D) P38 decrement PD-1 F39 32-bit data D*D S1, (S1+1, S1)x(S2+1, S2)(D+1, D) P39 multiplication PD*D S2, D (result in 32 bits) : Available, : Not available, : Not available partially

5 7 7 11 5 7 7 11 7 11 7 11

3 3 3 3

11

5-210
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boo-lean

rand

Description

BCD arithmetic instructions F40 4-digit BCD B+ P40 data addition PB+ F41 8-digit BCD DB+ P41 data addition PDB+ F42 4-digit BCD B+ P42 data addition PB+ F43 8-digit BCD DB+ P43 data addition PDB+ F45 4-digit BCD data BP45 subtraction PBF46 8-digit BCD data DBP46 subtraction PDBF47 4-digit BCD data BP47 subtraction PBF48 8-digit BCD data DBP48 subraction PDBF50 4-digit BCD data B* P50 multiplication PB* F51 8-digit BCD data DB* P51 multiplication PDB* F52 4-digit BCD data B% P52 division PB% F53 8-digit BCD data DB% P53 division PDB% F55 4-digit BCD data P55 increment F56 8-digit BCD data P56 increment F57 4-digit BCD data P57 decrement F58 8-digit BCD data P58 decrement Data compare instructions F60 16-bit data P60 compare F61 P61 F62 P62 32-bit data compare 16-bit data band compare B+1 PB+1 DB+1 PDB+1 B-1 PB-1 DB-1 PDB-1 CMP PCMP DCMP PDCMP WIN PWIN

S, D S, D S1, S2, D S1, S2, D S, D S, D S1, S2, D S1, S2, D S1, S2, D S1, S2, D S1, S2, D S1, S2, D

(D)+(S)(D) (D+1, D)+(S+1, S)(D+1, D) (S1)+(S2)(D) (S1+1, S1)+(S2+1, S2)(D+1, D) (D)-(S)(D) (D+1, D)-(S+1, S)(D+1, D) (S1)-(S2)(D) (S1+1, S1)-(S2+1, S2)(D+1, D) (S1)X(S2)(D+1, D) (S1+1, S1)X(S2+1, S2)(D+3, D+2, D+1, D) (S1)(S2)quotient (D) remainder (DT9015) (S1+1, S1)(S2+1, S2)quotient (D+1, D) remainder (DT9016, DT9015) (D)+1(D) (D+1, D)+1(D+1, D) (D)-1(D) (D+1, D)-1(D+1, D)

5 7 7 11 5 7 7 11 7 11 7

11

D D D D

3 3 3 3

S1, S2

S1, S2

S1, S2, S3

(S1)>(S2)R900A: on (S1)=(S2)R900B: on (S1)<(S2)R900C: on (S1+1, S1)>(S2+1, S2)R900A: on (S1+1, S1)=(S2+1, S2)R900B: on (S1+1, S1)<(S2+1, S2)R900C: on (S1)>(S3)R900A: on (S2)< or=(S1)< or=(S3)R900B: on (S1)<(S2)R900C: on

: Available,

: Not available,

: Not available partially

5-211
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

Name

Boolean

FP

FP0

rand

Description

F63 P63

32-bit data band compare

DWIN PDWIN

S1, S2, S3

F64 Block data BCMP P64 compare PBCMP Logic operation instructions F65 16-bit data WAN P65 AND PWAN F66 16-bit data WOR P66 OR PWOR F67 16-bit data XOR P67 exclusive PXOR OR F68 16-bit data XNR P68 exclusive PXNR NOR F69 16-bit data WUNI P69 unite PWUNI

S1, S2, S3 S1, S2, D S1, S2, D S1, S2, D

(S1+1, S1)>(S3+1, S3)R900A: on (S2+1, S2)< or=(S1+1, S1)< or=(S3+1, S3)R900B: on (S1+1, S1)<(S2+1, S2)R900C: on Compares the two blocks beginning with S2 and S3 to see if they are equal. (S1) AND (S2)(D) (S1) OR (S2)(D)

13

7 7

{(S1) AND (S2)} OR {(S1) AND (S2)}(D) S1, S2, D {(S1) AND (S2)} OR {(S1) AND (S2)}(D) S1, S2, S3, D

([S1] AND [S3]) OR ([S2] AND [S3])(D) When (S3) is H0, (S2)(D) When (S3) is HFFFF, (S1) (D)

Data conversion instructions F70 Block check BCC P70 code PBCC calculation

F71 P71

Hexadecima l data ASCII code

HEXA PHEXA

F72 P72

ASCII code Hexadecimal data

AHEX PAHEX

F73 P73

4-digit BCD data ASCII code

BCDA PBCDA

F74 P74

ASCII code 4-digit BCD data

ABCD PABCD

F75 P75

16-bit binary data ASCII code

BINA PBINA

: Available,

: Not available,

Creates the code for checking the data specified by S2 and S3 and stores it in D. The calculation method is specified by S1. S1, S2, D Converts the hexadecimal data specified by S1 and S2 to ASCII code and stores it in D. Example: HABCD H 42 41 44 43 B A D C S1, S2, D Converts the ASCII code specified by S1 and S2 to hexadecimal data and stores it in D. Example: H 44 43 42 41 HCDAB D C B A S1, S2, D Converts the four digits of BCD data specified by S1 and S2 to ASCII code and stores it in D. Example: H1234 H 32 31 34 33 2 1 4 3 S1, S2, D Converts the ASCII code specified by S1 and S2 to four digits of BCD data and stores it in D. Example: H 34 33 32 31 H3412 4 3 2 1 S1, S2, D Converts the 16 bits of binary data specified by S1 to ASCII code and stores it in D (area of S2 bytes). Example: K-100 H 30 30 31 2D 20 20 0 0 1 : Not available partially

S1, S2, S3, D

5-212
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boo-lean

rand

Description

F76 P76

ASCII code 16-bit binary data

ABIN PABIN

S1, S2, D

F77 P77

32-bit binary data ASCII code ASCII code 32-bit binary data 16-bit binary data 4-digit BCD data 4-digit BCD data 16-bit binary data 32-bit binary data 8-digit BCD data 8-digit BCD data 32-bit binary data 16-bit data invert (complement of 1) 16-bit data complement of 2 32-bit data complement of 2 16-bit data absolute 32-bit data absolute 16-bit data sign extension Decode

DBIA PDBIA

S1, S2, D

F78 P78 F80 P80

DABI PDABI BCD PBCD

S1, S2, D S, D

F81 P81

BIN PBIN

S, D

F82 P82

DBCD PDBCD

S, D

Converts the ASCII code specified by S1 and S2 to 16 bits of binary data and stores it in D. Example: H 30 30 31 2D 20 20 K-100 0 0 1 Converts the 32 bits of binary data (S1+1, S1) to ASCII code and stores it in D (area of S2 bytes). Converts the ASCII code specified by S1 and S2 to 32 bits of binary data and stores it in (D+1, D). Converts the 16 bits of binary data specified by S to four digits of BCD data and stores it in D. Example: K100 H100 Converts the four digits of BCD data specified by S to 16 bits of binary data and stores it in D. Example: H100 K100 Converts the 32 bits of binary data specified by (S+1, S) to eight digits of BCD data and stores it in (D+1, D). Converts the eight digits of BCD data specified by (S+1, S) to 32 bits of binary data and stores it in (D+1, D). Inverts each bit of data of D.

11

11

F83 P83 F84 P84 F85 P85 F86 P86 F87 P87 F88 P88 F89 P89 F90 P90

DBIN PDBIN INV PINV NEG PNEG DNEG PDNEG ABS PABS DABS PDABS EXT PEXT DECO PDECO

S, D

Inverts each bit of data of D and adds 1 (inverts the sign). Inverts each bit of data of (D+1, D) and adds 1 (inverts the sign). Gives the absolute value of the data of D. Gives the absolute value of the data of (D+1, D). Extends the 16 bits of data in D to 32 bits in (D+1, D).

3 3 3 3

D D D

Decodes part of the data of S and stores it in D. The part is specified by n. F91 7-segment SEGT S, D Converts the data of S for use in a 7P91 decode PSEGT segment display and stores it in (D+1, D). F92 Encode ENCO S, n, D Encodes part of the data of S and P92 PENCO stores it in D. The part is specified by n. F93 16-bit data UNIT S, n, D The least significant digit of each of the P93 combine PUNIT n words of data beginning at S are stored (united) in order in D. : Available, : Not available, : Not available partially

S, n, D

5-213
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

Name

Boolean

FP

FP0

rand

Description

F94 P94

16-bit data distribute

DIST PDIST

S, n, D

F95 P95

Character ASCII code

ASC PASC

S, D

F96 P96

16-bit table data search

SRC PSRC

S1, S2, S3 S1, S2, S3

F97 P97

32-bit table data search

DSRC PDSRC

Each of the digits of the data of S are stored in (distriuted to) the least significant digits of the areas beginning at D. Twelve characters of the characer constants of S are converted to ASCII code and stored in D to D+5. The data of S1 is searched for in the areas in the range S2 to S3 and the result is stored in DT9037 and DT9038 The data of (S1+1, S1) is searched for in the 32-bit data designated by S3, beginning from S2, and the result if stored in DT90037 and DT90038. Transfer D2 to D3. Any parts of the data between D1 and D2 that are 0 are compressed, and shifted in order toward D2. Transfer S to D1. Any parts of the data between D1 and D2 that are 0 are compressed, and shifted in order toward D2. Shifts the n bits of D to the right.

15

11

Data shift instructions F98 Data table shift-out P98 and compress

CMPR PCMPR

D1, D2, D3 S, D1, D2

F99 P99

Data table shift-in and compress

CMPW PCMP W SHR PSHR SHL PSHL DSHR PDSHR DSHL PDSHL BSR PBSR BSL PBSL BITR PBITR BITL PBITL WSHR PWSHR WSHL PWSHL WBSR PWBSR WBSL PWBSL

F100 P100 F101 P101 F102 P102 F103 P103 F105 P105

Right shift of multiple bits (n bits) in a 16-bit data Left shift of multiple bits (n bits) in a 16bit data Right shift of n bits in a 32-bit data

D, n

D, n

Shifts the n bits of D to the left.


5

D, n

Left shift of n bits in a 32-bit data Right shift of one hexadecimal digit (4bit) F106 Left shift of one P106 hexade-cimal digit (4-bit) F108 Right shift of P108 multiple bits (n bits) F109 Left shift of multiple P109 bits (n bits) F110 Right shift of one P110 word (16-bit) F111 Left shift of one P111 word (16-bit) F112 Right shift of one P112 hexade-cimal digit (4-bit) F113 Left shift of one P113 hexade-cimal digit (4-bit) : Available, : Not available,

D, n D

Shifts the n bits of the 32-bit data area specified by (D+1, D) to the right. Shifts the n bits of the 32-bit data area specified by (D+1, D) to the left. Shifts the one digit of data of D to the right. Shifts the one digit of data of D to the left. Shifts the n bits of data range by D1 and D2 to the right. Shifts the n bits of data range by D1 and D2 to the left. Shifts the one word of the areas by D1 and D2 to the right. Shifts the one word of the areas by D1 and D2 to the left. Shifts the one digit of the areas by D1 and D2 to the right. Shifts the one digit of the areas by D1 and D2 to the left.

5 5 3

3 7 7 5 5 5

D1, D2, n D1, D2, n D1, D2 D1, D2 D1, D2 D1, D2

: Not available partially

5-214
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

Name

Boolean

FP

FP0

rand

Description

FIFO instructions F115 FIFO buffer define P115 F116 Data read from P116 FIFO buffer F117 Data write into P117 FIFO buffer Basic function instructions F118 UP/DOWN counter

FIFT PFIFT FIFR PFIFR FIFW PFIFW UDC

n, D S, D

S, D

The n words beginning from D are defined in the buffer. The oldest data beginning from S that was written to the buffer is read and stored in D. The data of S is written to the buffer starting from D. Counts up or down from the value preset in S and stores the elapsed value in D. Shifts one bit to the left or right with the area between D1 and D2 as the register. Rotate the n bits in data of D to the right. Rotate the n bits in data of D to the left. Rotate the n bits in 17-bit area consisting of D plus the carry flag (R9009) data to the right. Rotate the n bits in 17-bit area consisting of D plus the carry flag (R9009) data to the left. Rotate the number of bits specified by n of the double words data (32 bits) specified by (D+1, D) to the right. Rotate the number of bits specified by n of the double words data (32 bits) specified by (D+1, D) to the left. Rotate the number of bits specified by n of the double words data (32 bits) specified by (D+1, D) to the right together with carry flag (R9009) data. Rotate the number of bits specified by n of the double words data (32 bits) specified by (D+1, D) to the left together with carry flag (R9009) data.

5 5 5

S, D

F119

Left/right shift register

LRSR

D1, D2

Data rotate instructions F120 16-bit data right P120 rotate F121 16-bit data left P121 rotate F122 16-bit data right P122 rotate with carry flag (R9009) data F123 16-bit data left P123 rotate with carry flag (R9009) data F125 32-bit data right P125 rotate

ROR PROR ROL PROL RCR PRCR RCL PRCL DROR PDROR

D, n D, n D, n

5 5 5

D, n

D, n

F126 P126

32-bit data left rotate

DROL PDROL

D, n

F127 P127

32-bit data right rotate with carry flag (R9009) data

DRCR PDRCR

D, n

F128 P128

32-bit data left rotate with carry flag (R9009) data

DRCL PDRCL

D, n

Bit manipulation instructions F130 16-bit data bit set P130 F131 16-bit data bit P131 reset F132 16-bit data invert P132 F133 16-bit data bit test P133

Set the value of bit position n of the data of D to 1. D, n Set the value of bit position n of the data of D to 0. D, n Invert the value of bit position n of the data of D. D, n Test the value of bit position n of the data of D and output the result to R900B. F135 Number of on (1) BCU S, D Store the number of on bits in the P135 bits in 16-bit data PBCU data of S in D. : Available, : Not available, : Not available partially

BTS PBTS BTR PBTR BTI PBTI BTT PBTT

D, n

5 5 5 5 5

5-215
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Num -ber

Name

Boolean

FP

FP0

rand

Description

F136 P136

The time (allowable scan time for the system) of watching dog timer is changed to S 0.1 (ms) for that scan. D1, D2 Updates the I/O from the number specified by D1 to the number specified by D2. F144 Serial data TRNS S, n The COM port received flag (R9038) is communicaset to off to enable reception. tion control Beginning at S, n bytes of the data registers are sent from the COM port. F145 Data send SEND S1, S2, Sends the data to another station in the P145 PSEND D, N network (MEWNET). (via link unit) F146 Data receive RECV S1, S2, Receives the data to another station P146 PRECV N, D in the network (MEWNET). (via link unit) F145 Data send SEND S1, S2, Sends the data to the slave station as P145 D, N the MOD bus master. (via COM port) F146 Data receive RECV S1, S2, Receives the data from the slave station P146 N, D as the MOD bus master. (via COM port) F145 Data send SEND S1, S2, Sends the data to the slave station of the P145 D, N MOD bus master, type II. F146 Data receive RECV S1, S2, Receives the data from the slave station P146 N, D of the MOD bus master, type II. F145 Data send SEND S1, S2, Sends the data to the slave station as P145 D, N the MEWTOCOL master. (via COM port) F146 Data receive RECV S1, S2, Receives the data from the slave station P146 N, D as the MEWTOCOL master. (via COM port) F147 Printout PR S, D Converts the ASCII code data in the area starting with S for printing, and outputs it to the word external output relay WY specified by D. F148 SelfERR n Stores the self-diagnostic error number P148 diagnostic PERR (n: k100 n in (DT9000), turns R9000 on, and error set to K299) turns on the ERROR LED. F149 Message MSG S Displays the character constant of S in P149 display PMSG the connected programming tool. : Available, : Not available, : Not available partially *1) The instruction is available for FP0 T32 type (V2.3 or later). *2) This instruction is available for FP-X V1.20 or later and FP 32k type. *3) This instruction is available for FP-X V2.50 or later and FP V3.20 or later. *4) This instruction is available for FP0 V1.20 or later.

Number of DBCU on (1) bits in PDBCU 32-bit data Basic function instruction F137 Auxiliary STMR timer (16-bit) Special instructions F138 Hours, minHMSS P138 utes and sec- PHMSS onds to seconds data F139 Seconds to SHMS P139 hours, PSHMS minutes and seconds data F140 Carry flag STC P140 (R9009) set PSTC F141 Carry flag CLC P141 (R9009) reset PCLC F142 Watching WDT P142 dog timer PWDT update F143 Partial I/O IORF P143 update PIORF

S, D

Store the number of on bits in the data of (S+1, S) in D.

S, D

Turn on the specified output and R900D after 0.01 s set value. Converts the hour, minute and second data of (S+1, S) to seconds data, and the converted data is stored in (D+1, D). Converts the seconds data of (S+1, S) to hour, minute and second data, and the converted data is stored in (D+1, D). Turns on the carry flag (R9009). Turns off the carry flag (R9009).

S, D

*1

S, D

*1

1 1 3

*4

9 9 9 9 9 9 9 9
*2 *2 *3 *3 *2 *2 *3 *3 *2 *2

3 13

5-216
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

F150 P150 F151 P151 F152 P152 F153 P153 F155 P155 F156 P156 F157 P157

Data read from intelli-gent unit Data write into intelli-gent unit Data read from MEWNET-F slave station Data write into MEWNET-F slave station Sampling Sampling trigger Time addition

READ PREAD WRT PWRT RMRD PRMRD RMWT PRMWT SMPL PSMPL STRG PSTRG CADD PCADD

S1, S2, n, D S1, S2, n, D S1, S2, n, D S1, S2, n, D -

Reads the data from the intelligent unit. Writes the data into the intelligent unit. Reads the data from the intelligent unit at the MEWNET-F (remote I/O) slave station. Writes the data into the intelligent unit at the MEWNET-F (remote I/O) slave station. Starts sampling data. When the trigger of this instruction turns on, the sampling trace stops. The time after (S2+1, S2) elapses from the time of (S1+2, S1+1, S1) is stored in (D+2, D+1, D). The time that results from subtracting (S2+1, S2) from the time (S1+2, S1+1, S1) is stored in (D+2, D+1, D). This is used to send data to an external device through the specified CPU COM port or MCU COM port. Data is received from external equipment via the COM port of the specified MCU.

9 9 9

*3 *3

9 1 1

*5 *5

*4 *4

S1, D

S2,

*1

F158 P158

Time substruction

CSUB PCSUB

S1, D

S2,

*1

F159 P159

Serial port communication

MTRN PMTRN

S, n, D

FP2
*2 *2

Ope-

*2

F161 P161

MCU serial port reception

MRCV PMRCV

S, D2

D1,

*2

BIN arithmetic instruction F160 Double word DSQR S, D P160 (32-bit) data PDSQR (S)(D) square root High speed counter/Pulse output instruction for FP0, FP-e F0 High-speed MV S, Performs high-speed counter and counter and DT9052 Pulse output controls according Pulse output to the control code specified by controls S. The control code is stored in DT9052. 1 Change and DMV S, Transfers (S+1, S) to high-speed read of the DT9044 counter and Pulse output elapsed elapsed value value area. of high-speed DT9044, Transfers value in high-speed counter and D counter and Pulse output elapsed Pulse output value area to (D+1, D). F166 High-speed HC1S n, S, Yn Turns output Yn on when the counter output elapsed value of the built-in highset (with speed counter reaches the target channel value of (S+1, S). specification)

11

: Available, : Not available, : Not available partially *1) The instruction is available for FP0 T32 type (V2.3 or later). *2) The instruction is available for FP2/FP2SH Ver. 1.5 or later, and the pulse execution type can be specified. FP10SH cannot be used. *3) This instruction is available for FP Ver. 2.0 or later. *4) This instruction is only available for FP-X Ver.2.0 or later. *5) This instruction is available for FP Ver. 3.10 or later.

5-217
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

Name

Boolean

Operand

Description

F167

F168

Outputs a positioning pulse from the specified output (Y0 or Y1) according to the contents of the data table beginning at S. F169 PLS S, n Outputs a pulse from the specified output (Y0 or Y1) according to the contents of the data table beginning at S. F170 PWM output (with PWM S, n Performs PWM output from the channel specified outptu (Y0 or Y1) specification) according to the contents of the data table beginning at S. High speed counter/Pulse output instruction for FP0R F0 High-speed MV S, Performs high-speed counter counter and Pulse DT90052 and Pulse output controls output controls according to the control code specified by S. The control code is stored in DT90052. F1 Change and read DMV S, Transfers (S+1, S) to high-speed of the elapsed DT90300 counter and Pulse output value of highelapsed value area (DT90045, speed counter DT90044). and Pulse output DT90300 Transfers value in high-speed ,D counter and Pulse output elapsed value area (DT90045, DT90044) to (D+1, D). F165 Cam control CAM0 S Controls cam operation (on/off patterns of each cam output) according to the elapsed value of the high-speed counter. F166 Target value much HC1S n, S, D Turns output Yn on when the on (with channel elapsed value of the high-speed specification) counter or pulse output reaches (High-speed the target value of (S+1, S). counter control/Pulse output control) F167 Target value much HC1R n, S, D Turns output Yn off when the off (with channel elapsed value of the high-speed specification) counter or pulse output reaches (High-speed the target value of (S+1, S). counter control/Pulse output control) F171 Pulse output (JOG SPDH S, n Positioning pulses are output positioning type from the specified channel, in 0/1) (Trapezoidal accordance with the contents of control) the data table that starts with S. F172 Pulse output (JOG PLSH S, n Pulse strings are output from the operation 0 and 1) specified output, in accordance with the contents of the data table that starts with S. F173 PWM output (with PWMH S, n PWM output is output from the channel specified output, in accordance specification) with the contents of the data table that starts with S.

High-speed counter output reset (with channel specification) Positioning control (with channel specification) Pulse output (with channel specification)

HC1R

n, S, Yn

Turns output Yn off when the elapsed value of the built-in highspeed counter reaches the target value of (S+1, S).

11

SPD1

S, n

11

11

5-218
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

Number

Name

Boo-lean

Operand

Description

F174

F175

Pulse output (Selectable data table control operation ) Pulse output (Linear interpolation)

SP0H

S, n

SPSH

S, n

F176

Pulse output (Circular interpolation)

SPCH

S, n

F177

Pulse output (Home return) Input pulse measurement (No. of pulses, cycle for input pulses)

HOME

S, n

F178

PLSM

S1, S2, D

Outputs the pulses from the specified channel according to the data table specified by S. Pulses are output from channel, in accordance with the designated data table, so that the path to the target position forms a straight line. Pulses are output from channel, in accordance with the designated data table, so that the path to the target position forms an arc. Performs the home return according to the specified data table. Measures the number of pulses and cycle of pulses to be input to the high-speed counter of the specified channel.

5-219
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

Number

Name

Boolean

Operand

Description

High speed counter/Pulse output instruction for FP/FP-X F0 High-speed MV S, DT90052 Performs high-speed counter counter and and Pulse output controls Pulse output according to controls the control code specified by S. The control code is stored in DT90052. F1 Change and read DMV FP: Transfers (S+1, S) to high-speed of the elapsed S, DT90044 counter and Pulse output value of highFP-X: elapsed value area (DT90045, speed counter S, DT90300 DT90044). and Pulse output FP: Transfers value in high-speed DT90044, D counter and Pulse output FP-X: elapsed value area (DT90045, DT90300, D DT90044) to (D+1, D). F166 Target value HC1S n, S, D Turns output Yn on when the much on (with elapsed value of the built-in channel high-speed counter reaches the specification) target value of (S+1, S). F167 Target value HC1R n, S, D Turns output Yn off when the much off (with elapsed value of the built-in channel high-speed counter reaches the specification) target value of (S+1, S). F171 Pulse output SPDH S, n Positioning pulses are output (with channel from the specified channel, in specification) accordance with the contents of (Trapezoidal the data table that starts with S. control and home return) F172 Pulse output PLSH S, n Pulse strings are output from the (with channel specified output, in accordance specification) with the contents of the data (JOG operation) table that starts with S. F173 PWM output PWMH S, n PWM output is output from the (with channel specified output, in accordance specification) with the contents of the data table that starts with S. F174 Pulse output SP0H S, n Outputs the pulses from the (with channel specified channel according to specification) the (Selectable data data table specified by S. table control operation ) : Available, : Not available, : Not available partially *1) The elapsed value area differs depending on used channels.

11

11

5-220
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

FP

FP0

FP2

Num -ber

FP

FP0

Name

Boolean

rand

Description

F175

Pulse output (Linear interpolation) Pulse output (Circular interpolation)

SPSH

S, n

F176

SPCH

S, n

Pulses are output from channel, in accordance with the designated data table, so that the path to the target position forms a straight line. Pulses are output from channel, in accordance with the designated data table, so that the path to the target position forms an arc. Register the screen displayed on the FP-e. Specify the screen to be displayed on the FP-e.

*3

*3

Screen display instructions F180 FP-e screen SCR display registration F181 FP-e screen DSP display switching Basic function instruction F182 Time FILTR constant processing F183 Auxiliary DSTM timer (32-bit) Data transfer instructions F190 Three 16-bit MV3 P190 data move PMV3 F191 Three 32-bit DMV3 P191 data move PDMV3 Logic operation instructions F215 32-bit data DAND P215 AND PDAND F216 P216 F217 P217 32-bit data OR 32-bit data XOR DOR PDOR DXOR PDXOR

S1, S2, S3, S4 S

S1, S2, S3, D S, D

Executes the filter processing for the specified input. Turn on the specified output and R900D after 0.01 s. set value. (S1)(D), (S2)(D+1), (S3)(D+2) (S1+1, S1)(D+1, D), (S2+1, S2)(D+3, D+2), (S3+1, S3)(D+5, D+4) (S1+1, S1) AND (S2+1, S2)(D+1, D) (S1+1, S1) OR (S2+1, S2)(D+1, D) {(S1+1, S1) AND {(S1+1, S1) S2)}(D+1, D) {(S1+1, S1) AND {(S1+1, S1) S2)}(D+1, D) {(S1+1, S1) AND {(S2+1, S2) S3)}(D+1, D) (S2+1, S2)} OR AND (S2+1, (S2+1, S2)} OR AND (S2+1, (S3+1, S3)} OR AND (S3+1,

*5

*4

FP2
*1 *1

Ope-

*7

S1, S2, S3, D S1, S2, S3, D

10

16

S1, S2, D S1, S2, D S1, S2, D

12

12

F218 P218 F219 P219

32-bit data XNR

DXNR PDXNR

S1, S2, D S1, S2, S3, D

12

Double word DUNI (32-bit) data PDUNI unites Data conversion instructions F230 Time data TMSEC P230 second PTMSEC conversion F231 Second SECTM P231 data time PSECTM conversion

16

S, D

S, D

The specified time data ( a date and time) is changed to the second data. The specified second data is changed into time data (a date and time).

*2

*6

*1

*2

*6

*1

: Available, : Not available, : Not available partially *1) This instruction is available for FP2/FP2SH Ver. 1.5 or later.FP10SH cannot be used. *2) This instruction is available for FP 32k type. *3) This instruction is available for FP C32T2, C28P2, C32T2H and C28P2H. *4) This instruction is only available for FP-X Ver.2.0 or later. *5) This instruction is available for FP Ver. 3.10 or later. *6) This instruction is available for FP-X Ver. 1.13 or later. *7) This instruction is available for FP10SH Ver. 3.10 or later.

5-221
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

F235 P235 F236 P236 F237 P237 F238 P238 F240 P240 F241 P241 F250 F251 F252

16-bit binary data Gray code conversion 32-bit binary data Gray code conversion 16-bit gray code binary data conversion 32-bit gray code binary data conversion Bit line to bit column conversion Bit column to bit line conversion Binary data ASCII conversion ASCII binary data conversion

GRY PGRY DGRY PDGRY GBIN PGBIN DGBIN PDGBIN COLM PCOLM LINE PLINE BTOA ATOB

S, D S, D

S, D S, D S, n, D S, n, D S1, S2, n, D S1, S2, n, D S1, S2, n S1, S2 S1, S2, D S, D S1, S2, D S1, S2, D S1, S2, D S1, S2, S3, D

Converts the 16-bit binary data of S to gray codes, and the converted result is stored in the D. Converts the 32-bit binary data of (S+1, S) to gray code, and the converted result is stored in the (D+1, D). Converts the gray codes of S to binary data, and the converted result is stored in the D. Converts the gray codes of (S+1, S) to binary data, and the converted result is stored in the (D+1, D). The values of bits 0 to 15 of S are stored in bit n of (D to DC+15). The values of bit n of (S) to (S+15) are stored in bits 0 to 15 of D. Converts multiple binary data to multiple ASCII data. Converts multiple ASCII data to multiple binary data. Checks the ASCII data strings to be used in F251 (ATOB) instruction. These instructions compare two specified character strings and output the judgment results to a special internal relay. These instructions couple one character string with another. These instructions determine the number of characters in a character string. The specified character is searched in a character string. These instructions retrieve a specified number of characters from the right side of the character string. These instructions retrieve a specified number of characters from the left side of the character string.

8 8 12

*1

12 10

*1 *3 *2

ASCII data ACHK check Character strings instructions F257 Comparing SCMP P257 character strings F258 P258 F259 P259 F260 P260 F261 P261 F262 P262 F263 P263 Character string coupling Number of characters in a character string Search for character string Retrieving data from character strings (right side) Retrieving data from character strings (left side) Retrieving a character string from a character string SADD LEN SSRC RIGHT

10

12 6 10

LEFT

These instructions retrieve a character string consisting of a specified number of characters from the specified position in the character string. F264 Writing a MIDW S1, These instructions write a specified P264 character string S2, D, number of characters from a to a character n character string to a specified string position in the character string. F265 Replacing SREP S, D, A specified number of characters in P265 character p, n a character string are rewritten, strings starting from a specified position in the character string. : Available, : Not available, : Not available partially *1) This instruction is available for FP 32k type. *2) This instruction is only available for FP-X Ver.2.0 or later. *3) This instruction is available for FP Ver. 3.10 or later.

MIDR

10

12

12

5-222
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

Integer type data processing instructions F270 Maximum MAX S1, P270 value (word PMAX S2, D data (16-bit))

F271 P271

Maximum value (double word data (32bit)) Minimum value (word data (16bit))

DMAX PDMAX

S1, S2, D

F272 P272

MIN PMIN

S1, S2, D

F273 P273

Minimum value (double word data (32-bit))

DMIN PDMIN

S1, S2, D

F275 P275

F276 P276

F277 P277

Total and mean values (word data (16bit)) Total and mean values (double word data (32-bit)) Sort (word data (16-bit))

MEAN PMEAN

S1, S2, D

DMEAN PDMEAN

S1, S2, D

SORT PSORT

S1, S2, S3

F278 P278

Sort (double word data (32bit))

DSORT PDSORT

S1, S2, S3

F282 P282 F283 P283 F284 P284

Scaling of 16-bit data Scaling of 32-bit data

SCAL PSCAL DSCAL PDSCAL

S1, S2, D S1, S2, D

Inclination RAMP S1, output of 16-bit S2, data S3, D Integer type non-linear function instructions F285 Upper and LIMT S1, P285 lower limit PLIMT S2, control S3, D (16-bit data)

Searches the maximum value in the word data table between the S1 and S2, and stores it in the D. The address relative to S1 is stored in D+1. Searches for the maximum value in the double word data table between the area selected with S1 and S2, and stores it in the D. The address relative to S1 is stored in D+2. Searches for the minimum value in the word data table between the area selected with S1 and S2, and stores it in the D. The address relative to S1 is stored in D+1. Searches for the minimum value in the double word data table between the area selected with S1 and S2, and stores it in the D. The address relative to S1 is stored in D+2. The total value and the mean value of the word data with sign from the area selected with S1 to S2 are obtained and stored in the D. The total value and the mean value of the double word data with sign from the area selected with S1 to S2 are obtained and stored in the D. The word data with sign from the area specified by S1 to S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first). The double word data with sign from the area specified b S1 ato S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first). The toutptu value Y is found for the input value X by performing scaling for the given data table. The toutptu value Y is found for the input value X by performing scaling for the given data table. Executes the linear output for the specified time from the specified initial value to the target value. When S1>S3, S1D When S1<S3, S2D When S1<or = S3<or = S2, S3D

*1

*1

*1

*1

*1

*1

*1

*1

*1

10

10

*2

*2

10

*1

: Available, : Not available, : Not available partially *1) This instruction is available for FP-e Ver.1.2 or later. *2) This instruction is only available for FP-X Ver.2.0 or later, and FP Ver. 3.10 or later.

5-223
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

F286 P286

Upper and lower limit control (32-bit data)

DLIMT PDLIMT

S1, S2, S3, D

F287 P287 F288 P288

Deadband control (16-bit data) Deadband control (32-bit data)

BAND PBAND DBAND PDBAND

S1, S2, S3, D S1, S2, S3, D

F289 P289 F290 P290

Zone control (16-bit data) Zone control (32-bit data)

ZONE PZONE DZONE PDZONE

S1, S2, S3, D S1, S2, S3, D

When (S1+1, S1)>(S3+1, S3), (S1+1, S1)(D+1, D) When (S2+1, S2)<(S3+1, S3), (S2+1, S2)(D+1, D) When (S1+1, S1)<or = (S3+1, S3)<or = (S2+1, S2), (S3+1, S3)(D+1, D) When S1>S3, S3S1D When S2<S3, S3S2D When S1<or = S3<or = S2, 0D When (S1+1, S1)>(S3+1, S3), (S3+1, S3)(S1+1, S1)(D+1, D) When (S2+1, S2)<(S3+1, S3), (S3+1, S3)(S2+1, S2)(D+1, D) When (S1+1, S1)<or = (S3+1, S3)<or = (S2+1, S2),0(D+1, D) When S3<0, S3+S1D When S3=0, 0D When S3>0, S3+S2D When (S3+1, S3)<0, (S3+1, S3)+(S1+1, S1)(D+1, D) When (S3+1, S3)=0, 0(D+1, D) When (S3+1, S3)>0, (S3+1, S3)+(S2+1, S2)(D+1, D)

16

*1

10

*1

16

*1

10

*1

16

*1

BCD type real number operation instructions F300 BCD type sine BSIN S, D SIN(S1+1, S1)(D+1, D) P300 operation PBSIN F301 BCD type BCOS S, D COS(S1+1, S1)(D+1, D) P301 cosine PBCOS operation F302 BCD type BTAN S, D TAN(S1+1, S1)(D+1, D) P302 tangent PBTAN operation F303 BCD type BASIN S, D SIN-1(S1+1, S1)(D+1, D) P303 arcsine PBASIN operation F304 BCD type BACOS S, D COS-1(S1+1, S1)(D+1, D) P304 arccosine PBACOS operation F305 BCD type BATAN S, D TAN-1(S1+1, S1)(D+1, D) P305 arctangent PBATAN operation Floating-point type real number operation instructions F309 Floating-point FMV S, D (S+1, S)(D+1, D) P309 type data move PFMV F310 Floating-point F+ S1, S2, (S1+1, S1)+(S2+1, S2)(D+1, D) P310 type data PF+ D addition F311 Floating-point FS1, S2, (S1+1, S1)(S2+1, S2)(D+1, D) P311 type data PFD subtraction F312 Floating-point F* S1, S2, (S1+1, S1)(S2+1, S2)(D+1, D) P312 type data PF* D multiplication F313 Floating-point F% S1, S2, (S1+1, S1)(S2+1, S2)(D+1, D) P313 type data PF% D division : Available, : Not available, : Not available partially *1) This instruction is available for FP-e Ver.1.2 or later. *2) This instruction is available for FP-e Ver.1.21 or later, FP0 V2.1 or later.

6 6

8 14

*2

*2

*2

*2

14

*2

*2

14

*2

*2

14

*2

*2

5-224
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

Name

Boolean

FP

FP0

rand

Description

F314 P314 F315 P315 F316 P316 F317 P317 F318 P318 F319 P319 F320 P320 F321 P321 F322 P322 F323 P323 F324 P324 F325 P325

Floating-point type data sine operation Floating-point type data cosine operation Floating-point type data tangent operation Floating-point type data arcsine operation Floating-point type data arccosine operation Floating-point type data arctangent operation Floating-point type data natural logarithm Floating-point type data exponent Floating-point type data logarithm Floating-point type data power Floating-point type data square root 16-bit integer data to floating-point type data conversion 32-bit integer data to floating-point type data conversion

SIN PSIN COS PCOS TAN PTAN ASIN PASIN ACOS PACOS ATAN PATAN LN PLN EXP PEXP LOG PLOG PWR PPWR FSQR PFSQR FLT PFLT

S, D S, D

SIN(S+1, S)(D+1, D) COS(S+1, S)(D+1, D)

10 10

*1

*1

*1

*1

S, D

TAN(S+1, S)(D+1, D)
10
*1 *1

S, D

SIN (S+1, S)(D+1, D)


10
*1 *1

-1

S, D

COS-1(S+1, S)(D+1, D)
10
*1 *1

S, D

TAN (S+1, S)(D+1, D)


10
*1 *1

-1

S, D

LN(S+1, S)(D+1, D)
10
*1 *1

S, D

EXP(S+1, S)(D+1, D)
10
*1 *1

S, D S1, S2, D S, D S, D

LOG(S+1, S)(D+1, D) (S1+1, S1) ^ (S2+1, S2)(D+1, D) (S+1, S)(D+1, D) Converts the 16-bit integer data with sign specified by S to real number data, and the converted data is stored in D. Converts the 32-bit integer data with sign specified by (S+1, S) to real number data, and the converted data is stored in (D+1, D). Converts real number data specified by (S+1, S) to the 16bit integer data with sign (the largest integer not exceeding the floating-point data), and the converted data is stored in D. Converts real number data specified by (S+1, S) to the 32bit integer data with sign (the largest integer not exceeding the floating-point data), and the converted data is stored in (D+1, D).

10 14 10

*1 *1 *1

*1 *1 *1

*1

*1

F326 P326

DFLT PDFLT

S, D

*1

*1

F327 P327

F328 P328

Floating-point type data to 16-bit integer con-version (the largest inte-ger not ex-ceeding the floating-point type data) Floating-point type data to 32-bit integer con-version (the largest inte-ger not ex-ceeding the floating-point type data)

INT PINT

S, D

*1

*1

DINT PDINT

S, D

*1

*1

: Available, : Not available, : Not available partially *1) This instruction is available for FP-e Ver.1.21 or later, FP0 V2.1 or later.

5-225
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

F329 P329

F330 P330

F331 P331

F332 P332

F333 P333

F334 P334

The decimal part of the real number data stored in (S+1, S) is rounded off, and the result is stored in (D+1, D). F335 F+/S, D The real number data stored in (S+1, P335 PF+/S) is changed the sign, and the result is stored in (D+1, D). F336 FABS S, D Takes the absolute value of real P336 PFABS number data specified by (S+1, S), and the result (absolute value) is stored in (D+1, D). F337 Floating-point RAD S, D The data in degrees of an angle P337 type data degree PRAD specified in (S+1, S) is converted to radian radians (real number data), and the result is stored in (D+1, D). F338 Floating-point DEG S, D The angle data in radians (real P338 type data radian PDEG number data) specified in (S+1, S) is degree converted to angle data in degrees, and the result is stored in (D+1, D). Floating-point type real number data processing instructions F345 Floating-point FCMP S1, (S1+1, S1)>(S2+1, S2) R900A: on P345 type data compare PFCMP S2 (S1+1, S1)=(S2+1, S2) R900B on (S1+1, S1)<(S2+1, S2) R900C: on F346 Floating-point FWIN S1, (S1+1, S1)>(S3+1, S3) R900A: on P346 type data band PFWIN S2, (S2+1, S2)<or =(S1+1, S1)<or compare S3 =(S3+1, S3) R900B on (S1+1, S1)<(S2+1, S2) R900C: on : Available, : Not available, : Not available partially *1) This instruction is available for FP-e Ver.1.21 or later, FP0 V2.1 or later.

Floating-point type data to 16-bit integer conversion (rounding the first decimal point down to integer) Floating-point type data to 32-bit integer conversion (rounding the first decimal point down to integer) Floating-point type data to 16-bit integer conversion (rounding the first decimal point off to integer) Floating-point type data to 32-bit integer conversion (rounding the first decimal point off to integer) Floating-point type data roundding the first decimal point down Floating-point type data roundding the first decimal point off Floating-point type data sign changes Floating-point type data absolute

FIX PFIX

S, D

Converts real number data specified by (S+1, S) to the 16-bit integer data with sign (rounding the first decimal point down), and the converted data is stored in D. Converts real number data specified by (S+1, S) to the 32-bit integer data with sign (rounding the first decimal point down), and the converted data is stored in (D+1, D). Converts real number data specified by (S+1, S) to the 16-bit integer data with sign (rounding the first decimal point off), and the converted data is stored in D. Converts real number data specified by (S+1, S) to the 32-bit integer data with sign (rounding the first decimal point off), and the converted data is stored in (D+1, D). The decimal part of the real number data specified in (S+1, S) is rounded down, and the result is stored in (D+1, D).

*1

*1

DFIX PDFIX

S, D

*1

*1

ROFF PROFF

S, D

*1

*1

DROFF PDROFF

S, D

*1

*1

FINT PFINT

S, D

*1

*1

FRINT PFRINT

S, D

*1

*1

*1

*1

*1

*1

*1

*1

*1

*1

10

14

5-226
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2

Ope-

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

F347 P347

Floating-point type data upper and lower limit control

FLIMT PFLIMT

S1, S2, S3, D

F348 P348

Floating-point type data dead-band control

FBAND PFBAND

S1, S2, S3, D

F349 P349

Floating-point type data zone control

FZONE PFZONE

S1, S2, S3, D

F350 P350

Floating-point type data maxi-mum value

FMAX PFMAX

S1, S2, D

F351 P351

Floating-point type data mini-mum value

FMIN PFMIN

S1, S2, D

F352 P352

Floating-point type data total and mean values

FMEAN PFMEAN

S1, S2, D

F353 P353

Floating-point type data sort

FSORT PFSORT

S1, S2, S3

F354 P354

Scaling of real number data

FSCAL PFSCAL

S1, S2, D

When (S1+1, S1)>(S3+1, S3), (S1+1, S1) (D+1, D) When (S2+1, S2)<(S3+1, S3), (S2+1, S2) (D+1, D) When (S1+1, S1)<or = (S3+1, S3)<or =(S2+1, S2), (S3+1, S3)(D+1, D) When (S1+1, S1)>(S3+1, S3), (S3+1, S3)(S1+1, S1)(D+1, D) When (S2+1, S2)<(S3+1, S3), (S3+1, S3)(S2+1, S2) (D+1, D) When (S1+1, S1)<or = (S3+1, S3)<or =(S2+1, S2), 0.0(D+1, D) When (S3+1, S3)<0.0, (S3+1, S3)+(S1+1, S1)(D+1, D) When (S3+1, S3)=0.0, 0.0 (D+1, D) When (S3+1, S3)>0.0, (S3+1, S3)+(S2+1, S2) (D+1, D) Searches the maximum value in the real number data table between the area selected with S1 and S2, and stores it in the (D+1, D). The address relative to S1 is stored in (D+2). Searches the minimum value in the real number data table between the area selected with S1 and S2, and stores it in the (D+1, D). The address relative to S1 is stored in (D+2). The total value and the mean value of the real number data from the area selected with S1 to S2 are obtained. The total value is stored in the (D+1, D) and the mean value is stored in the (D+3, D+2). The real number data from the area speciified by S1 to S2 are stored in ascending order (the smallest word is first) or descending order (the largest word is first). Scaling (linearization) on a real number data table is performed, and the output (Y) to an input value (X) is calculated.

17

17

17

12

*2

*3

*1

FP2

Ope-

*1

: Available, : Not available, : Not available partially *1) This instruction is available for FP2/FP2SH Ver. 1.5 or later. FP10SH cannot be used. *2) This instruction is available for FP 32k type. *3) This instruction is available for FP-X Ver. 1.13 or later.

5-227
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

Number

FP

FP0

Name

Boolean

rand

Description

Time series processing instruction F355 PID processing PID

F356

Eaay PID

EZPID

S1, S2, S3, S4 S, D

PID processing is performed depending on the control value (mode and parameter) specified by (S to S+2) and (S+4 to S+10), and the result is stored in the (S+3). Temperature control (PID) can be easily performed using the image of a temperautre controller. If the data in the 16-bit area specified by S has changed since the previous execution, internal relay R9009 (carry flag) will turn on. D is used to store the data of the previous execution. If the data in the 32-bit area specified by (S+1, S) has changed since the previous execution, internal relay R9009 (carry flag) will turn on. (D+1, D) is used to store the data of the previous execution. Index register (I0 to ID) bank number change over. Index register (I0 to ID) bank number change over with remembering preceding bank number. Changes index register (I0 to ID) bank number back to the bank before F411 (CHGB)/P411 (PCHGB) instruction. File register bank number change over. File register bank number change over with remembering preceding bank number. Changes file register bank number back to the bank before F415 (CBFL)/P415 (PCBFL) instruction.

*3

10

*2

*2

Compare instructions F373 16-bit data P373 revision detection

DTR PDTR

F374 P374

32-bit data revision detection

DDTR PDDTR

S, D

Index register bank processing instructions F410 Setting the SETB n P410 index regis-ter PSETB bank number F411 Changing the CHGB n P411 index regis-ter PCHGB bank number F412 P412 Restoring the index regis-ter bank number POPB PPOPB -

File register bank processing instructions F414 Setting the file SBFL n P414 register bank PSBFL number F415 Changing the CBFL n P415 file register PCBFL bank number F416 Restoring the PBFL P416 file register PPBFL bank number

FP2

Ope-

*1

*1

*1

: Available, : Not available, : Not available partially *1) This instruction is not available for FP10SH. *2) This instruction is available for FP-X V.1.20 or later, and FP 32k type. *3) This instruction is available for FP0 V2.1 or later.

5-228
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP2SH/FP10SH

Steps

FP0R

FP-X

FP-e

5.4 Table of Error codes


Difference in ERROR display
There are differences in the way errors are displayed depending on the model. Model Display Display method FP1,FP-M,FP2,FP3,FP10SH LED ERROR. Continually lit FP,FP0, FP0R, FP-X LED ERROR/ALARM Flashes/contunually lit FP-e Screen display ERR. Continually lit

Error Confirmation When ERROR Turns ON


When the ERROR on the control unit (CPU unit) turns on or flashes, a self-diagnostic error or syntax check error has occurred. Confirm the contents of the error and take the appopriate steps. -Error Confirmation Method Procedure:1.Use the programming tool software to call up the error code. By executing the STATUS DISPLAY, the error code and content of error are displayed. 2.Check the error contents in the table of error codes using the error code ascertained above. -Syntax check error This is an error detected by the total check function when there is a syntax error or incorrect setting written in the program. When the mode selector is switched to the RUN mode, the total check function automatically activates and eliminates the possibility of incorrect operation from syntax errors in the program. When a syntax check error is detected -ERROR turns on or flashes.

-Operation will not begin even after swirching to the RUN mode.
-Remote operation cannot be used to change to RUN mode. Clearing a syntax check error By changing to the PROG.mode, the error will clear and the ERROR will turn off. Steps to take for syntax error Change to the PROG. mode, and then execute the total check function while online mode with the programming tool connected. This will call up the content of error and the address where the error occurred. Correct the program while referring to the content of error.

5-229
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

-Self-diagnostic Error This error occurs when the control unit (CPU unit) self-diagnostic function detects the occurrence of an abnormality in the system. The self-diagnostic function monitors the memory abnormal detection, I/O abnomal detection, and other devices. When a self-diagnostic error occurs - The ERROR turns on or flashes. - The operation of the control unit (CPU unit) might stop depending on the contect of error and the system register setting. - The error codes will be stored in the special data register DT9000(DT90000). - In the case of operation error, the error address will stored in the DT9017(DT90017) and DT9018(DT90018). Clearing the self-diagnostic error At the STATUS DISPLAY, execute the error clear. Error codes 43 and higher can be cleared. -You can use the initialize/test switch to clear an error. However, this will also clear the contents of operation memory. -Errors can also be cleared by turning off and on the power while in the PROG.mode. However, the contents of operation memory, not stored with the hold type data, will also be cleared. -The error can also be cleared depending on the self-diagnostic error set instruction F148(ERR). Steps to take for self-diagnostic error The steps to be taken will differ depending on the error contents. For more details, use the error code obtained above and consult the table of aself-diagnostic error codes.

MEWTOCOL-COM Transmission Errors


These are error codes from a PC or other computer device that occur during an abnormal response when communicating with a PLC using MEWTOCOL-COM.

5-230
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Table of Syntax Check Error


Description and steps to take FP-e FP0 FP2SH A A A A A

FP0R

FP-X

FP

Name

E1

Syntax error

Stops

E2
(Note)

Duplicated output error

Stops

E3

Not paired error

Stops

E4

Parameter mismatch error

Stops

E5
(Note)

Program area error

Stops

A program with a syntax error has been written. Change to PROG. mode and correct the error. Two or more OT(Out) instructions and KP(Keep) instructions are programmed using the same relay.Also occurs when using the same timer/counter number. Change to PROG. mode and correct the program so that one relay is not used for two or more OT instructions,Or, set the duplicated output to enable in system register20. A timer/counter instructon double definition error will be detected even if double output permission has been selected. For instructions which must be used in a pair such as jump (JP and LBL), one instruction is either missing or in an incorrect position. Change to PROG. mode and enter the two instructions which must be used in a pair in the correct positions. An instruction has been written which does not agree with system register settings. For example, the number setting in a program does not agree with the timer/counter range setting. Change to PROG. mode, check the system register settings, and change so that the settings and the instruction agree. An instruction which must be written in a specific area (main program area or subprogram area) has been written to a different area (for example, a subroutine SUB to RET is placed before an ED instruction). Change to PROG. mode and enter the instruction into the correct area.

A:Available Note) This error is also detected if you attempt to execute a rewrite containing a syntax error during RUN. In this case, nothing will be written to the CPU and operation will continue.

5-231
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A A A

FP2

Error code

Operation status

FP0R

FP-X

FP

Name

Description and steps to take FP-e FP0

E6

Compile memory full error

Stops

E7

High-level instruction type error

Stops

The program is too large to compile in the program memory. Change to PROG. mode and reduce the total number of steps for the program. -FP10SH If memory expansion is possible,compilation will become possible when the memory is expanded. In the program, high-level instructions, which execute in every scan and at the leading edge of the trigger, are programmed to be triggered by one contact. (e.g. F0 (MV) and P0 (PMV) are programmed using the same trigger continuously.) Correct the program so that the high-level instructions executed in every scan and only at the leading edge are triggered separately. There is an incorrect operand in an instruction which requires a specific combination operands (for example, the operands must all be of a certain type). Enter the correct combination of operands. Program may be damaged. Try to send the program again. When inputting with the programming tool software,a delection,addition or change of order of an instruction(ED,LBL,SUB,RET,INT,IRET,SSTP ,and STPE) that cannot perform a rewrite during RUN is being attempted. Nothing is written to the CPU.

E8

E9

High-level instruction operand combination error No program error Rewrite during RUN syntax error

Stops

Stops

E10

Continues

A:Available

5-232
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A A A

FP2SH

FP2

Error code

Operation status

Table of Self-Diagnostic Error


Description and steps to take FP-e FP0 FP2SH A A A A

FP0R

FP-X

FP

Name

E20 E21 E22 E23 E24 E25

CPU error RAM error1 RAM error2 RAM error3 RAM error4 RAM error5 Master memory model unmatch error

Stops

Probably a hardware abnormality Please contact your dealer.

Stops

Probably an abnormality in the internal RAM. Please contact your dealer.

E25

Stops

The models of master memories are different. Use the master memories created with the same model. FP-e,FP0,FP0R,FP,and FP1 C14,C16:Probably a hardware abnormality. Please contact your dealer. FP-X: When the master memory cassette is mounted, the master memor cassette may be damaged. Remove the master memory, and check whether the ERROR turns off. When the ERROR turned off, rewrite the master memory as its contents are damaged, and use it again. When the ERROR does not turn off, please contact your dealer. FP1 C24,C40,C56,C72,and FP-M: Probably an abnormality in the memory unit Program the memory unit again and try to operate. If the same error is detected, try to operate with another memory unit. FP2,FP2SH,FP10SH,and FP3: There may be a problem with the installed ROM. -ROM is not installed. -ROM contens are damaged. -Program size stored on the ROM is larger than the capacity of the ROM Check the contents of the ROM Units installed exceed the limitations.(i.e.,4 or more link units) Turn off the power and re-configure units referring to the hardware manual. Probably an abnormality in the system register. Check the system register setting or initialize the system registers.

A
*1 )

E26

Users ROM error

Stops

E27

Unit installation error System register error

Stops

E28

Stops

*1) This error occurs on FP-X Ver2.0 or later.

A:Available

5-233
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A A

FP2

Error code

Operation status

FP0R

FP-X

FP

Description and steps to take FP-e FP0

E29

E30

Configuration parameter error Interrupt error 0 Interrupt error 1

Stops

A parameter error was detected in the MEWNET-W2 configuration area. Set a correct parameter. Probably a hardware abnormality. Please contact your dealer. An interrupt occurred without an interrupt request . A hardware problem or error due to noise is possible. Turn off the power and check the noise conditions. There is no interrupt program for an interrupt which occurred. Check the number of the interrupt program and change it to agree with the interrrupt request.. This error occurs when a FP3/FP10SH is used as CPU2 for a multi-CPU system. Refer to Multi-CPU system Manual. An abnormal unit is installed. -FP, FP0R(FP0R mode),FP-X, FP2,FP2SH and FP10SH: Check the contents of special data register DT90036 and locate the abnormal unit.Then turn off the power and replace the unit with a new one. -FP3: Check the contents of special data register DT9036 and locate the abnormal unit. Then turn off the power and replace the unit with a new one. A unit, which cannot be installed on the slave station of the MEWNET-F link system,is installed on the slave station. Remove the illegal unit from the slave station. The number of slots or I/O points used for MEWNET-F(remote I/O) system exceeds the limitation. Re-configure the system so that the number of slots and I/O points is within the specified range. I/O overlap or I/O setting that is over the range is detected in the allocated I/O and MEWNET-F I/O map. Re-configure the I/O map correctly

Stops

E31

Stops

FP2SH A A A A A A A A

Name

E32

Interrupt error 2 Multi-CPU data unmatch error

Stops

E33

CPU2 Stops

E34

I/O status error

Stops

E35

MEWNET-F slave illegal unit error MEWNET-F (remore I/O) limitation error MEWNET-F I/O mapping error

Stops

E36

Stops

E37

Stops

A:Available

5-234
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A A A A A

FP2

Error code

Operation status

FP0R

FP-X

FP

Description and steps to take FP-e FP0

E38

MEWNET-F slave I/O terminal mapping error

Stops

E39

IC card read error

Stops

E40

I/O error

Selectable

I/O mapping for remote I/O terminal boards,remote I/O terminal units and I/O link is not correct. Re-configure the I/O map for slave stations according to the I/O points of the slave stations. When reading in the program from the IC memory card(due to automatic reading because of the dip switch setting or program switching due to F14(PGRD) instruction): - IC memory card is not installed. - There is no program file or it is damaged. - Writing is disabled. - There is an abnormality in the AUTOEXEC.SPG file. - Program size stored on the card is larger than the capacity of the CPU. Install an IC memory card that has the program proterly recorded and execute the read once again. Abnormal I/O unit. FP, FP-X: Check the contents of special data register DT90002 and abnormal FP expansion unit (application cassette for FP-X). Then check the unit. FP2 and FP2SH: Check the contents of special data registers DT90002,DT90003 and abnormal I/O unit.Then check the unit. Selection of operation status using system register21: -to continue operation,set 1 -to stop operation,set 0 Verification is possible in FPWIN GR/Pro atI/O error in the status display function. MEWNET-TR communication error FP3 and FP10SH: Check the contents of special data registers(FP3:DT9002,DT9003,FP10SH:DT9 0002,DT90003) and the erroneous master unit and abnormal I/O unit. Then check the unit. Selection of operation status using system register21: -to continue operation,set 1 -to stop operation,set 0 Verification is possible in FPWIN GR/Pro atI/O error in the status display function.

FP2SH A A

Name

A:Available

5-235
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH

FP2

Error code

Operation status

FP0R

FP-X

FP

Name

Description and steps to take FP-e FP0

E41

Intelligent unit error

Selectable

E42

I/O unit verify error

Selectable

An abnormality in an intelligent unit. FP, FP-X: Check the contetns of special data register DT90006 and locate the abnormal FP intelligent unit (application cassette for FP-X). FP2,FP2SH,and FP10SH: Check the contents of special data registers DT90006,DT90007 and locate the abnormal intelligent unit.Then check the unit referring to its manual.. Selection of operation status using system register22: -to continue operation,set 1 -to stop operation,set 0 FP3: Check the contents of special data registers DT9006,DT9007 and locate the abnormal intelligent unit.Then check the unit referring to its manual.. Selection of operation status using system register22: -to continue operation,set 1 -to stop operation,set 0 Verification is possible in FPWIN GR/Pro atI/O error in the status display function. I/O unit(Expansion unit) wiring condition has changed compared to that at time fo powerup. Check the contents of special data register (FP0: DT9010, FP, FP-X: DT90010,DT90011) and locate the erroneous expansion unit. It checks whether an expansion connector is in agreement. Check the contents of special data register (FP2,FP2SH,and FP10SH:DT90010,DT90011,FP3 DT9010,DT9011) Selection of operation status using system register23: -to continue operation,set 1 -to stop operation,set 0 Verification is possible in FPWIN GR/Pro atI/O error in the status display function.

A:Available

5-236
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH

FP2SH

FP2

Error code

Operation status

FP0R

FP-X

FP

Name

Description and steps to take FP-e FP0

E43

System watching dog timer error

Selectable

Scan time required for program execution exceeds the setting of the system watching dog timer. Check the program and modify it so that the program can execute a scan within the specified time. Selection of operation status using system register24: -to continue operation,set 1 -to stop operation,set 0 The time required for slave station connection exceeds the setting of the system register 35. Selection of operation status using system register25: -to continue operation,set 1 -to stop operation,set 0 Operation became impossible when a highlevel instruction was executed. Selection of operation status using system register26: -to continue operation,set K1 -to stop operation,set K0 The address of operation error can be confirmed in either special data registers DT9017 and DT9018, or DT90017 and DT90018. (It varies according to the model to be used.) DT9017, DT9018: FP-e, FP0, FP0R(FP0 mode) DT90017, DT90018: FP, FP-X, FP0R(FP0R mode), FP2, FP2SH, FP10SH Verification is possible in FPWIN GR/Pro atI/O error in the status display function.

E44

Slave staiton connecting time error for MEWNET-F system

Selectable

E45

Operation error

Selectable

A:Available

5-237
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A

FP2SH

FP2

Error code

Operation status

FP0R

FP-X

FP

Name

Description and steps to take FP-e FP0

Selectable

E46

Remote I/O communication error Selectable

E47

MEWNET-F attribute error

Selectable

S-LINK error Occurs only in FP0-SL1 When one of the S-LINK errors (ERR1, 3 or 4) has been deteced,error code E46 (remote I/O (S-LINK) communication error) is stored. Selection of operation status using system register27: -to continue operation,set K1 -to stop operation,set K0 MEWNET-F communication error A communication abnormally was caused by a transmission cable or during the powerdown of a slave station. FP2, FP2SH, and FP10SH: Check the contents of special data registers DT90131 to DT90137 and locate the abnormal slave station and recover the communication condition. FP3: Check the contents of special data registers DT9131 to DT9137 and locate the abnormal slave station and recover the communication condition. Selection of operation status using system register27: -to continue operation,set K1 -to stop operation,set K0 In the unit on the slave station, an abnormallty such as: -missing unit -abnormal intelligent unit was detected. FP2, FP2SH, and FP10SH: Check the contents of special data registers DT90131 to DT90137 and locate the abnormal slave station and recover the slave condition. FP3: Check the contents of special data registers DT9131 to DT9137 and locate the abnormal slave station and recover the slave condition. Selection of operation status using system register28: -to continue operation,set 1 -to stop operation,set 0 The power supply for the expansion unit was turned on after the control unit. Turn on the power supply for the expansion unit at the same time or before the control unit is turend on. The voltage of the backup battery lowered or the backup battery of conrol unit is not installed. Check the installation of the backup battery and then replace battery if necessary. By setting the system register 4, you can disregard this self-diagnostic error.

E49

Expansion unit power supply sequence error Backup battery errror

Stops

E50

Continues

5-238
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A

FP2SH

FP2

Error code

Operation status

FP0R

FP-X

FP

Description and steps to take FP-e FP0

E51

MEWNET-F terminal station error MEWNET-F I/O update synchronous error Multi-CPU I/O registration error (CPU2 only) IC memory card backup battery error IC memory card backup battery error Incompatible IC memory card error No unit for the configuration Selfdiagnostic error set by F148 (ERR)/P148 (PERR) instruction

Continues

E52

Continues

Terminal station setting was not properly performed. Check stations at both ends of the communication path,and set them in the terminal station using the dip switches. Set the INITIALIZE/TEST selecto1inmjvbgycfrde892 r to the INITIALIZE position while keeping the mode selector in the RUN position.If the same error occurs after this,please contact your dealer.

FP2SH A A A A A A

Name

E53

Continues

Abnormality was detected when the multiCPU system ws used. Please contact your dealer.

E54

Continues

E55

Continues

The voltage of the backup battery for the IC memory card lowered. The BATT.LED does not turn on. Charge or replace the backup battry of IC memory card.(The contents of the IC memory card cannot be guaranteed.) The voltage of the backup battery for IC memory card lowers.The BATT.LED does not turn on. Charge or replace the backup battery of IC memory card. (The contents of the IC memory card cannot be guaranteed.) The IC memory card installed is not compatible. Replace the IC memory card compatible with FP2SH/FP10SH. MEWNET-W2/MCU The MEWNET-W2 link unit or MCU(Multi communication unit) is not installed in the slot specified using the configuration data. Either install a unit in the specified slot or change the parameter. The error specified by the F148 (ERR)/P148(PERR) instruction is occurred. Take steps to clear the error condition according to the specification you chose.

E56

Continues

E57

Continues

E100 to E199 E200 to E299

Stop

Continues

A:Available

5-239
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

FP10SH A A A A A A

FP2

Error code

Operation status

Table of MEWTOCOL-COM Communication Error

Error code !21 !22 !23 !24 !25 !26 !27 !28 !29 !30 !32 !33 !36 !38 !40 !41 !42 !43 !50 !51 !52 !53 !60 !61 !62 !63

Name

Description

NACK error WACK error Unit No. overlap Transmission format error Link unit hardware error Unit No. setting error No support error No response error Buffer closed error Time-out error Transmission impossible error Communication stop No destination error Other communication error BCC error Format error No support error Multiple frames procedure error Link setting error Transmission time-out error Transmit disable error Busy error Parameter error Data error Registration over error PC mode error

Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error Link system error A transfer error occurred in the received data. A command was received that does not fit the format. A command was received that is not supported. A different command was received when processing multiple frames. A route number that does not exist was spacified. Verify the route number by designating the transmission station. Transmission to anather device not possible because transmissition buffer is congested. Transmission processing to another device is not possible.(Link unit runaway,etc.) Command process cannot be received because of multiple frame processing.Or,cannot be received because command being processed is congested. Content of spacified parameter does not exist or cannot be used. There was a mistake in the contact,data area,data number desigination,size designation,range,or format designation. Operation was does when number of registrations was exceeded

or when there was no registration.


PC command that cannot be processed was executed during RUN mode.

5-240
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Error code

Name

Description

!64

External memory error

!65

Protect error

!66

Address error No program error and No data error Rewrite during RUN error SIM over error Exclusive access control error

!67

!68 !70 !71

An abnormality occurred when loading RAM to ROM/IC memory card.There may be a problem with the ROM or IC memory card. -When loading,the specified contents exceeded the capacity. -Write error occurs. -ROM or IC memory card is not installed. -ROM or IC memory card does not conform to specifications -ROM or IC memory card board is not installed. A program or system register write operation was executed when theb protect mode (password setting or DIP switch,etc.)or ROM operation mode was being used. There was an error in the code format of the address data. Alsi.when exceeded or insufficient of address data,there was a mistake in the range designation. Cannot be read because there is no program in the program area or the memory contains an error.Or,reading was attempted of data that was not registered. When inputting with programming tool software,editing of an instruction (ED,SUB,RET,INT,IRET,SSTP,and STPE) that cannot perform a rewrite during RUN is being attempted. Nothing is written to the CPU. Program area was exceeded during a program write process. A command that cannot be processed was executed at the same time as a command being processed.

5-241
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.5 MEWTOCOL-COM Communication Commands


Table of MEWTOCOL-COM commands Command name Read contact area Code RC (RCS) (RCP) (RCC) Description Reads the on and off status of contact. - Specifies only one point.

- Specifies multiple contacts. - Specifies a range in word units.


Turns contacts on and off.

Write contact area Read data area Write data area Read timer/counter set value area Write timer/counter set value area Read timer/counter ellapsed value area Write timer/counter elapsed value area Register or Reset contacts monitored Register or Reset data monitored Monitoring start Preset contact area (fill command) Preset data area (fill command) Read system register Write system register Read the status of PLC Remote control Abort

WC (WCS) (WCP) (WCC)


RD WD RS WS RK WK MC MD MG SC SD RR WR RT RM AB

- Specifies only one point. - Specifies multiple contacts. - Specifies a range in word units.
Reads the contents of a data area. Writes data to a data area. Reads the value set for a timer/counter. Writes a timer/counter setting value. Reads the timer/counter elapsed value. Writes the timer/counter elapsed value. Registers the contact to be monitored. Registers the data to be monitored. Monitors a registered contact or data using the code MC or MD. Embeds the areaof a specified range in a 16point on and off pattern. Writes the same contents to the data area of a specified range. Reads the contents of a system register. Specifies the contents of a system register. Reads the specifications of the programmable controller and error codes if an error occurs. Switches the operation mode of the programmable controller. Aborts communication.

5-242
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.6 Hexadecimal/Binary/BCD
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 . . . 63 . . . 255 . . . 9999 Hexadecimal 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F . . . 003F . . . 00FF . . . 270F Binary data 00000000 00000000 00000000 00000001 00000000 00000010 00000000 00000011 00000000 00000100 00000000 00000101 00000000 00000110 00000000 00000111 00000000 00001000 00000000 00001001 00000000 00001010 00000000 00001011 00000000 00001100 00000000 00001101 00000000 00001110 00000000 00001111 00000000 00010000 00000000 00010001 00000000 00010010 00000000 00010011 00000000 00010100 00000000 00010101 00000000 00010110 00000000 00010111 00000000 00011000 00000000 00011001 00000000 00011010 00000000 00011011 00000000 00011100 00000000 00011101 00000000 00011110 00000000 00011111 . . . 00000000 00111111 . . . 00000000 11111111 . . . 00100111 00001111 BCD data (Binary Coded Decimal) 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0010 0000 0000 0000 0011 0000 0000 0000 0100 0000 0000 0000 0101 0000 0000 0000 0110 0000 0000 0000 0111 0000 0000 0000 1000 0000 0000 0000 1001 0000 0000 0001 0000 0000 0000 0001 0001 0000 0000 0001 0010 0000 0000 0001 0011 0000 0000 0001 0100 0000 0000 0001 0101 0000 0000 0001 0110 0000 0000 0001 0111 0000 0000 0001 1000 0000 0000 0001 1001 0000 0000 0010 0000 0000 0000 0010 0001 0000 0000 0010 0010 0000 0000 0010 0011 0000 0000 0010 0100 0000 0000 0010 0101 0000 0000 0010 0110 0000 0000 0010 0111 0000 0000 0010 1000 0000 0000 0010 1001 0000 0000 0011 0000 0000 0000 0011 0001 . . . 0000 0000 0110 0011 . . . 0000 0010 0101 0101 . . . 1001 1001 1001 1001

5-243
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5.7 ASCII Codes

5-244
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

5-245
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Record of changes

Record of changes
Manual No.
ARCT1F313E/ ACGM313E ARCT1F313E1/ ACGM313E1 ARCT1F313E2/ ACGM313E2 ARCT1F313E3/ ACGM313E3 ARCT1F313E4/ ACGM313E4 ARCT1F313E5/ ACGM313E5

Date
MAR. 2000 MAY. 2000 SEPT. 2000 JUNE. 2003

Description of Changes
First edition 2nd edition 3rd edition 4th edition Additions FPSIGMA FPe

JUL. 2003 JUL. 2004

5th edition 6th edition Addition & New programming ICTL, F4, F159, F161, F230, F231, F354

ARCT1F313E6/ ACGM313E6 ARCT1F313E7/ ACGM313E7 ARCT1F313E8/ ACGM313E8 ARCT1F313E9/ ACGM313E9

AUG. 2004 OCT. 2004

7th edition PDF only 8th edition PDF only

JUL. 2005

9th edition PDF only

OCT. 2005

10th edition PDF only Addition & New programming STF, ANF, ORF, F145, F146, F356 Addition FPSIGMA 32K Type

ARCT1F313E10/ ACGM313E10

DEC. 2005

11th edition PDF only Addition: FPSIGMA 32K Type Chapter 1 & 8 SYS1 Chapter 4.8, 4.9, 4.10

ARCT1F313E11/ ACGM313E11 ARCT1F313E12/ ACGM313E12 ARCT1F313E13/ ACGM313E13 ARCT1F313E14/ ACGM313E14 ARCT1F313E15/ ACGM313E15 ARCT1F313E16/ ACGM313E16 ARCT1F313E17/ ACGM313E17

JUL. 2006

12th edition Addition: FPX transistor type New programming: F182, F252, F284

JUL. 2006 SEPT. 2006 MAR. 2007

13th edition 14th edition 15th edition

JAN. 2008 MAY. 2009

16th edition 17th edition

JUL. 2009

18th edition

R1
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Record of changes

R2
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

You might also like