Chart Scanning Order

Hello All,

On power-up,

StartChart A
StartChart B
StartChart C
StartChart D


-Power-up Chart is executed only once (not Looped)
-All Other Charts (A,B,C, & D) are Looping continuously (with a delay of course)
-No other Start or stop chart commands in the strategy
-Charts will not be put in to a suspended state (at least programmatically)

Is it guaranteed that these charts will execute in this same order as was started (A,B,C,D), when this strategy is being executed in the controller?

I understand that all charts may not get the same timeslice (amount of time spent on it during a single scan) depending on what it is doing at the time, or if it is waiting for something to happen. Just want to make sure that chart scanning order remains the same during execution.

Is there even a remote possibility, for any given reason other than a programming mistake, that a scanning sequence might get changed in a controller (as it relates to this particular example) while the strategy is being executed? (i.e. A, C, B, D etc.)


Hi Skyfox,

Great question… You’re really digging into stuff.

Short answer is no. It’s not guaranteed.

If chart A has a 10msec delay and chart B has a 15msec delay, there goes that order.
If chart B has 2 more instructions than chart C, it will take longer to execute, so that will change the order.
If chart B is talking to I/O and chart D never does, there goes that order.

I think you can see why it would change.

Be sure and read doc 1776, Optimizing PAC Project system performance. The guts of it only comes to 11 pages, so should not take long to drink deeply of its wisdom.
For example, its great that you talk about putting delays in your looping charts (delays should be in every chart is my advice), but after you read 1776, you will see that delays remove that chart from the executing cycle, so thus the order will be changed right there.

That said, the same doc will make it clear that even if you pull all delays out of all the charts, the scanning order can (and will) still change for different reasons.


Skyfox, I’m wondering, why do you ask? If you’re concerned about the order in which things happen, you can control this directly a couple of different ways. Also, the term “scanning order” sounds like something you might be used to from PLCs but doesn’t necessarily apply for PACs, which don’t really “scan.”

Can you tell us more about your “big picture” goal or concern here?