LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation of min and max and average over a given interval

Hello everyone ,


I acquire data and at the end of the acquisition I display the data and then I calculate the average and the max and min of each signal, but I want to do it on a data interval (on the part that I am turning off my signal, I have been working with a event strucute but it is not working, can you help me resolve the problem?


thanks in advance

0 Kudos
Message 1 of 4
(100 Views)

Hi Amel,

 


@ameletudiante99 wrote:

I want to do it on a data interval (on the part that I am turning off my signal, I have been working with a event strucute but it is not working, can you help me resolve the problem?


What is "not working"?

What is the exact problem/error?

 

You read the x scale min/max from your graph and use those values directly to get a subset of the waveform array (aka several plots!) displayed in the waveform graph: how should that even work???

When you want to analyze a subset of each waveform then you need to apply the GetWaveformSubset function on each of the waveforms!

(Did you even try to debug your own VI?)

 

Why is your event loop set to run forever???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(93 Views)

Hi

 thank you for your feedback
the problem I encounter and that it does not calculate the min and the max and the average when I zoom.

I retrieve the min and max of the graph to indicate the first index and the vector size on which I want to do my calculation

yes I moved

 

 

0 Kudos
Message 3 of 4
(76 Views)

Hi Amel,

 


@ameletudiante99 wrote:

I retrieve the min and max of the graph to indicate the first index and the vector size on which I want to do my calculation


But you apply the "vector size" to the wrong data structure!

You should not use ArraySubset on your array of plots, but instead you need to apply the WfmSubset function on each waveform/plot…

 


@ameletudiante99 wrote:

yes I moved


???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(70 Views)