S7 stl

goxx

Member
Join Date
Jan 2005
Posts
84
i'm trying to translate some STL language to Ladder to make it easier for the fellas (and me) to read to cut down on downtime, when needed. i work at a printing company, need books out the door NOW NOW NOW. anyhow, i am being thrown off by the "or" bit right after the "set" bit, i don't understand why this isn't another network, starting with an "and" bit. this one network has over 15 coils in it. here is what i am looking at:

A I 8.0
AN Q 19.5
S Q 19.4
O M 130.0
A Q 19.4
A Q 18.3
O I 8.1
= M 130.1
O M 130.1
O I 7.2
R Q 19.4
A M 130.1
AN M 130.2
= M 130.3
A M 130.3
S M 130.2

my limited knowledge of S7 tells me this should be 5 networks, but this, plus more, is under one network. how does this look in ladder? i tried to translate under VIEW, but it won't work. this is just a short sample, i would appreciate any help. thanks in advance!
 
Hello goxx;
Your ffeling is right, STL allows the programmer to programm what would be successive Ladder network in a single block. It is confuing at the beginning, but you get used to it (and there are advantages, amongst them compactness).
Since it does not follow the rules for LAD programming (you cannot have a And or OR signal after a coil, for example), you cannot translate it back to ladder through View. So cut up the original STL program in as many blocks you feel are logical, and do each one in a seperate ladder network. Then use View to translate those into STL, just for the heck of it; you will find the basic rules for translateble rungs in Siemens' world.
Hope this helps,
Daniel Chartier
 
you cannot have a And or OR signal after a coil, for example), you cannot translate it back to ladder

That may have been true in S5, but S7 does allow for multiple coils in ladder. A SET/RESET operation in S7 is translatable back to ladder, but your code will not as the brackets/NOP 0 operations have been excluded. A SET/RESET operation like this

A(
A M 2.0
S M 0.0
A M 1.0
R M 0.0
A M 0.0
)
A M 3.0
S M 1.0
A M 1.1
R M 1.0
NOP 0

will translate into ladder no problem. You need to go through and add brackets in the correct places, and NOP 0s, etc. Or you could split the networks at the end of the set/reset and all will translate.

HTH

rf
 
nw1
A I 8.0
AN Q 19.5
S Q 19.4
nw2
A Q 19.4
A Q 18.3
A(
O I 8.1O
O M 130.0
)
= M 130.1
nw3
/////////////////////////////////////
These are the same thing
A M 130.1
O I 7.2
R Q 19.4

O M 130.1
O I 7.2
R Q 19.4
/////////////////////////////////////
nw4
A M 130.1
AN M 130.2
= M 130.3
nw5
A M 130.3
S M 130.2

If you place thes networks as above it should convert
an and at the start is the same as an or draw it on a piece of paper in ladder you'll see it start away

good luck

Cuke
 
Hi goxx,

It looks to me like a conversion of a old
STEP5 - program to STEP7.
Your STL contains at least 2 networks, but
as Daniel stated before, split it in as many
networks as you need.
As long as logic comes true it makes no different.
[attachment]


HTH
Rolf

stl_lad.jpg
 
hey guys, thanks for the useful information. i'm gonna create a new FB and translate it little by little. still need a little help with the STL, but what better way to learn?

Rolf, you are right, it is S5 converted to S7, now how did you know that? looking at your program, i like network 2, where M130.3 goes high and also sets M130.2. i am used to the (S) coil, and the (R) located 20 rungs later. like that SR block.

thanks again everybody!
 

Similar Topics

i am new to simatic manager and i am trying to figure what this part do in the code : A I 5.6 = DB50.DBX 4.6...
Replies
3
Views
135
Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
208
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
318
First off thank you in advance. Second I am very new to STL. I am trying to build a counter that has one count up and 23 count down options. Am...
Replies
6
Views
377
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
677
Back
Top Bottom