kedi Posted July 30, 2021 Share Posted July 30, 2021 Is history an array or a log? I ask because I want to copy history into an array so I have more control over it. Is it called history as log or array? I wish to copy it to an array so I can refer to the array that I control as a resource. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted July 30, 2021 Share Posted July 30, 2021 The history of a channel is an array, except that it only accepts AddValue() for changing it. So, you can't do myChannel[3] = 4, but you can do myChannel.addValue(4). You can read from the channel using all the standard array functions / syntax, which includes simply copying the current history: global chanCopy = myChannel or: chanCopy = myChannel[0,999] Quote Link to comment Share on other sites More sharing options...
kedi Posted August 1, 2021 Author Share Posted August 1, 2021 So each channel has a separate history array? Three values, the record number, time and channel value? As it appears in the table of the channel? If you make a group of channels, does that create an array of more columns to encompass them in one array? I am being a pest about this history thing. But it seems to be a powerful resource, if I can understand it fully. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted August 2, 2021 Share Posted August 2, 2021 Yes, because each channel can have different timing, or different success rates communicating, they have to be independent. It is actually just two values, time and channel value. Record number is just the index into the array. A group of channels is just an organization tool for the workspace (and helpful with channel.listall() or readGroup()). That is all it is. The channels are still independent of each other. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.