Siemens Simatic S7-200 CPU 210 System Manual page 51

Table of Contents

Advertisement

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
STL
NETWORK 1
LD
I0.3
LDW>=
T0, +600
A
I0.2
OLD
S
M0.1, 1
S
Q0.3, 1
R
M0.2, 1
NETWORK 2
LDN
I0.0
ON
I0.1
A
I0.2
AN
M0.1
AW>=
T2, +900
S
M0.2, 1
NETWORK 3
LD
M0.2
TON
T0, +0
NETWORK 4
LD
I0.2
S
M0.0, 1
TON
T2, +0
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
NETWORK 6
LDN
I0.2
LDN
I0.0
ON
I0.1
ALD
A
SM0.5
ED
R
M0.0, 1
NETWORK 7
LDN
I0.2
LDN
I0.0
ON
I0.1
ALD
A
SM0.5
EU
S
M0.0, 1
NETWORK 8
LD
M0.0
=
Q0.0
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Sample Program in Statement List
Description
// if (the panic alarm has been turned on)
// or (if the alert timer is >= 60 seconds
//
// then
// set High Level Alarm bit
// set Modem Dialer bit
// reset Low Level Alarm bit
// 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
// if the low-level alert bit has been set,
// then start the alert timer
// when the system is armed
// set the LED bit
// and start the exit timer
// 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
// 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
// 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
// if the LED bit has been set
// turn on the LED output
Getting Started with a Sample Program
and the system is armed)
3-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents