The sentence "find the only one that is true" implies that there is exactly one that is true, so finding it implies getting its index. We already know the value and that it xists exactly once.
The only complication would be in the case of higher dimensions, but he only gave a single number of elements, so it is probably 1D.
That might be true. (Ha ha, see what I did there)
But how often do people on the forum make a suggestion with what is implied or assumed only to find out they were wrong?
I'm sorry it's a 2D array.
Ok wire the 2D boolean array directly to "boolean to 0,1" followed by "Array min&max". Then get the index of the max (second output from the top). The index is a 1D array with two elements and indicates the location of the TRUE in the 2D array.
If your array is aready numeric (0, or 1), yo can skip the first step.
It doesn't seem to want to wire to that. I'll include my code and another forum link to preface what the DAQmx is for. I'm sorry I'm new to LabVIEW and am not too familiar with it yet.
In Test 1(2) the Digital 1D Wfm looks like it sends out a boolean array.
Why do you attach two similarly named VIs with identical size. How do we know where to look?
You have a 1D array of digital waveforms. This has nothing to do with a 1D or 2D boolean array. However you could easily convert to a 2D boolean array, especially of all digital waveflorms have the same lenght (do they?). Use a simple autoidenxing FOR loop. See how far you get.
Okay gotcha. So with my 1D array of digital waveforms I have my index on the left column and T/F on the right. I'm trying to use search 1D array to find where it's T. I don't really understand how to use 1D array of digital waveforms constants though to make this happen.
Any tips on that?
Any tips on that?
You can always convert it to a boolean array and the use our earlier advice. Here's one possible solution using this function😞
(Sorry, I never use dynamic or waveform data. Maybe you could even configure your DAQ IO to output boolean arrays directly. (I don't have DAQmx installed, so I cannot tell).
Are there any array functions that work with 1D arrays of digital waveforms, because non seem to like being wired to the 1D array of digital waveforms?