From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect the right part "average value" to one of 0-3?

Solved!
Go to solution

To me the question is not clear.

What do you want to connect ? You need a 1D num array and we can see only two 1d nums arrays here : "Data" and the output of your signal/numeric conversion.

0 Kudos
Message 2 of 12
(1,620 Views)

Thank you for your answer. I want to average each of the four parameters 0, 1, 2 and 3 separately. But I don't know if I should use the data conversion before linking it to the average program (or "mean") on the right

0 Kudos
Message 3 of 12
(1,531 Views)

Later I tried to average the values of each of the four parameters using data partitioning, but the data obtained seemed to be only the average of the current value, not the average of all values.Unbenannt2.PNGUnbenannt3.PNG

0 Kudos
Message 4 of 12
(1,604 Views)

The average function is doing its job right, that's for sure.

 

Have you probes your wires to check the inputs ? What is coming out your HMB block : 4 carateristics / 1 measure or 4 caracteristics / n measures?

0 Kudos
Message 5 of 12
(1,591 Views)
Solution
Accepted by topic author han0504

You could just use a FOR loop to do the averages for you.  No need to split the signals and will work when you add or remove channels.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 12
(1,579 Views)

Thank you for your reply! What comes out of the HBM are four parameters, namely force, angle, and two torques. All are sensors connected to the motor and displayed through HBM amplifiers.

0 Kudos
Message 7 of 12
(1,572 Views)

Thanks for the reply, I tried to use the FOR loop, but no data, you can see the pic belowUnbenannt5.PNGUnbenannt6.PNG

0 Kudos
Message 8 of 12
(1,567 Views)

Hi Han,

 


@han0504 wrote:

I tried to use the FOR loop, but no data,

Why do you think there is "no data"? There definitely is data, the indicator shows a zero…

 

Why do you use only the last value of the FOR loop to display as "mean"?

Don't you need to average of all waveforms in your waveform array?

-> Set the output tunnel of the FOR loop to autoindexing - and convert the scalar mean indicator to an array…

 

Which format do you specify for that indicator? Did you use the same format as for your Drehmoment value? You know "0.00083…" rounds to "0.00" when using a %.2f format…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 12
(1,562 Views)

Hi GerdW,

Thanks for ur kind reply.

I changed it and now I can show the average, but one question is, because the data from HBM is the data of four sensors, so the average value directly connected to HBM is the total average of four parameters (force, angle, moment 1, moment 2), not the average value of one parameter alone, do I need to split the data?
Thank you for your opinion!

 

Best wishes

Han

0 Kudos
Message 10 of 12
(1,550 Views)