LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array max/min output

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!Screenshot 2019-02-06 at 09.34.20.pngScreenshot 2019-02-06 at 09.36.27.png

0 Kudos
Message 1 of 5
(2,581 Views)

Hi John,

 

ArrayMinMax works fine for me:

check.png

So what are your input data for your calculation?

 

Mind to cleanup your block diagram before posting (using AutoCleanup)?

(Mind to attach your VI downconverted for LV2017?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,578 Views)

Your x*y output is connected to the index output of Max/Min. And if index 0 is Max, then the output will be 0. Connect it to the max value output if you want the max value.

Certified LabVIEW Architect
0 Kudos
Message 3 of 5
(2,557 Views)

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

Message 4 of 5
(2,549 Views)

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.

Message 5 of 5
(2,532 Views)