Can some translate this to ladder Logic

bornwild

Member
Join Date
May 2010
Location
Riyadh
Posts
429
Helo guys,

New to siemens and STL . Can some one translate this ladder logic. In simatic manager when I change language it doesnt work.

A "G99Oven.ExtBit.19"
A(
A "G99Oven".IntTimer._2.Dn
O "G99Oven.OBits.04"
)
FP "G99Oven.OBits.03"
JNB _B15
AN "G99Oven.OBits.04"
= "G99Oven.OBits.04"
_B15: NOP 0
 
I don't have a ladder editor here but imagine this:


A normally open contact with G99Oven.ExtBit.19, followed by
A parallel branch (or an OR branch) with G99Oven".IntTimer._2.Dn and "G99Oven.OBits.04", followed by
A positive flank detection (OSR in Allen Bradley)


If the above is 1, the processor will then invert bit "G99Oven.OBits.04" (makes it 1 if 0 and vice versa).

If instead it's 0, then it jumps to the line _B15: NOP 0


Makes sense?
 
As I see it, if the code before the jump to _B15 transitions FALSE to TRUE, then
"G99Oven.OBits.04" will alternate.
Because of the jump, this code wont convert to LAD.
You can create something similar by splitting into 2 LAD networks with JMP and LABEL instructions.
 
A normally open contact with G99Oven.ExtBit.19, followed by
A parallel branch (or an OR branch) with G99Oven".IntTimer._2.Dn and "G99Oven.OBits.04", followed by
A positive flank detection (OSR in Allen Bradley)


If the above is 1, the processor will then invert bit "G99Oven.OBits.04" (makes it 1 if 0 and vice versa).

If instead it's 0, then it jumps to the line _B15: NOP 0

I think this implements the description above; I assumed the flank detection (one-shot) result goes into G99Oven.OBits.03:


Code:
  .ExtBit.19  .IntTimer._2.Dn       os03sto  .OBits.03
------] [----+------] [------+-----+--]/[-------( )---+----
             |               |     |                  |
             |  .OBits.04    |     |      os03sto     |
             +------] [------+     +--------( )-------+




    .OBits.04  .OBits.03      .OBits.04
--+---] [--------]/[------+------( )-----
  |                       |
  | .OBits.03  .OBits.03  |
  +---]/[--------] [------+
Sorry about the output branches on the first rung: that should be a rising-edge instruction, but I don't know the shorthand for a one-shot in Siemens off the top of my head, and I am too lazy to look it up :whistle:; I think I did it right; os03sto is the one-shot storage.

The last rung is a flip-flop clocked by the .OBits.03 one-shot.


I dropped the G99Oven prefix; if the tag starts with a "." then add it back.


The two rungs could be merged into one, but it is cleaner this way, IMNSHO.
 
Last edited:

Similar Topics

Can some one transfer this to ladder logic please L #InR T #PuntoX L #Punto2 L #Punto1 -R T...
Replies
3
Views
1,975
I need to Translate a Siemens S7 project into Delta PLC. I am responsible for Electrical so I will not care about software. Delta does have PLCs...
Replies
0
Views
1,184
Hi folks, I'm working on a glass jar packing machine and trying to figure out how this STL code works. Most of the code is in ladder or FBD. But...
Replies
25
Views
9,168
Hello Everyone! I just became a member of this great site. I have a PLC program from an S5-100U PLC, and now I want to make a PDF report of all...
Replies
3
Views
1,570
I only have done LAD diagrams so far and now I got a task to convert these 4 LAD diagrams to FBD and STL. Can anyone help me with that? Thanks!
Replies
16
Views
8,314
Back
Top Bottom