LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To verify a condition

I need to create a VI that allows me to determine whether the set point value set by me has been reached by the instrument. I was thinking of a VI that constantly compares the set point and the actual value, and outputs the actual value only after it has been equal to the set point for more than 30 seconds.

0 Kudos
Message 1 of 3
(213 Views)

(This is a simple programming questions and does not belong in the "signal conditioning" forum. I have moved it to the right place)

 

Your "thinking" is somewhat reasonable and that should be easy to implement. What have you tried?

 

Of course some statements are a bit vague.

 

  • You need to define what "continuously really means.
  • You need to define what "reached" means, Especially in the presence of noise the tern "equal" is dangerous. Is the setpoint a small valid range?
  • You need to define what "outputs the actual value" means. Output to where?
  • etc.

 

0 Kudos
Message 2 of 3
(208 Views)

Sounds like a simple state-machine

 

1. Set value

2. Read value

3. If in range start/add to a timer else reset timer

4. If timer is 30, exit and return Value

5. Timeout?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(173 Views)