History information.


kedi

Recommended Posts

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.

 

Link to comment
Share on other sites

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]

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.