Panasonic FP PLC Manual

1336
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

Transcript of Panasonic FP PLC Manual

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

Table of ContentsChapter 11.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 - 74i

1.2

1.3

1.4

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

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 22.1

Basic Instructions2-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 33.1

Highlevel Instructions3-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 44.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

iiCTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5165iiiCTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

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

ivCTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

Table of Contents

Basic InstructionsSequence basic instructionsST 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 instructionsMC 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 instructionsSSTP 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 instructionsCALL FCAL SUB RET Subroutine call . . . . . . . . . 2 86 Output off type subroutine call . . . . . . . . . 2 89 Subroutine entry . . . . . . . . 2 86 Subroutine return . . . . . . . 2 86

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

Basic function instructionsTML TMR Ondelay timer TML . . . . 2 36 Ondelay timer TMR . . . . 2 42

vCTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]

Table of Contents

Special setting instructionsSYS1 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 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 instructionsST= ST ST> ST>= ST< ST= 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 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= OR< OR 32bit data compare (OR) . . . . . . . . . . . . . . . . . 2 150

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

ORD 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