LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use signal value to initiate sequence/event

Solved!
Go to solution

Hi,

I'm trying to figure out how to use an analog input value to initiate an action/event/sequence.  An example would be if I have a thermocouple and a water pump, and I want labview to automatically turn on the pump whenever the thermocouple measures a certain temperature or greater.  

 

So I have been digging through the support pages and forum, but I think the problem is I'm searching for the wrong terms (I have not found what I'm looking for in triggering and timing pages).  I'm just looking to get pointed in the right direction.  Any help is appreciated.

 

 

 

 

0 Kudos
Message 1 of 4
(2,028 Views)

As far as I know, you cannot trigger an event based on a measurement crossing a specific value. I think that you can only trigger an event after an acquisition or a trigger (see below).

 

What you can do is trigger an event after each acquisition, check the value and act accordingly. You might also simply acquire the value at a regular interval.

 

Example_VI.png

Marc Dubois
0 Kudos
Message 2 of 4
(2,015 Views)
Solution
Accepted by topic author SnarfIsOneOfUs

You don't need any triggering of one thing based on another in terms of acquisition triggering here. Acquire the temperature at a regular rate with continuous sampling, and when the value is greater than the threshold, start the pump.

 

Depending on how you control the pump, you either can set a value every iteration of some temperature checking loop (true or false as needed), or you can check for a change in the value (T->F, F->T) and take the appropriate action only in that case.

 

For some types of hardware, it is possible to use an "event" like system to do this, but it essentially works with the Change Detection event, which requires you be able to parse the temperature as a digital value and make it cross the F->T threshold for an appropriate temperature. I'd expect this to be difficult to tune, probably require some sort of additional electronics (perhaps resistor divider, etc) and generally be more brittle and problematic than just reading the temperature and deciding what action to take.


GCentral
0 Kudos
Message 3 of 4
(2,005 Views)

Thanks!  This actually helped a lot with figuring out how to get over the hump!

0 Kudos
Message 4 of 4
(1,984 Views)