Siemens S7/TIA v18: What's the order of execution here?...

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
Another daft question coming up...

In the picture, suppose "Data_block_1.Calculate Diff" is TRUE.

What's the order of execution of the SUBtraction blocks? Is it 1, 2, 3 or are they done simultaneously?
Thanks

Order 1-2-3.png
 
It is normal for code to be processed left to right top to bottom so yes that is correct, however, when there are other contacts in "OR" configuration before those functions then these are processed first.
for example
as the raw code is processed if for example you had another N/O contact ored across that one it would process in the following maneer
Siemens uses brackets for multiple lines for grouping just like in maths where Mitsubishi use things like AB ORB & some others I cannot remember (only shown in STL)
A(
O Mxxx
O Mxxx
)
SUB xxx (1)
SUB xxx (2)
SUB xxx (3)
 
Definitely not simultaneously. The PLC is definitely single threaded (although the newest 1500s have a 2nd core for comms).


It should execute in order 1,2,3
 

Similar Topics

Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi again, When the "REPORT" button is pressed (on a different screen), it takes the operator to the...
Replies
7
Views
666
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi, The operator has reported that, from time-to-time, when he presses the "Generate Report" button...
Replies
5
Views
464
General Question: The PLC and HMI that I've been working on (a laser measurement system) is soon to be transported to the site where it will be...
Replies
2
Views
701
Hi, I'm not sure how to do this... Basically, I want to restrict the user input values for this tag to be in the range 20.001 to 25.0. I...
Replies
17
Views
1,634
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,107
Back
Top Bottom