EasyManua.ls Logo

Siemens S5-100U - Program Structure

Siemens S5-100U
512 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
Loading...
Introduction to STEP 5 S5-100U
Example: Hard-Wired Control
A signal lamp (H1) is supposed to light up when a normally open contact (S1) is acti-
vated and a normally closed contact (S2) is not activated.
Programmable Control
The signal lamp is connected to an output (i.e., Q 1.0). The signal voltages of the two
contacts are connected to two programmable controller inputs (i.e., I 0.0 and I 0.1).
The S5-100U scans to see if the signal voltages are present (signal state “1” at the
activated normally open contact or non-activated normally closed contact). Both signal
states are combined through logic AND. The result of logic operation (RLO) is assigned
to output Q 1.0 (the lamp lights).
Q 1.0
Circuit Diagram STL CSF LAD
A I 0.0
A I 0.1
= Q 1.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.1
&
( )
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.1
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Q 1.0
S1
S2
H1
7.2 Program Structure
An S5-100U program can be one of the two following types:
Linear
Structured
Sections 7.2.1 and 7.2.2 describe these program types.
7.2.1 Linear Programming
Programming individual operations in one section (block) is sufficient for handling simple automation
jobs. For the S5-100U, this is organization block 1 (see section 7.3.1). The S5-100U scans this
block cyclically. After the S5-100U scans the last statement, it goes back to the first statement and
begins scanning again. Please note the following rules:
When OB1 is called, five words are assigned to the block header in the program memory (see
section 7.3).
Normally, a statement takes up one word in the program memory.
Two-word statements also exist (e.g., with the operation “Load a constant”). Count these
statements twice when calculating the program length.
Like all blocks, OB1 must be terminated by a Block End statement (BE).
7-4
EWA 4NEB 812 6120-02

Table of Contents

Related product manuals