Siemens world simple logic question

chopin

Member
Join Date
May 2012
Location
Milton Keynes
Posts
210
Could someone explain why on the first screen the highlighted Output_1 is not energized while on the other it is?

My understanding would be that on the first screen the Output_1 would still be energized and would energize TOF timer like on the second screen but the Output_1 coil would not hold on for the duration of TOF because of being de-energized in NW2

What am I getting wrong?

ex1.jpg ex2.jpg
 
I dont know if it is... M202.0 is false in the second network because of the coil being used in both places, so this is just a guess but since its off in its only showing on because of the scan... thats a issue using more than one output coil for the same address

Just a WAG
 
Hi
your first picture doesnt make sense to me

the M202.0 for the TOF isnt required because you seem to want to delay the coil M202.0 for 1 second when Input 1 goes on and then keep it on for 1.5 secs when Input 1 goes off

I cant explain why the contact is not on but i would say that contact can be deleted and your logic would work
 
it is interesting your time ET is 0 also... and in the first picture you have double coils of M202.0, in network 1 and network 2 which is a recipe for disdaster, so this is likely a scan vs screen update thing
 
Evaluating by eye: left-to-right-until-branch/rung-end; then top-to-bottom.


The order of execution for ex1.jpg is:

  1. Rung 1
    1. contact input_1 top branch
    2. TON
    3. contact input_1 bottom branch
    4. contact output_1
    5. TOF
    6. coil output_1
  2. Rung 2
    1. contact input_2
    2. coil output_1
Since the scanning repeats continuously, Rung 2, from the previous scan, happens before Rung1. So output_1 is 0 at step [1.4 contact output_1].


N.B. [1.4 contact output_1] is evaluated before [1.6 coil output_1] assigns 1 to output_1






For ex2.jpg:

  1. Rung 1
    1. contact input_1
    2. TON
    3. coil output_1
  2. Rung 2
    1. contact input_1
    2. TOF
    3. contact output_1
    4. coil output_2
  3. Rung 3
    1. contact input_2
    2. coil output_1



In this case, output_1 is 0 after Rung 3 (previous scan), Rung 1 assigns 1 to output_1 at [1.3 coil output], so output_1 is 1, after that, at [2.3 contact output_1]


Just guessing.






Caveats

  • ignoring the duplicate-output errors
  • ignoring the fact that what you see in the live ladder diagram is a snapshot of some kind, so you don't know what the dynamic behavior of those bits are.
    • I suspect the scan vs. screen issue is that the screen shows the status of the instructions i.e. it shows the contacts' states because they are distinct, but can show only one value for the bit itself.
    • For example, say you had 3 identical rungs in a row, each with one instruction adding 1 to the same integer tag. What value does the screen show for that integer tag at each of those instructions? I suspect it would have a snapshot of only one value, and it would show that value at all three instructions.
 
Last edited:
    • For example, say you had 3 identical rungs in a row, each with one instruction adding 1 to the same integer tag. What value does the screen show for that integer tag at each of those instructions? I suspect it would have a snapshot of only one value, and it would show that value at all three instructions.


This is what you get:

add3.jpg
 
The only way I can imagine this could work is that every instruction is a full-blown object with it's own data. Under the hood each instruction has a name that is referenced by the software environment when the instruction is displayed. So the development environment isn't showing you M100, it is showing you the input and output data for the ADD instruction.

Keith
 
Even back with older simatic manager, you get the values as they increment - I would say that the plc has a limited stack trace of the accumulators and the display gets hold of that to display the data on the screen.

lad7.jpg
 

Similar Topics

Hello guys! I had a earlier discussion about a simple encoder (http://www.plctalk.net/qanda/showthread.php?t=15464) but now I would like to...
Replies
18
Views
3,879
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
9
Views
207
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
147
Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
308
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
116
Back
Top Bottom