CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]
Views 99 Downloads 0 File size 9MB
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 Contents Chapter 1
Relays, Memory Areas and Constants
1.1
Table of Relays, Memory Areas and Constants . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.1 FP0/FP−e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.2 FP0R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 7 1.1.3 FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 9 1.1.4 FP−X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
1.2
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Σ, FP−X, 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) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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.3
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Σ/FP−X/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, FP−e) . . . . . . . . . . . . . . . . . . . . . 1.3.10 Index Registers (I0 to ID) (for FPΣ/FP−X/FP0R) . . . . . . . . . . . . . . 1.3.11 Index Registers (I0 to ID) (for FP2, FP2SH and FP10SH) . . . . . .
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.4
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 - 72 1 - 72 1 - 73 1 - 74 i
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 2
Basic Instructions
2.1
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
High−level Instructions
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
2-3 2-3 2-4 2-4 2-5
3-3 3-3 3-4 3-5 3-6
Precautions Concerning Programs
4.1
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
4.2
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
4.3
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.4
Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15 4.4.1 Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 15
4 - 10 4 - 10 4 - 11 4 - 13
ii CTi 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
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
4.5
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
4.7
Precautions for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 27
4.8
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.9
Processing During Forced Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 32 4.9.1 Processing when forced input/output is initiated during RUN . . . . 4 - 32
4 - 28 4 - 28 4 - 29 4 - 31
4.10 Second Program Area (FP2SH, FP10SH) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 34
Chapter 5
Appendix
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 iii CTi 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 . . . . . . . . . . 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
Record of changes
............................................... R-1
iv CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]
Table of Contents
Basic Instructions Sequence basic instructions
TMX
On−delay timer TMX . . . . 2 − 42
ST
Start . . . . . . . . . . . . . . . . . . . 2 − 8
TMY
On−delay timer TMY . . . . 2 − 42
ST/
Start Not . . . . . . . . . . . . . . . 2 − 8
CT
Counter . . . . . . . . . . . . . . . 2 − 48
OT
Out . . . . . . . . . . . . . . . . . . . . 2 − 8
SR
Shift register . . . . . . . . . . . 2 − 54
/
Not . . . . . . . . . . . . . . . . . . . 2 − 10
AN
AND . . . . . . . . . . . . . . . . . . 2 − 11
AN/
AND Not . . . . . . . . . . . . . . 2 − 11
OR
OR . . . . . . . . . . . . . . . . . . . 2 − 12
OR/
OR Not . . . . . . . . . . . . . . . . 2 − 12
ST↑
Leading edge start . . . . . . 2 − 14
ST↓
Trailing edge start . . . . . . 2 − 14
AN↑
Leading edge AND . . . . . 2 − 14
AN↓
Trailing edge AND . . . . . . 2 − 14
OR↑
Leading edge OR . . . . . . . 2 − 14
OR↓
Trailing edge OR . . . . . . . 2 − 14
OT↑
Leading edge out . . . . . . . 2 − 16
OT↓
Trailing edge out . . . . . . . 2 − 16
ALT
Alternative out . . . . . . . . . 2 − 18
ANS
AND stack . . . . . . . . . . . . . 2 − 19
ORS
OR stack . . . . . . . . . . . . . . 2 − 21
PSHS
Push stack . . . . . . . . . . . . 2 − 23
RDS
Read stack . . . . . . . . . . . . 2 − 23
POPS
Pop stack . . . . . . . . . . . . . 2 − 23
DF
Leading edge differential 2 − 26
Subroutine instructions
DF/
Trailing edge differential . 2 − 26
CALL
Subroutine call . . . . . . . . . 2 − 86
DFI
Leading edge differential (initial execution type) . . . 2 − 30
FCAL
Output off type subroutine call . . . . . . . . . 2 − 89
SET
Set . . . . . . . . . . . . . . . . . . . 2 − 32
SUB
Subroutine entry . . . . . . . . 2 − 86
RST
Reset . . . . . . . . . . . . . . . . . 2 − 32
RET
Subroutine return . . . . . . . 2 − 86
KP
Keep . . . . . . . . . . . . . . . . . 2 − 34
NOP
No operation . . . . . . . . . . . 2 − 35
Control instructions MC
Master control relay . . . . . 2 − 57
MCE
Master control relay end . 2 − 57
JP
Jump . . . . . . . . . . . . . . . . . 2 − 61
LBL
Label . . . . . . . . . . 2 − 61, 2 − 64
LOOP
Loop . . . . . . . . . . . . . . . . . . 2 − 64
BRK
Break . . . . . . . . . . . . . . . . . 2 − 68
ED
End . . . . . . . . . . . . . . . . . . . 2 − 70
CNDE
Conditional end . . . . . . . . 2 − 71
EJECT Eject . . . . . . . . . . . . . . . . . . . 2 −73
Step ladder instructions SSTP
Start step . . . . . . . . . . . . . . 2 − 75
NSTL
Next step . . . . . . . . . . . . . . 2 − 75
NSTP
Next step . . . . . . . . . . . . . . 2 − 75
CSTP
Clear step . . . . . . . . . . . . . 2 − 75
STPE
Step end . . . . . . . . . . . . . . 2 − 75
SCLR
Clear multiple processes 2 − 85
Interrupt instructions INT
Interrupt . . . . . . . . 2 − 91. 2 − 97
Basic function instructions
IRET
Interrupt return . . 2 − 91, 2 − 97
TML
On−delay timer TML . . . . 2 − 36
ICTL
Interrupt control 2 − 102, 2 − 110
TMR
On−delay timer TMR . . . . 2 − 42 v
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]
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 high−speed counter operation mode . . . . . . . 2 − 129
STF>
Floating point real number data comparison: (Start) . . . . 2 − 140
STF>= Floating point real number data comparison: (Start) . . . . 2 − 140 STF
=
16−bit data compare (AND) . . . . . . . . . . . . . . . . 2 − 142
AN
=
16−bit data compare (Start) . . . . . . . . . . . . . . . . 2 − 136
ST
32−bit data compare (AND) . . . . . . . . . . . . . . . . 2 − 144
AND>= 32−bit data compare (AND) . . . . . . . . . . . . . . . . 2 − 144 AND
STD
= Floating point real number data comparison: (AND) . . . . 2 − 146
32−bit data compare (Start) . . . . . . . . . . . . . . . . 2 − 138
Floating point real number data comparison: (AND) . . . . 2 − 146
STD=
16−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 148
OR
= 32−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 150 ORD
= Floating point real number data comparison: (OR) . . . . . 2 − 152 ORF