LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Max value

I have given array input(which is string) to 'index array' and converted to number..after that I performed some task..Once the conditions are over I need corresponding array to be stored in single column one by one so that I can find max value..but my problem is that I'm getting array only in a single cell(not storing one by one but changing within a cell) so I couldn't find max value.what should I do?

0 Kudos
Message 1 of 5
(2,673 Views)
Use a shift register. Converting a scalar to an array results in an array with a single element no matter how many times you do it.

Haven't you taken the tutorials yet? It's silly to use a loop to convert the string array to numbers, one by one. The conversion function accepts an array of strings as an input. Make sure you have Context Help turned on.
0 Kudos
Message 2 of 5
(2,663 Views)

Ya used shift register but facing same prob..values are changing but getting same value throughout the column

0 Kudos
Message 3 of 5
(2,636 Views)
Because you probably just keep passing In the same value over and over again. Have you probed the result of your index array. As I said, using the Lolo and the index astray is just not the way to do it.
0 Kudos
Message 4 of 5
(2,626 Views)

@vinomurthy wrote:

Ya used shift register but facing same prob..values are changing but getting same value throughout the column


Your code is completely pointless. You really need to start with a few programming tutorials!

 

None of your inputs to the loops are autoindexing, they are just plain scalars (a boolean and two DBLs) and even if you spin the loop 1140 times there will be nothing new except for the growing array inder some conditions. In addition, your indicator is in the TRUE case, thus it will not get updated if the boolean input is FALSE and you'll never see anything interesting. The array in the shift register is not wired across in the FALSE case, thus it get zeroed out whenever FALSE occurs. It is pointless to update the array indicator in the TRUE case, that indicator belongs after the loop wired to the right shift register. Don't set the index of your array diagram constant to 1, because now we cannot see if it is really empty.

What is the purpose of the outer stacked sequence structure? Nobody in ther right mind uses these anymore (except for very special occasions). The outcome of your FOR loop can be predicted from first principles and the result generated without using any loop at all!

 

Pictures are useless for debugging, because many things are hidden. Attach the actual VI instead!

 

Message 5 of 5
(2,600 Views)