LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Trigger and Alarm Question

Solved!
Go to solution

Thank you in advance for your help.

 

My situation:

 

I have the Measurement Computing USB 1208FS DAQ with Labview 8.6 (Using ULx). I am measuring the voltage from a load cell and need to set up an alarm range

 

  • Load cell starts with smallload and then ramps up to about 15lbs
  • I'd like a continual display of the data on the graph
  • I need to know if the load has dropped below 14.9 or exceeded 15.1 (via two seperate front panel LEDs that stay lit if the load was ever out of range)

My understanding is that I need some kind of trigger so that the alarm doesnt go off as the load cell ramps up past 14.9lbs. 

 

 

0 Kudos
Message 1 of 5
(2,429 Views)

Hi flipphil.

You're right. You need to implement a simple trigger. Your program must stay dormant in a while loop until the load ramps up, and then become active. In this active state, if it goes off limit, then you could switch on an LED until it comes back, again in another loop.

Alternatively, you couls try the event structure approach that simlifies your triggering by a great deal.

 

If you want help on implementing any of these designs, let me know.

 

Best of luck!

Prashanth N
National Instruments
0 Kudos
Message 2 of 5
(2,424 Views)

Are you looking for something like attached VI?



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
Message 3 of 5
(2,421 Views)

Thank you odessy27,

 

Your VI does what I want. I'm having issues though with the data type incompatibilities and converting them to something that allows valid wire connections. The attached VI is a modification of yours, but has an error. I've done other

types of programming but am at a loss with this one....

 

I essentially want it to be continuously looking at my input voltage and switch to an "on" mode once it has passed the trigger level.

 

  • The input will always start near 0v and ramp up to about about 7v
  • Once it goes past a certain trigger level, say 6.95v, I want to essentially "start" the program
  • At this point, the VI needs to continously watch the input and light an LED if the voltage goes below 6.9v or above 7.1v.

 

I'm not certain I have my "Read" command set up correctly  (Should I be using waveform or a 1D double?)

 

Thank you

Phil

0 Kudos
Message 4 of 5
(2,415 Views)
Solution
Accepted by topic author flipphil

Phil,

      Since in a single iteration your data acquisition (read data) is reading the an array of values or a waveform, any arithmatic operation will be done on all those values and thus the output of that would be an array or values. In your case you are looking for the trigger condition so all I did was chnge the data to 1D array (easier to deal with) and look at the max value and then compare it with the threshold thus the value out would be just one element and not the array of elements.

       


@flipphil wrote:

Thank you odessy27,

 

 

I essentially want it to be continuously looking at my input voltage and switch to an "on" mode once it has passed the trigger level.

 

  • The input will always start near 0v and ramp up to about about 7v
  • Once it goes past a certain trigger level, say 6.95v, I want to essentially "start" the program
  • At this point, the VI needs to continously watch the input and light an LED if the voltage goes below 6.9v or above 7.1v.

 


 The conditions you mentioned can be achieved using another case structure inside the existing one. Try it and let me know if you have trouble implementing it.

 

-Nilesh



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
Message 5 of 5
(2,411 Views)