Professional Documents
Culture Documents
B.4
Storage area
empty
Storage area
not empty
Storage area
50% full
Storage area
90% full
(Q 12.0)
(Q 12.1)
(Q 15.2)
(Q 15.3)
Packages in
I 12.0
Temporary
storage area
for 100
packages
Conveyor belt 1
(Q 15.4)
I 12.1
Packages out
Conveyor belt 2
Photoelectric barrier 1
B-10
Storage area
Filled to capacity
Photoelectric barrier 2
Programming Examples
Ladder Logic Program that Activates the Indicator Lamps on the Display Panel
Network 1: Counter C1 counts up at each signal change from 0 to 1 at input CU
and counts down at each signal change from 0 to 1 at input CD. With a signal
change from 0 to 1 at input S, the counter value is set to the value PV. A signal
change from 0 to 1 at input R resets the counter value to 0. MW200 contains
the current counter value of C1. Q12.1 indicates storage area not empty.
C1
S_CUD
I 12.0
CU
Q 12.1
I 12.1
CD
I 12.2
S
C#10
CV
MW210
R CV_BCD
MW200
PV
I 12.3
Q 12.1
Q 12.1
Network 3: If 50 is less than or equal to the counter value (in other words if the
current counter value is greater than or equal to 50), the indicator lamp for storage
area 50% full is lit.
CMP
<= I
50
IN1
MW210
IN2
Q 15.2
Network 4: Network 4: If the counter value is greater than or equal to 90, the
indicator lamp for storage area 90% full is lit.
CMP
>= I
MW210
IN1
90
IN2
Q 15.3
B-11
Programming Examples
Network 5: If the counter value is greater than or equal to 100, the indicator lamp
for storage area full is lit.
Q 15.4
CMP
>= I
B.5
MW210
IN1
100
IN2
DB1
OPN
Network 2: Input word IW0 is added to shared data word DBW3 (data block must
be defined and opened) and the sum is loaded into memory word MW100. MW100
is then multiplied by 15 and the answer stored in memory word MW102. MW102 is
divided by MW0 with the result stored in MW4.
MUL_I
ADD_I
EN
IW0
IN1
DBW3
IN2
B-12
ENO
OUT
EN
MW100
IN1
15
IN2
MW100
DIV_I
ENO
OUT
EN
MW102
IN1
MW0
IN2
MW102
ENO
OUT
MW4