
2.4 Instruction Details
3-74
2
Chapter 2 Instructions
0001
2009
0000
#09999
C002
2002
0500
#01000
CMP
2009 0501
#02000
CMP
2009
0502
#03000
CMP
C002
LDA
Applications of C (counter) instruction
■ Long-duration timer
Sets a long-duration timer by combining a timer and a counter.
Output 0500 turns ON in 1 hour.
Coding
➮
"1.3.7 Special Utility Relays" (p. 3-12)
■ Accumulator timer (Remains ON in case of power failure)
Coding
■ Large capacity counter
Coding
■ Multi-level setting
Sets a multi-level counter using arithmetic instructions.
Outputs in 3 different levels according to the current counter value.
Current counter value
• 1000 or more ➞ 0500 turns ON.
• 2000 or more ➞ 0501 turns ON.
• 3000 or more ➞ 0502 turns ON.
➮
"2.4.3 Arithmetic Instructions" (p. 3-134)
0000
2006
#03600
C002
C002
0500
Special utility relay
(1-second clock)
Line No. Instruction Operand
0000 LDB 0000
0001 C 002 #03600 2006
0002 LD C002
0003 OUT 0500
0001 C001
2006
#03600
C001
0001
1000
#00600
C002
C001
1000
Line No. Instruction Operand
0000 LDB 0001
0001 ANB C001
0002 C 001 #03600 2006
0003 LD C001
0004 OUT 1000
0005 LDB 0001
0006 C 002 #00600 1000
0002 C000
0000
#10000
C000
0002
1000
#65535
C001
C000
1000
Line No. Instruction Operand
0000 LDB 0002
0001 ANB C001
0002 C 001 #10000 0000
0003 LD C000
0004 OUT 1000
0005 LDB 0002
0006 C 001 #65535 1000
C
KVNKA Chap 02_4aP.p65 08.3.11, 11:58 AM74
Komentáře k této Příručce