3-11
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Table 3-2 provides a listing of the STL program for the sample program. This program
includes the control logic from Section 3.2. The program ends with the End instruction
(MEND).
Table 3-2
Sample Program in Statement List
STL
Description
NETWORK 1
LD
I0.3
LDW>= T0, +600
A
I0.2
OLD
S
M0.1, 1
S
Q0.3, 1
R
M0.2, 1
// if (the panic alarm has been turned on)
// or (if the alert timer is >= 60 seconds
// and the system is armed)
// then
// set High Level Alarm bit
// set Modem Dialer bit
// reset Low Level Alarm bit
NETWORK 2
LDN
I0.0
ON
I0.1
A
I0.2
AN
M0.1
AW>=
T2, +900
S
M0.2, 1
// if zone 1 is open
// or if zone 2 is open
// and the system is armed
// and the high-level alarm bit is not set
// and the exit timer is less than 90 seconds
// then set the low-level alert bit
NETWORK 3
LD
M0.2
TON
T0, +0
// if the low-level alert bit has been set,
// then start the alert timer
NETWORK 4
LD
I0.2
S
M0.0, 1
TON
T2, +0
// when the system is armed
// set the LED bit
// and start the exit timer
NETWORK 5
LDN
I0.2
EU
AN
I0.3
R
M0.0, 1
R
M0.1, 1
R
M0.2, 1
R
Q0.3, 1
// if the system is not armed
// and the panic alarm is not on
// then
// reset LED bit
// reset High Level Alarm bit
// reset Low Level Alarm bit
// reset Modem Dialer
NETWORK 6
LDN
I0.2
LDN
I0.0
ON
I0.1
ALD
A
SM0.5
ED
R
M0.0, 1
// if the system is not armed
// and if zone 1 is open
// or zone 2 is open
// and
// using the 1/2 second counter SM bit
// on the negative edge
// reset the LED bit
NETWORK 7
LDN
I0.2
LDN
I0.0
ON
I0.1
ALD
A
SM0.5
EU
S
M0.0, 1
// if the system is not armed
// and if zone 1 is open
// or zone 2 is open
// and
// using the 1/2 second counter SM bit
// on the positive edge
// set the LED bit
NETWORK 8
LD
M0.0
=
Q0.0
// if the LED bit has been set
// turn on the LED output
Getting Started with a Sample Program
Summary of Contents for Simatic S7-200 CPU 210
Page 10: ...x S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Contents ...
Page 116: ...A 16 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 CPU 210 Data Sheets ...
Page 126: ...F 2 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 CPU 210 Order Numbers ...
Page 138: ...Index 12 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Index ...