EasyManuals Logo

Siemens Simatic S7-200 CPU 210 User Manual

Siemens Simatic S7-200 CPU 210
140 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #51 background imageLoading...
Page #51 background image
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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7-200 CPU 210 and is the answer not in the manual?

Siemens Simatic S7-200 CPU 210 Specifications

General IconGeneral
Digital Inputs6
Digital Outputs4
Program Memory2 KB
Data Memory1 KB
Timers128
Counters128
Analog Inputs0
Analog Outputs0
Communication Ports1 x RS-485
Power Supply24 V DC
TypeCPU

Related product manuals