12-04-2011 09:03 PM
I have a client that wants to do the following. Add a switch to fill a tank every night at 3:00am. I am using neutralzone object to control the pump, but, I need to add a switch that if the tank is below the high limit, it will turn the pump on and fill the tank to the high limit and then shut off and resume normal operation till the next day, morning at 3:00am. Any ideas? Thanks.
Also on a side note. I just want to thank Ryan Shi for help he has given me in getting things going. My client has been very happy with the software process. Thanks again.
Jim
12-07-2011 03:29 PM
Replace the neutralzone with a flipflop
(!FlipFlop and ((ForceFlip or controllevel<StartLevel) and StartLevel<>StopLevel)) or (FlipFlop and (ForceFlip or controllevel>StopLevel and StartLevel=StopLevel))
Pseudo: If flipflop is off, only toggle if we force (ie. pushbutton) or the contrl level is less than the start level and only if the start and stop are not the same.
If flipflop is on look for the force, control above stop or equal start and stop levels.
With a little more code, you can make also work with reversed start/stop levels.
Good luck,
Mike