
B-63983EN/02 4.LADDER LANGUAGE
- 261 -
4.6.2 COMP (Comparison: SUB 15)
Compares input and comparison values. The value type in this
instruction is BCD.
Format
Fig. 4.6.2 shows the ladder format and Table 4.6.2 shows the
mnemonic format.
COMP
SUB 15
BYT
CT
¡¡¡¡.¡
W1
¡¡¡¡.¡
Specification of input data format (constant or address)
Input data
Comparison data address
Comparison result output
Control condition
¡¡¡¡.¡
¡
¡¡¡¡
¡¡¡¡
Fig. 4.6.2 Format of COMP instruction
Table 4.6.2 Mnemonic of COMP instruction
Mnemonic format Status of operation result
Step
number
Instruction
Address
No.
Bit No. Remarks ST3 ST2 ST1 ST0
1RD ¡¡¡¡ .¡ BYT BYT
2 RD. STK ¡¡¡¡ .¡ ACT BYT ACT
3 SUB 15 COMP instruction
4(PRM) ¡ Specification of input data format
5(PRM) ¡¡¡¡ Input data
6(PRM) ¡¡¡¡ Comparison data address
7WRT ¡¡¡¡ .¡ Comparison result output W1