3.11 Programming the Sample Conguration
Operating principle
The state of the sensors connected to inputs I512.0 , I513.0 and I514.0 is looked up and
analyzed. I512.0 increments an internal counter and I513.0 decrements it. Input I514.0 resets
the counter to zero.
Depending on the counter reading, the outputs A512.0, A513.0 and A514.0 are set or deleted.
Q512.0 is set when the count is 0. At a count < 3, Q514.0 is set and at ≥ 3, Q513.0 is set.
Programming
Switch to the component view with View > Component view.
Navigate to the block OB1 via SIMATIC 400(1), CPU 410-5H, S7 program (1) and blocks. Double-
click it and conrm the dialog with OK.
Enter the following STL program:
STL Explanation
A I 514.0 If button 514.0 is active,
R C 0 set counter to 0
A I 512.0 If BERO 512.0 is active,
CU C 0 increment by 1
A I 513.0 If BERO 513.0 is active,
CD C 0 decrement by 1
AN C 0 Is counter = 0 ?
= Q 512.0 YES, then output 512.0 is active
L C 0 Load counter in ACCU
L 3 Charge 3 in the ACCU
>=I Is counter => 3 ?
= Q 513.0 YES, then output 513.0 is active
<I Is counter < 3 ?
= Q 514.0 Yes, then output 514.0 is active
Save the program with File > Save and load it in the CPU with PLC > Load.
Commissioning guideline
3.11 Programming the Sample Conguration
ET 200iSP
54 Operating Instructions, 11/2022, A5E00247483-AK