04-08-2016 08:54 PM
New to labview this is probably really simple but I am hitting a road block.
I am using a DAQ device to read in 3 values continuously. I want to take these three values and get the percentage of each one from the total, the output to a graph the %. I'm not sure how to get the sum of the values from the array.
For example:
Value 1 = 7
Value 2 =5
Value 3 = 8
Sum = 20
Value 1 % = 35%
Value 2 % = 25%
Value 3 % = 40%
Thanks for any help.
04-08-2016 09:03 PM
Lycle wrote: I'm not sure how to get the sum of the values from the array.
04-08-2016 09:21 PM
This should do the trick. Instead of the 3 random numbers, substitute your inputs. Even better, send the array of inputs directly into the "sum array" input wire.
04-08-2016 10:26 PM
Why do you index the array instead of just plugging it into your divide? You'd get the same result.
04-09-2016 03:39 AM - edited 04-09-2016 03:42 AM
@ijustlovemath wrote:This should do the trick.
That makes very little sense.
Lycle wrote:I am using a DAQ device to read in 3 values continuously. I want to take these three values and get the percentage of each one from the total, the output to a graph the %. I'm not sure how to get the sum of the values from the array.
How should the graph look like? Do you want to chart the three percentages over time forever or do you only want to see the current three percentages?
If you want to chart the three over time, you could do something as follows: