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.
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.
06-16-2009 10:23 AM
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
Solved! Go to Solution.
06-16-2009 10:38 AM
06-16-2009 10:41 AM
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
06-16-2009 11:03 AM
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.
06-16-2009 11:08 AM
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