If I write
331 IF ( CH_LO AND TIME-ON ( VP_LO ) >= DS_VPL ) OR (CH_GA AND TIME-ON ( VP_ga ) >= DS_VPL ) AND NOT PL_CIRC THEN VP_MIX = 100 - PID3 ELSE VP_MIX = 100
Why does the programming drop the parenthesis and when you reopen the program replace it by
331 IF CH_LO AND TIME-ON ( VP_LO ) >= DS_VPL OR CH_GA AND TIME-ON ( VP_GA ) >= DS_VPL AND NOT PL_CIRC THEN VP_MIX = 100 - PID3 ELSE VP_MIX = 100
Those are not equivalent, unless you tell me, that contrary to what the manual state, there is an execution order for AND vs OR
We could dive into this but I will make a suggestion which will make this program a lot easier for the next poor soul that has to maintain this ten years from now:
-Use some variables for the timers. That way you can put them on displays, trendlogs and so forth to actually SEE what is going on.
-Use some flags to store the results of your >= comparisons. Same applies for these flags, you can put them on the displays and trendlogs to make the logic easier to diagnose.
-Break the logic into one simple statement per line to make the program easier to follow. Lines further down in the program will override lines further up.