Putting The Control Logic Into A Program - Siemens Simatic S7-200 CPU 210 System Manual

Table of Contents

Advertisement

3.3

Putting the Control Logic into a Program

After you have designed the control logic for your application, you arrange the instructions
into a program. You can choose either STL or ladder for your program.
Figure 3-11 provides a listing of the ladder program for the sample program. This program
includes the control logic from Section 3.2. The program ends with the End instruction.
Network 1
I0.3
T0
>=I
+600
Network 2
I0.0
/
I0.1
/
Network 3
M0.2
Network 4
I0.2
Figure 3-11 Home Security Program Example in Ladder
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Sound the alarm!
M0.1
S
1
I0.2
Q0.3
S
1
M0.2
R
1
Evaluate the system status.
I0.2
M0.1
T2
/
>=I
+900
Start the Alert timer.
T0
IN
TON
+0
PT
If the system is armed, then set the lamp bit and start the exit timer.
M0.0
S
1
T2
IN
TON
+0
PT
Getting Started with a Sample Program
M0.2
S
1
(Continued)
3-9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents