LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control with time

Solved!
Go to solution

Hi,

 

To simplify my problem: the VI contains a boolean indicator (representing the ON/OFF status of a pump) and a numeric control (representing the measured pressure of the system).

 

The boolean indicator needs to be ON during a certain time (for example it stays ON for 10 seconds and then turns OFF again). But if the numeric control goes over a certain limit, the boolean must turn OFF (even if it did not reach the given time). But when the control goes lower than the limit again, the boolean must turn ON for the remaining time.

 

For example:
Time for which the boolean must be ON = 10 seconds
Upper limit for the numeric control = 5

The numeric control stays at 4, boolean turns ON. After 6 seconds, the numeric control goes to 6, so the boolean turns OFF. Eventually the numeric control goes back to 4, so the boolean must turn ON again for the remaining 4 seconds. 

 

Does anyone know how to solve this on LabView? 

 

Thank you.

0 Kudos
Message 1 of 4
(483 Views)

Hi Charly,

 

I guess you can use ElapsedTime for this ON/OFF part related to time. The other condition (limit check) is just a boolean operation later on: LED:=ElapsedTime AND limit-check…

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 4
(476 Views)

@GerdW wrote:

Hi Charly,

 

I guess you can use ElapsedTime for this ON/OFF part related to time. The other condition (limit check) is just a boolean operation later on: LED:=ElapsedTime AND limit-check…


Hi GerdW, thank you for your reply!

 

The problem is that the time keeps elapsing. So with your solution, the boolean turns OFF when the limit is not check, indeed. But when the limit is check again, the boolean will not turn ON for the remaining time. In my example, if the numeric control goes to 6 for more than 4 seconds and then goes back to 4, well the boolean will not turn ON at all because the limit time will be reached.

0 Kudos
Message 3 of 4
(469 Views)
Solution
Accepted by topic author HZintern

Hi Charly,

 

then you could just create your own ElapsedTime function with an additional "Pause!" input…

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 4 of 4
(460 Views)