V CHANNEL, HISTORY, PERSIST


Recommended Posts

I have a sequence reading data and adding it to a channel with AddValue at 30 second intervals. I then use a V.Channel to calculate a new value and this V.Channel has a history of 1500. As I understand HISTORY the V.Channel should have a history of 45,000 seconds. The V.channel table is only displaying 299 data points and not 1500 as I would suspect and the 299 data points are for approx 8970 seconds.

Graphing the data only shows a trace for the 8970 seconds.

What do I have to change to get a 4 hour trace or a 12 hour trace.

Link to comment
Share on other sites

V channel history only applies when you are putting data into it using = (or I suppose, addvalue()), so V.mychannel = 3 or V.mychannel.addvalue(3). If the v channel is simply a formula that references other channels, the result of the calculation determines the history. The result of the calculation is going to have a history equal to the shortest history of all channels referenced that have a history > 1. So, I'm guessing one of your channels has a history of 300. Increase this to increase the resultant history.

Link to comment
Share on other sites

You are 100% correct. Thanks.

So I have to make the channel history used in the calculation as long or longer than the V.channel history.

Will the v.channel history use data from the channel persist history or does it only use the channel history.

Link to comment
Share on other sites

It depends on how you enter the expression. To access persist data anywhere you have to subset using []. Remember, a V channel with an expression entered really is just a shortcut. The V channel doesn't hold anything really, and when you reference it somewhere else in the application, all it does is plugs in whatever you entered in to the expression. You can kind of think of it like a Macro.

Link to comment
Share on other sites

Archived

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