02-06-2019 03:41 AM
Hello everyone,
I am currently facing a problem regarding the output of the array max/min function. Basically, I want to multiply the index at which the maximum point of my array occurs with a constant number, however the multiplication's output remains at zero. As you can see below this is my program. I have also attached a screenshoot of the multiplication's output in the front panel which remains constantly at zero. Any ideas regarding how to resolve this issue will be appreciated!
Thanks in advance!
02-06-2019 03:57 AM
02-06-2019 05:49 AM
02-06-2019 06:32 AM
Hi John
You don't seem to have noticed that your 'index' is actually an array. That is because your hardware is producing more than one channel of data (and therefore the input to the max/min vi is a 2D array). The number you are looking at is then actually the index of the channel producing the max value. Expand the x*y indicator to show the index of the max datum or use the Index Array vi to give you the correct index value.
David
02-06-2019 08:43 AM
Quick note: indicator that you show is not zero - it is empty array, big difference.
If input array is empty, Array Max&Min is giving [-1; -1] (at least in LV2011), so you show result of the VI that has not run.