
8.2 Details
3-329
1
8
Chapter 8 Programming Examples
Coding
Application of DIFU, DIFD Instructions
■ One-shot circuit using differentiate instruction
When input relay 0000 turns ON/OFF, output relay 0500 and 0501 turns ON one-
shot (1 second).
Timing diagram
Ladder diagram Coding
➮
Refer to p. 3-78.
Application of KEEP instruction
■ Detection of chewing gum packs
Detects chewing gum packs over the carton using the proximity switch ES Series
(0001 to 0003). If the switch detects that one or more packs of chewing gum are
missing, output relay 0500 turns ON for 1 s.
The timing clock is generated from the visible beam photoelectric switch PZ2 (0000).
Line No. Instruction Operand Line No. Instruction Operand
0000 LDB 0001 0012 CON
0001 C 000 #09999 0000 0013 ANB 2011
0002 LD 2002 0014 ANB 0500
0003 LDA C000 0015 OUT 0501
0004 CON 0016 MPP
0005 MPS 0017 CMP #02999
0006 CMP #00999 0018 CON
0007 CON 0019 ANB 2011
0008 ANB 2011 0020 ANB 0500
0009 OUT 0500 0021 ANB 0501
0010 MRD 0022 OUT 0502
0011 CMP #01999
1000
0000
1S
1001
0500
0501
1S
1001
0501
0501
#00010
T002
T002
0000
1000
DIFU
1001
DIFD
1000
0500
0500
#00010
T001
T001
Line No. Instruction Operand
0000 LD 0000
0001 DIFU 1000
0002 DIFD 1001
0003 LD 1000
0004 OR 0500
0005 ANB T001
0006 OUT 0500
0007 TMR 001 #00010
0008 LD 1001
0009 OR 0501
0010 ANB T002
0011 OUT 0501
0012 TMR 002 #00010
Gum
Reflector (R-2)
Proximity Switch ES Series
ON OFF ON
PZ2-61
Chewing
gum pack
Chewing
gum pack
Gum
Gum
Gum
Gum
Gum
Gum
Gum
ES Series
KVNKA Chap 08.p65 08.3.11, 0:12 PM329
Comentários a estes Manuais