Step 7 STL to LAD.

Tharon

Member
Join Date
Jan 2007
Location
Other
Posts
1,430
I have a hard type grasping branches (I guess they'd be ORs of some sort) in STL. I'm a LAD guy myself.

I'd like to display this network in LAD, but It doesn't automatically switch over (too advanced? but it seems like a pretty simple network...)

Any Hints?

(Step 7 v5.4 SP1)

STLtoLAD.JPG
 
You can re-write that in Ladder quite easily, I don't have Step 7 at the moment though to do it.

It can be broken up into 5 networks to make it easy to see ladder.

NET 1. N/C M 101.5 and Jump to Label en13

NET 2. Two N/O M flags in series that Set 2 outputs and 2 M flags all in parallel.

NET 3. One N/O M flag, 3 N/O inputs and 3 N/C inputs, all in series to energise an On delay timer with a 1 second delay.

NET 4. N/O of the above timer, Sets 2 and Resets 5 M Flags all in parallel.

NET 5. Label en13 and a NOP, this could stay in STL
 
Hmm, so Q17.2 and Q17.3 are being set and reset at the same time? That worries me now... because the machine is keeping 17.2 on and turning 17.3 off.

(Here's the next "step" reseting those outputs).
Another.JPG
 
The code will not translate as it contains more than one logical network. I've written it as it would be in ladder in four networks:

FC1.jpg


In light of a recent topic, this is an example of what might have been written in ladder because it doesn't need to be in STL. The reason why people write code like that in STL is that it's much quicker to write in STL and with greater scope for comments as you go.

If you monitor the code online, the bit to watch is RLO - Result of Logical Operation.

Nick
 
The logic shows both outputs set and reset together. So if Q 17.2 is staying on, either it is being turned on elsewhere or there is a fault with the output card or in the field.

I have known output LED's to be on when the output is open circuit with some cards.
 
Tharon said:
Hmm, so Q17.2 and Q17.3 are being set and reset at the same time? That worries me now... because the machine is keeping 17.2 on and turning 17.3 off.

Looks like Q17.2 and/or Q17.3 are used somewhere else in the program. Nothing to be afraid of. Only you have to find the place.

Oooops, crosspost with Peter. Sorry :)
 
I looked, and the outputs are used in 3 other locations. 4 total.

Manual Mode and 3 Seperate Part Sequences (none of which are active at the same time). 17.3 isn't used in one of the parts so I think they may be running that part. (I'm not in the same state as these people).

At least now I have a better understanding of the layout of their logic in this program.
 
The way its programmed is quite common for sequence control, some prefer though to set/reset unique flags in the sequence itself and use those flags external of the sequence code to turn on the outputs.

At least then you can point straught away to the step and sequence that switched the output, especially if the flag is named something like SEQ3_STEP4, etc.
 
The LED may be on while the output is off when there is a voltage on the output wiring from another source.

A quick check is to disconnect the wire and see whether the voltage is on the wire or coming from the output.

Nick
 

Similar Topics

Can somebody help me to translate these lines in STL to a LAD i can´t find the real logic, O #F_reset_pulse_raise O...
Replies
9
Views
3,681
Why is it sometimes my STL will not convert to Ladder Logic?
Replies
4
Views
2,367
I am trying to convert some block calls from STL to LAD and I need a little help. In the attached file I have network 3 in STL and network 4 in...
Replies
2
Views
4,397
I am doing a program in the LAD format. Then automatically the rungs in the program become in the STL format. I can not convert them back even...
Replies
13
Views
11,124
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
690
Back
Top Bottom