|
If you are using two sensors for your pump, the following is the easiest code.
pump = alias to relayX_fwd
highsen = alias to rc_swY (the higher of two pressure sensors)
lowsen = alias to rc_swZ (lower of two pressure sensors)
the pressure sensors read 0 when full
.......
pump_code:
If highsen <> lowsen Then end_pump
pump = 1 - (1 - highsen)
end_pump:
........
Basically when the two sensor values are equal (both are full or empty), the pump will engage depending on whether the high pressure sensor is tripped. Unless you clear your pump output variable every loop, this code should work.
__________________
Greg Szorc
gregszorc@cwru.edu
Last edited by zorro : 06-02-2002 at 18:01.
|