206 208
206 208
206 208
B.4
Packages in
I 12.0
I 12.1
Packages out
B-10
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 CU I 12.1 CD I 12.2 S C#10 I 12.3 R CV_BCD MW200 PV CV MW210 Q
I 12.0
Q 12.1
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 MW210 IN1 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 90 IN1 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.
CMP >= I MW210 100 IN1 IN2
Q 15.4
B.5
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.
B-12