Translate to ladder please

bornwild

Member
Join Date
May 2010
Location
Riyadh
Posts
429
Can some one transfer this to ladder logic please

L #InR
T #PuntoX

L #Punto2
L #Punto1
-R
T #P2_P1

L #PuntoX
L #Punto1
-R
T #Px_P1

L #Valore2
L #Valore1
-R
T #V2_V1

L #Px_P1
*R
L #P2_P1
/R
L #Valore1
+R
T #OutR
 
This looks like Siemens, however, some years since I used it but basically here is my thoughts on it. I assume this is a function block but without knowing the PLC type this is a guess.
L #InR // This would be the equivalent to a move instruction
T #PuntoX

L #Punto2 // load the two values * subtract Punto1 from Punto2 as a real
L #Punto1
-R
T #P2_P1 // Transfer the result to P2_P1

L #PuntoX // same here
L #Punto1
-R
T #Px_P1

L #Valore2 // same here
L #Valore1
-R
T #V2_V1

L #Px_P1 // this takes the result of V2_V1 (left in the accumulator i.e. V2_V1)
*R // Multiply
L #P2_P1 // load P2_P!
/R // Divide
L #Valore1 // load Valore1
+R // Add
T #OutR // transfer to OutR

You cannot convert the above code to ladder, however, you could have the equivalent I do not have Siemens loaded on this PC but here is a FBD equivalent done in something else. Note that it is not translatable due to it doing some of the maths on the result of the previous maths i.e. the result of the previous maths.
 
Not Ladder, but should be simple enough to convert to it with the below description.



Move InR to PuntoX
P2_P1 = Punto2 - Punto1
Px_P1 = PuntoX - Punto1
V2_V1 = Valore2 - Valore1
OutR = ((V2_V1 * Px_P1)/P2_P1) + Valore1
 

Similar Topics

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...
Replies
5
Views
2,275
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,189
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,207
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,576
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,334
Back
Top Bottom