Siemens STL & Language Issues

Zombo

Member
Join Date
Nov 2003
Location
PA
Posts
50
I have been working with Siemens PLCs, Drives and HMI for many, many years. Currently I am installing a machine in the USA that was originally made in Germany back in the late 1980s which I am ashamed to admit that I was there at startup as a newbie engineer for a couple of days.

I have been translating German to English symbols and descriptions plus dealing with the STL logic being thrown in here and there. Frankly I have have hit a mental road block with the STL. It maybe that I have lost my mind or totally lost my mind. Can anybody please look at the attached logic and explain to me why memory bit M0.3 isn't turning on in the rest of the PLC logic.

STL_2.jpg
 
The picture is quite low resolution, is there any chance you can take one that is a bit sharper?

I have a hard time reading the text.
 
There is a DI (I2.5, Button Control On), that should turn on M0.3 (Control On).
 
The line with ON "22 S7" is always true, which always resets M 0.3 (line with R M 0.3).
That is probably an N.C. contact. So M0.3 is only reset when the button is pressed.

The code seems to me to be startup of the control system.
There is a timedelay (which does not work since programmed wrong), and when when startbutton is pressed and there is no e-stop, then the power-on bit (M0.3) is set, and the contactor 33_K2 is turned on.
There is also a lamp which is turned on if the power-on bit is set or the lamp-test button is pressed.

IMO there is an infatuation by some people with STL. If they can write code in STL they must be really smart. But appearantly not smart enough to spot a simple error.

This code:
Code:
      AN    M      0.2
      SD    T      1
      L     S5T#5S
      S     M      0.2

Should be:
Code:
      AN    M      0.2
      L     S5T#5S
      SD    T      1
      A     T      1
      S     M      0.2
There is absolutely no reason why the code could not be written in LAD or FBD. Much easier to read, and the editor automatically helps you to avoid the most basic errors.
 
Got it! E-stop pushbutton was not released on auxiliary console. Thank you.

The PLC code as well as the STL logic was written by our German
branch of our company many years ago. I haven't had the need to
learn STL in depth until now. I guess your never too old to start
learning.....
 
Last edited:
IMO there is an infatuation by some people with STL. If they can write code in STL they must be really smart. But apparently not smart enough to spot a simple error.

There is absolutely no reason why the code could not be written in LAD or FBD. Much easier to read, and the editor automatically helps you to avoid the most basic errors.

As an American who works mostly with Siemens stuff, it is amazing to hear those words spoken by someone identifying with a European flag. Jesper, you continue to be a hero.

To be fair, most of the STL love has recently been replaced by SCL love, which is about halfway between STL and LAD in usability for the typical beginner.
 
I hate it when people use languages to write code that would be way better written in different language.

But with siemens, old s7-300/400 had lot of limitations on using lad/fbd. Good for us is that while Siemens wants to win over usa, it has been forced to make it better on new systems.
 
To be fair, most of the STL love has recently been replaced by SCL love, which is about halfway between STL and LAD in usability for the typical beginner.
Horses for courses.
Something that will be absolutely long-winded if written in LAD can be written better and more understandably in SCL. And you can put in as much commenting in SCL as you care to do, which also helps.
The other way around, even though writing logic in SCL is possible most of the time it is better to use LAD.

Appearantly in TIA you can now mix SCL and LAD in the same code !
I once wrote that as a future wish for STEP7, but never really thought it would happen.
So now you dont necessarily have to chose one over the other.
 
Horses for courses.
Something that will be absolutely long-winded if written in LAD can be written better and more understandably in SCL. And you can put in as much commenting in SCL as you care to do, which also helps.
The other way around, even though writing logic in SCL is possible most of the time it is better to use LAD.

Appearantly in TIA you can now mix SCL and LAD in the same code !
I once wrote that as a future wish for STEP7, but never really thought it would happen.
So now you dont necessarily have to chose one over the other.

Correct, in TIA with 1500 range processors you could have Network 1: LAD, Network 2: STL, Network 3: SCL.

In 1200 range processors you can do the same just can't use STL.
 
You can have one function with different languages, but there's no "conversion" between languages like SIMATIC Step7.

Which sucks a little bit when you need to bring a "ladder person" down a couple of notches.
 
You can have one function with different languages, but there's no "conversion" between languages like SIMATIC Step7.

Which sucks a little bit when you need to bring a "ladder person" down a couple of notches.

There is conversion between LAD and FB, I think. But not the others.

I'm glad to be seeing a lot more acceptance of SCL in the newer generation of controls engineers. More guys coming in with a programming background at some point in their schooling.
 

Similar Topics

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
593
I'm having trouble trying to convert this code to ladder, anyone able to help me? A M4.0 A M4.1 A M117.0 AN M17.7 A ( A I38.6 AN I3.7 O ( A M4.5...
Replies
8
Views
1,172
Hello, I am still new to STL. But from what I understand is the JC mnemonic should jump if RLO = 1. If we review both pictures the M0bf RLO = 1...
Replies
5
Views
1,015
Hello, I am working on a project to upgrade some old S5-100U processors. The programs are all uploaded and I don't have descriptors...ugh. Be that...
Replies
4
Views
1,115
I really struggle with STL in Siemens Step 7 Classic. I'll learn chunks, but then I don't use it enough to retain and build on the knowledge. When...
Replies
17
Views
3,144
Back
Top Bottom