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: 

maximum value

Solved!
Go to solution

Hi Guys,

             am reading numerical data from a PLC, via datasocket. The data is displayed in real time on a front pannel indiactor and historically on afront pannel chart.

 

I want to display the max, min and mean of the realtime data on the front pannel, i apriciate that to do this i need to store the data as i go (perhaps in an array?)

 

I can't use shift registers as the whole program resides in a loop and i dont want to have a loop within a loop.

 

So how can i build up samples and display the max, min, mean of this data ?

 

cheers, Zac

0 Kudos
Message 1 of 5
(2,603 Views)
Solution
Accepted by topic author Zac_Acal
If you have your data in a waveform chart, you can use the History Data Property. This will give you accses to the data in the chart. Se picture


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 5
(2,590 Views)

Hi Zac,

if you already have a loop, then you also can use shiftregisters. How long is the history of your chart. You can use the chart history to calcualte min, max and mean, but i think you should check which solution is faster.

 

Hope it helps.

Mike

0 Kudos
Message 3 of 5
(2,587 Views)

Hi, Zac,

 

Probably you can use MeanPtByPt.vi?

 

(located in Signal Processing->Point by Point -> Probability  Statistics PtByPt -> Mean PtByPt.vi)?

With this VI you will be able to calculate Mean within given Window without extra for loop. Actually this VI organized as functional global, so you can build you own VIs for Min/Max by the same way.

 

Andrey.

 

0 Kudos
Message 4 of 5
(2,575 Views)

Thanks for the help,

 

i've gone with the first soloution as being able to show the max, min, mean of the actual chart data is perfect for my application.

 

Thanks, Zac

0 Kudos
Message 5 of 5
(2,571 Views)