History vs. Persistance yet again


Recommended Posts

I'm doing a graph of historical data using subsetting as you used it in the HistorySample2.ctl file that you had posted in the forums. about 50 channels of data is collected at 60 second intervals. I had set the history to be relatively low (1500 samples) and the Persist to be high (1,000,000 samples) allowing many many months of data to be displayed.

But I want to graph the SUM of several channels on particular traces. No matter where or how I try to do the math functions, I'm only graphing the 1500 history data points.

Normally the graph defaults to a short-term view of the most recent data, and the user can scroll through older data and longer time-frames as desired.

So two questions:

Is using a short history / long persist the best way to do this? If I'm saving months and months of data, I don't want to lose data if there's a power outage or some other reset.

Where / how is the best way to add up the points for several channels in this situation? I tried using V channels but they only used the history points, not persist.

Thanks!

Link to comment
Share on other sites

The subsetting (specifying which points you want) must exist, and it must be right after the channel name, so:

sum(channelA[0,5000]) + sum(channelB[0,5000])

this won't work:

sum(channelA + channelB)[0,5000]

You can, of course, subset by time as well, but the subsetting must be after the channel name. In fact, you generally want to do this always for efficiency reasons.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.