08-18-2016 11:57 AM
Hey guys,
I would like to compare an incoming voltage signal with a constant value i.e. compare elememts of incoming analog signal to a contant. if the signal exceeds the reference, i would like to have a digital output to trigger an exernal LED circuit.
The following method generates an array of boolean, i would like to have a single boolean value based on comparison of element-constant comparison.
I saw an old example, but my same program does not work.
08-18-2016
12:18 PM
- last edited on
05-08-2025
04:57 PM
by
Content Cleaner
08-18-2016 12:28 PM
-Did you miss step 4 in other image?
-To split the signal to get Numeric value and do comparision as in other image.
08-19-2016 02:45 AM
Hey Uday,
No. I think step 4 is unbundling the two waveforms. The blue wire is still a waveform signal compared to a constant. Apparently the example does not show any usage of OR etc.
08-19-2016
03:02 AM
- last edited on
05-08-2025
04:58 PM
by
Content Cleaner
Waveform datatype has three components t0-Timestamp,dt-time difference between samples,Y-1D array of values of samples of that signal.More on wavefrom data type :https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8qkSAC&l=en-US
-Now you want to compare with what?
-When you right click on blue wire(dynamic data type) did try to create indicator? What it shows? What type of indicator does it allow? : https://www.ni.com/docs/en-US/bundle/labview/page/using-the-dynamic-data-type.html
08-19-2016 03:17 AM
Thanks for your suggestions uday.
Basically i am recording an analog signal and would like to generate a digital output whenever the value of analog signal crosses a certain threshold. Maybe what i am doing is not the right appraoch. Could you please suggest something?
thanks a lot!
08-19-2016 03:57 AM
08-19-2016
04:03 AM
- last edited on
05-08-2025
04:59 PM
by
Content Cleaner
As Pointed by others, you are comparing scalar value to array of numbers: So you will have array of boolean giving the comparision of each element in array vs constant value.
-You need to use https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/or-array-elements.html
to get the Boolean value so that if any one of boolean in array is TRUE it will result in TRUE.
08-19-2016 04:04 AM
Thanks GerdW, will do that.
slight off beat question. how fast can i trigger a digital output based on the results of comparison. is it possible to generate digital output at the rate of 200-300Hz?
08-19-2016 04:09 AM
It depends on the hardware you are working with...