Siemens Simatic S7-200 System Manual page 59

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Entering Your Program in Statement List
The Statement List (STL) Editor is a free-form text editor which allows a certain degree of
flexibility in the way you choose to enter program instructions. Figure 3-22 shows an
example of a statement list program.
STL Editor - project1.ob1
STL
//Conveyor Line Program
NETWORK 1
LD
"Start1"
AN
"E-Stop1"
=
Q0.0
Network 2
LD
I0.1
O
I0.3
R
Q0.0, 1
NETWORK 3
MEND
Figure 3-22
To enter an STL program, follow these guidelines:
To be able to view an STL program in ladder, you must divide segments of code into
separate networks by entering the keyword NETWORK. (Network numbers are
generated automatically after you compile or upload the program.) The Network
declarations must come at appropriate boundaries for ladder representation.
Start each comment with a double slash (//). Each additional comment line must also
begin with a double slash.
End each line with a carriage return.
Separate each instruction from its address or parameter with a space or tab.
Do not use a space between the operand type and the address (for example, enter I0.0,
not I 0.0).
Separate each operand within an instruction with a comma, space, or tab.
Use quotation marks when entering symbol names. For example, if your symbol table
contains the symbol name Start1 for the address I0.0, enter the instruction as follows:
LD "Start1"
Compiling the Program
After completing a network or series of networks, you can check the syntax of your code by
selecting the menu command CPU
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
Installing and Using the STEP 7-Micro/WIN Software
//Start Motor:
//When I0.0 is on
//and I0.1 is not on,
//then turn on conveyor motor.
//E-stop Conveyor:
//When E-stop 1 is on
//or when E-stop 2 is on,
//turn off conveyor motor.
//End of Program
STL Editor Window with Sample Program
Compile or by clicking the Compile button.
To allow viewing of the
program in Ladder,
divide segments of
code with the keyword
NETWORK.
3-29

Advertisement

Table of Contents
loading

Table of Contents