LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital waveform to boolean value

Hi, I have a digital waveform and I want to be able to light up an LED on the front panel every time the waveform is high...

What is the best way to do this?

I know there is a vi that converts a digital waveform to a 2D boolean array, but I just want a single boolean value.

Thanks!

Sunny
0 Kudos
Message 1 of 9
(4,151 Views)
Hi

If you have the data, you can convert it using the mentioned function and loop through it.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 9
(4,138 Views)
How many individual signals are in your digital waveform?? Do you want the LED on when any of the signals is high??
Message 3 of 9
(4,133 Views)
there are 4 digital signals, and I have a seperate LED for each signal.
0 Kudos
Message 4 of 9
(4,118 Views)
Hi

In reference to my previous post, you can just leave the inner for-loop, but you have to extract the 4 channels.

Just have a look at the picture.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 5 of 9
(4,109 Views)
thanks a lot! you've been very helpful...

Sunny 😄
0 Kudos
Message 6 of 9
(4,092 Views)

Sorry to dredge up an old thread, but I am trying to do the same thing.

 

@becktho recommended the following:

 

GOB34_0-1725376625883.png

 

When I try that, I have an error because the digital waveform has different dimensions:

GOB34_3-1725376879990.png

 

Note that the DI digital waveform is formed by this:

 

GOB34_4-1725376955444.png

 

That reads 3 channels of digital in. 

 

This works but it seems excessive, is it what I have to do?:

 

GOB34_1-1725376697502.png

 

Thanks!

EDIT: actually my solution is not working, it doesn't correlate the digital signals to what they "should" be. So what i think should be 2 in the innermost loop is not the output from what I think should be coming out on channel 2. It is actually what is coming out on channel 0.

0 Kudos
Message 7 of 9
(408 Views)

This seems to do it - but is there a better way?

 

 

GOB34_0-1725379820831.png

 

0 Kudos
Message 8 of 9
(387 Views)

Hi GOB,

 


@GOB34 wrote:

This seems to do it - but is there a better way?


Whenever you duplicate identical code you should use a loop instead:

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 9
(377 Views)