LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create an increment function from a threshold detector? Currently using the Configure Comparison block as a threshold detector.

I'm sampling a waveform and when it hits a specific threshold I want it to trigger some function. I am using the Configure Comparison block to do the thresholding but it outputs 2-D data. I would like this output to increment a value that I can then use to select from a variety of waveform outputs. How can I do this real-time? I am not very experienced and can use all the help that I can get. If there's anything that I can provide that would help please feel free to let me know, I am not even sure what would help besides what I have provided. Sorry for being a newb.
 
clambake
0 Kudos
Message 1 of 4
(3,311 Views)

If you can program this in regular LabVIEW for Windows, then the actual code will be essentially identical if you want to run it on a Real-Time target. That's the beauty of LabVIEW!!!

So if you want to introduce determinism to your application, simply replace your while loop with timed loops. The rest of the code, i.e. DAQmx functions, will be exactly the same.

Cheers,

Emilie K. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 4
(3,289 Views)
Hi,

The configure comparison express VI actually outputs dynamic data, which is a waveform data type.  It looks like you just want to be able to detect a rising edge on some data that you are reading through a data acquisition card.  Ae Emilie pointed out if you are looking to implement some of this in real time, it would be very similar to the LabVIEW code that you develop.  There are many ways to accomplish this.  I have attached one method that I can think of, off the top of my head.

I am using shift registers to compare the current value with a previous value and see when it is crossing zero for example.  You can use this as a starting point.  Also, in this example I am using a Simulate Signal.  You can probably use a DAQ Assistant or DAQmx VIs.



Regards,


Message Edited by Raajit L on 11-07-2007 02:51 PM
Raajit L
National Instruments
Download All
0 Kudos
Message 3 of 4
(3,271 Views)
Thanks guys I'll see how this goes!
0 Kudos
Message 4 of 4
(3,248 Views)