Hi all,
I primarily use AB PLC's, and have a reasonable understanding of the way they scan their logic. I've done a few smaller projects on Siemens, but have now come up against a larger one, and think it's probably about time I fill in a few gaps in my understanding so I go about things the right way
1. In an AB PLC, a routine is not scanned unless called by a JSR (jump to subroutine) instruction (except the main routine, of course). As far as I'm aware, there's no such instruction needed in Siemens (because all of my programs up until now have worked without them!), so how does the PLC determine which order to execute the OB's in?
For example, I created 10 routines and numbered them in the range of OB200 to OB299. Then I realised I'd missed one, so I added it in and numbered it OB250. But it still appears on the list after OB299. So does the PLC scan the OB's in numerical order, or in the order they appear in the project tree? And in either case, is there a way to satisfy my OCD and make OB250 appear halfway up the tree so all of my OB's are in numerical order?
2. Once I establish the order each OB is executed, am I safe in assuming that the rungs are always scanned left to right, and then top to bottom?
3. Do Siemens PLC's in general - and more specifically, the S7-1200 - follow the standard "read inputs>execute code>write outputs" sequence, or do they (it) update the I/O asynchronously a la Control Logix? (ignoring all the possible exceptions to do with interrupt i/o, etc etc)
I appreciate any insight!
I primarily use AB PLC's, and have a reasonable understanding of the way they scan their logic. I've done a few smaller projects on Siemens, but have now come up against a larger one, and think it's probably about time I fill in a few gaps in my understanding so I go about things the right way
1. In an AB PLC, a routine is not scanned unless called by a JSR (jump to subroutine) instruction (except the main routine, of course). As far as I'm aware, there's no such instruction needed in Siemens (because all of my programs up until now have worked without them!), so how does the PLC determine which order to execute the OB's in?
For example, I created 10 routines and numbered them in the range of OB200 to OB299. Then I realised I'd missed one, so I added it in and numbered it OB250. But it still appears on the list after OB299. So does the PLC scan the OB's in numerical order, or in the order they appear in the project tree? And in either case, is there a way to satisfy my OCD and make OB250 appear halfway up the tree so all of my OB's are in numerical order?
2. Once I establish the order each OB is executed, am I safe in assuming that the rungs are always scanned left to right, and then top to bottom?
3. Do Siemens PLC's in general - and more specifically, the S7-1200 - follow the standard "read inputs>execute code>write outputs" sequence, or do they (it) update the I/O asynchronously a la Control Logix? (ignoring all the possible exceptions to do with interrupt i/o, etc etc)
I appreciate any insight!