LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabView to Operate a Pump

I am trying to use LabVIEW to operate a pump based on a temperature signal with two DAQ assistants, one for the temperature sensor and one for the pump. When the temperature reaches a certain point (30C in this case) the pump will turn off, and below that temperature the pump will be on. When the temperature is near 30C, the DAQ will rapidly turn the pump on and off, which is bad for the pump and the relay I am using. I tried averaging the temperature data and using a filter, but neither worked when the temperature is hovering around the cutoff point. Is there any way I can have the pump DAQ sample once a minute? When I try to change the Hz, I get an error message...

0 Kudos
Message 1 of 3
(3,997 Views)

Hi kyblaze,

 

Thanks for joining!

 

The minimum rate will be defined by your hardware, what are you using?  You could consider adding hysterisis to your comparison, so that it takes a large change in temperature to trigger a write in the software.

 

Also, if you want to do software timed at a very low rate - change the timing to on demand, and write single samples.


Regards,

Peter D

0 Kudos
Message 2 of 3
(3,993 Views)

I think that the best approach is to utilize a Hysteresis setting in your on/off controller.  It won't take much code.  Here is an example:

 

On-Off Control with Hysteresis.png

 

In this you can see that initially the pump is on and is driven by the current value of Setpoint.  When the Process Variable reaches the Setpoint the Pump turns off and the "Select" control will be looking at "Setpoint - Hysteresis".  So if your setpoint is 30 and your Hysteresis is10, the Pump will not turn back on until the Process Variable is below 20.  Once this occurs, the pump will be on until the process variable hits 30 again.

 

Edit: Woops, had an error in my code.  Fixed it.

Message 3 of 3
(3,987 Views)