
B-63983EN/02 4.LADDER LANGUAGE
- 223 -
Format
Fig. 4.4.1 (a) shows the ladder format and Table 4.4.1 shows the
mnemonic format.
CN0
W1
¡¡¡¡.¡
UPDOWN
SUB 5
CTR
RST
¡¡¡¡.¡
CT
¡¡¡¡.¡
¡¡¡¡
.¡
¡¡¡
¡¡¡¡
.¡
Countup output
Control condition
Counter
number
Fig. 4.4.1 (a) Format of CTR instruction
Table 4.4.1 Mnemonic of CTR instruction
Mnemonic format Memory status of control condition
Step
number
Instruction
Address
No.
Bit No. Remarks ST3 ST2 ST1 ST0
1RD ¡¡¡¡ .¡ CN0 CN0
2 RD. STK ¡¡¡¡ .¡ UPDOWN CN0 UPDOWN
3 RD. STK ¡¡¡¡ .¡ RST CN0 UPDOWN RST
4 RD. STK ¡¡¡¡ .¡ ACT CN0 UPDOWN RST ACT
5 SUB 5 CTR instruction
6(PRM) ¡¡¡ Counter number
7WRT ¡¡¡¡ .¡ Countup output W1
Control conditions
(a) Specify the initial value. (CN0)
CN0 = 0: Begins the value of the counter with 0.
0, 1, 2, 3, ....., n.
CN0 = 1: Begins the value of the counter with 1 (0 is not used).
1, 2, 3, ....., n.
(b) Specify up or down counter. (UPDOWM)
UPDOWN = 0:
Up counter. The counter begins with 0 when CN0 = 0;
1 when 1.
UPDOWN = 1:
Down counter. The counter begins with the preset value.