Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Convert array or dynamic to Boolean array

Solved!
Go to solution

Dear All,
I am using simple edge detection VI with included sub VI, so in that VI they use Boolean array as an input and in my case I have an array data of my signal or also have dynamic waveform of my timer signal it actually looked like square wave so I want to use my data to the input of that VI, but I didn't convert my array data to boolean array. How I can do this conversion to the use of array data into that VI.

Please find attached file of related to my problem.
Thanks.

 

0 Kudos
Message 1 of 3
(121 Views)

Hi Shesha,

 

It is not an exact solution. How about this?

You save previous wave data using a shift register. 

Then subtract the data value of the previous loop in next loop. 

You have to consider threshold value & first loop value. 

AnalogRisingDetection.PNG

0 Kudos
Message 2 of 3
(95 Views)
Solution
Accepted by topic author Shesha12345
04-16-2019 07:38 PM

If your data is literally a square wave and low level is 0, just send the whole array through a "Not Equal to 0?" primitive.  If the low is not a zero or you want to specify the threshold yourself, just use any of the less/greater than (or equal to) primitives.  Wire your array of numerics into one terminal and a single numeric into the other:

 

cap.pngCapture.PNG

There is also the "Transition Measurements" VI that will return the location of transitions in a waveform, which is probably a better way to achieve what you want than by making a boolean array.  I'm also not sure what the 1000 ms wait is doing in your loop unless you only want that graph to update once a second...

0 Kudos
Message 3 of 3
(85 Views)