Siemens S7 STL Question(s)

minerman

Member
Join Date
Nov 2012
Location
Columbus, OH
Posts
82
I have an FB that had about 30 rungs of LAD code. I switched views (ctrl+2) to add some additional networks and create some STL code. Now, when I switch back to LAD view (ctrl+1), I have 5 or 6 rungs that used to display as LAD, but now will only display as STL. I did not change them at all, when in STL view. Is there any way to get my LAD back? I understand it better.

Thanks!
 
You might be able to reconvert if you move the L's used in the previous LAD code to a free area.

***

If you need to assign new L's do it in LAD mode, then switch to STL and do the coding.

Kalle
 
Alright, it was only a few networks, so I just took 10 minutes to carefully redraw them in LAD. Thanks

Next question is probably an easy answer, but I can't find it in any of the help.

In STL, can you use a comparison instruction, followed by another instruction that will only execute if the result of the comparison instruction is true? The manual only shows examples with the line after the comparison instruction being an = instruction. Is that the only instruction allowed?

I want to do this...

<>I
JC Lbl1 (I Only jump to Lbl1 if above condition is true and not jump, otherwise)

This is ok?


Another question. In my FB symbol table, I have addresses in my TEMP symbols and my IN symbols that both start with 0.0. Is this a problem? What if I were pointing to location 0.0, which location would I be looking at?
 
Last edited:
They dont both start at 0.0 they start at 0.0 offset at db and at 0.0 offset at l stack (l memory area). L area (temps) must always be written to before read from.
 
Thanks, I understand now, but...

L area (temps) must always be written to before read from.

You're saying it will cause an error if I read from a STAT (also L area, right?) register at the beginning of my program?

That doesn't seem logical? Why would it prompt me for an initial value, if it's impossible to use the initial value?
 

Similar Topics

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,167
Hallo Can you help me with understanding of the code below: M001: NOP 0 L #PUNTATORE L 16 *D LAR1...
Replies
3
Views
2,098
program : L #measurement + -1 SLD 4 LAR1 AUF "DB72" L DBW [ar1,P#4.0] question1 : measurment =5 5-1=4 0000 0000 0000 1000 SLD 4 gives 0000 0000...
Replies
3
Views
14,354
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
591
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,012
Back
Top Bottom