Originally Posted by
Todd
While not a programmer by profession, I do have some experience and am always vigilant about it. It has come up at times here on the board though. It is one of the things I suspect when people describe aberrant Apex behavior. One of the others is duplicate names.
I don't have any other ideas on the original issue, but looking at your ATO code I have a few comments:
The Set OFF isnt really doing anything as the OSC overrides it since it has both ON and OFF states.
I assume that the HI an LO switches are fail-safe points rather than nominal control points since they override the OSC.
The DEFER statements apply to the entire outlet, so they will skew the OSC timing.
Since the Apex executes top to bottom, the general approach is to start with the desired nominal behavior and add overrides in increasing priority.
Bookmarks