From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pump control

Solved!
Go to solution

Hi, I'm developing the following programme to control a sensor level usig a DAQ USB 6001 and the level sensor. I have thought in this 3 states: Low level, normal level and high level. I want to control a pump acording to the level of my tank so if the level is low the pump should be activated and if the level is too much (high level in this case) it should be desactivated. What i want is, if the pump is activated because the level is low, it should stop only when the wate,r or any other liquid, reach the high level and the pump should be activated when the water reach the low level. In my programme the pump is activated when the liquid reach the low level but it stops whe the liquid reach the normal level. Any solution? I'm stucked 😞

 My programme is in spanish so low level is "Nivel bajo"; normal level is "Nivel óptimo" and high level is "Nivel alto"

0 Kudos
Message 1 of 2
(1,124 Views)
Solution
Accepted by AitorGutierrez

Hi Aitor,

 


@AitorGutierrez wrote:

What i want is, if the pump is activated because the level is low, it should stop only when the wate,r or any other liquid, reach the high level and the pump should be activated when the water reach the low level.


 

IF level <= low_level and previous level > low_level THEN pump:=ON
IF level >= high_level and previous level < high_level THEN pump:=OFF

 

All you need is a shift register to store the previous level…

 

Similar solution:

 

IF level <= low_level AND pump==OFF THEN pump:=ON
IF level >= high_level AND pump==ON THEN pump:=OFF

 

Again you need a shift register to store the current state of the pump…

 

Btw.

  • This is a typical task for students in LabVIEW beginner courses, the very same question has been asked lot of times before. Did you search this forum for similar problems?
  • This task typically is known as a simple control scheme, similar to a hysteresis switch. This also has been discussed before in this forum…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(1,093 Views)