Does AOI execution complete before scan continues?

FreeAtLast

Member
Join Date
Mar 2019
Location
Nashville
Posts
38
Hi all.
I have a conceptual question about how program execution happens around AOIs in Studio 5000 V31 or V32. When the processor's scan comes to an AOI, say on rung 15, does the execution enter the AOI and wait to move to rung 16 until it has scanned all the rungs inside the AOI?

Or, alternatively, does execution enter the AOI on rung 15, and then immediately continue to rung 16 causing a kind of parallel execution where logic can be executed in two places at once.

Thanks for your input!
 
I haven't read anything official on this, but I would say it executes the AOi completely before continuing the calling routine.
I say this because the next rung can get the result of the output parameters, which if done concurrently wouldn't be available yet.
 
I can tell you that it will stop scanning mid AOI if a periodic task gets called. I had a glitch that took me a long time to figure out because of a periodic data transfer task that would interrupt the AOI every so often and then send bad data to the other PLC’s because the AOI hadn’t finished processing. Since then I have learned to truly encapsulate my AOI’s
 
I can tell you that it will stop scanning mid AOI if a periodic task gets called. I had a glitch that took me a long time to figure out because of a periodic data transfer task that would interrupt the AOI every so often and then send bad data to the other PLC’s because the AOI hadn’t finished processing. Since then I have learned to truly encapsulate my AOI’s

I'd like to know exactly what you mean by "truly encapulate my AOI's"....by design they're already self-contained routines.
 
If I had to take a guess he is using UID/UIE pairs to disable interrupts when his AOI is running. Or he is using a CPS before and after to freeze his data, depending on the issue he was having.

Keith
 
Since we are guessing I think maybe setting an 'in AOI' flag at the beginning and resetting it at the end. The bit would be tested by the periodic task.
 
It matters not whether it is an AOI, a routine, or another interrupting task. The logic is scanned in sequential order, so any concerns about your data being "half finished" would apply in all cases.

Make your data transfers use "buffered" data only, so you know it will be a complete "data-set". Use CPS to populate it, since COP can be interrupted also.
 

Similar Topics

I want to sort the public variables in my AOI so that they are ordered when I configured them. It appears Logix does not allow this (greyed out...
Replies
3
Views
1,590
So, I'm really just trying to get some experience by practicing with arrays. I'm using studio 5000 v33. I have one rung with an XIC bit that's...
Replies
5
Views
123
I tried researching but I still don't quite get it. As far as I understood, it's used after a function is called in STL and then if the function...
Replies
1
Views
127
Today I was trying to install firmware update to new out of the box CompactLogix processor. CompactFLASH dialog box did not show any revisions...
Replies
10
Views
222
Hello Friends I am trying to connect to a Zebra printer. I can print the label with hyperterminal both by RS232 and TCP/IP. Now, I am trying to...
Replies
7
Views
223
Back
Top Bottom