The problem with the selection seems to be that you are using two
different indexing tunnels on the for loop. One of them loops over
every value of the first incoming waveform, the other one over all
waveforms in the incoming array. The value you wire to the N terminal
will be ignored, the number of loop executions will be the minimum of
your indexes. Anyway, the loop doesn't seem to do what you wanted:
- If you want to store the complete waveform: loop over all waveforms,
check for the maximum of each of them and write it just like you do
now.
- If you want to store only the values of each waveform that actually
exceeded the threshold: You can either use 2 nested for loops to
iterate over each value of each waveform. Use shift registers to
create new arrays of timestamps / values for the values you want to
store. You need to either convert the waveform to x-y-pairs (VI on
analog waveform palette) or calculate your own timestamps. You might
as well want to check out the "Search waveform" VI. Configure it so
that value+-tolerance covers the band between your expected minimum
value and your threshold value. The VI will give you the indices and
timestamps of all fits.

Reply via email to