PAC Control 9.1 variables only being set in 'step mode'

Hello all,

I was wondering if there are any known cases out there of Pac Control only being able to set variables (i.e. set variable ABC to TRUE should give it a value of 1) if the chart is being ran in step mode? I have an R1 controller.

I have had a strategy that has worked for years and after adding some charts to the strategy last fall I have had random cases where variables wont be set properly unless watching it step through the logic. Loop time is 24 ms, no more than 5-7 charts running at a time, 30 total charts in the strategy.

Any suggestions???

I’ve found sometimes when things work in step mode and not running at full speed, there is some kind of timing mismatch in either a conditional statement or some other chart that is running. Some things I might do to debug it include:

  1. Run the charts at full speed, but put a breakpoint in at or immediately after the block that is not acting as expected. This allows you to confirm that the code is actually being executed. If that branch in the flowchart is entered through a conditional block, maybe the conditions aren’t being met unless the chart is slowed down by stepping to allow enough time for other things to happen.

  2. Use the find function to see what other references exist to the variable that is being set. At full speed, perhaps somehow the variable is getting changed back to its previous value by another chart, but by stepping through, you are changing the timing of the charts with respect to each other.

  3. Put some delay blocks in the chart that isn’t working consistently. This can simulate “step mode”, but actually running at full speed. Start out with a delay of around 1 second, similar to what the stepping time might be, and see if the code executes properly. If so, gradually decrease the delay until you recreate the inconsistent behavior. That might give a clue to what the root cause of the timing error is.

Just some ideas… good luck.