06-29-2021 09:51 AM
I have multiple digital waveforms in a waveform array. I need to get certain waveforms by name (no control over this or the order of the waveforms) and check if any of their values are 1. If any value is one then I need to output a 1 into an array. The waveforms will always have the same number of elements and always have just one bit.
If my waveforms look like this going in:
Waveform A
0
1
0
0
0
Waveform B
0
0
0
0
0
Waveform C
0
0
0
0
1
I need an array like this coming out:
Resulting array:
0
1
0
0
1
I am an old text based programmer and sometimes do manual steps that LabVIEW takes care of automatically. The best way I have come up with is the following.
Can this be faster or better? VI attached. This seems to take about 0.001 seconds on average to execute on my machine.
Also, I know I need to do a better job of error handling, I am focusing on logic right now.
06-29-2021 10:25 AM - edited 06-29-2021 10:26 AM
I think this is what you are after. You need to do some hoop jumping to convert your waveforms into boolean arrays and then you can just OR the arrays together.
06-29-2021 01:21 PM
Thank you!
That takes about the same amount of time but it is a bit more "organic". It takes advantage of how LabVIEW already handles looping.