drbitboy
Lifetime Supporting Member
You put start but I know you meant stop for case 4.
That is what I meant, if both can't be right at the same time then it isn't a problem with how to code it, the problem is in the control definition. You either have to give Case [1] or Case [4] priority, or you have to redefine the problem.
Actually it can be programmed, it just needs to keep track of the two cases independently, because the two inputs are independent.
Call each pump run conditions an "independent start alarm:" Tstart (run because of temperature); Mstart (run because of mositure). If either independent start alarm is on (Tstart OR/|| Mstart), then ring the master alarm i.e. start the pump.
Call each pump stop conditionand "independent stop alarm: Tstop; Mstop. If both indep. stop alarms are off (Tstop AND/&& Mstop), turn off the master alarm i.e. stop the pump.
For this to work an important condition icans that Tstart and Tstop and never both be true at the same time, and the same is true for Mstart and Mstop; this is guarantted by the the High setpoints being above the Low setpoints, plus the mathematical axiom [if A>B and B>C, then A>C].
Also, because the high and low setpoints are separate, then </> does not matter vs. <=/>=.