Method: Add for ChannelsToProcess
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Add for ChannelsToProcess
Method: Add for ChannelsToProcess
Adds an object to the ChannelsToProcess collection and returns a Channel object.
Set oAbstractChannel = Object.Add(oChannel)
| Object | ChannelsToProcess Object with this method |
| oChannel | AbstractChannel Specifies the channel to be added. You cannot specify a ImplicitChannel type channel. |
| oAbstractChannel | AbstractChannel Returned object |
The following example generates a new channel MyChannel in the Measurements channel group. The channel contains the values added rowwise of the channels Date and Time.
Dim oStringBlock, oDateChn, oTimeChn, oChannelGroup, oProcessedChn Set oStringBlock = File.GetStringBlock() Set oDateChn = oStringBlock.Channels.Add("Date", eTime) Set oTimeChn = oStringBlock.Channels.Add("Time", eTime) Set oChannelGroup = Root.ChannelGroups.Add("Measurements") Set oProcessedChn = oChannelGroup.Channels.AddProcessedChannel("MyChannel",eTime,eAddProcessor) Call oProcessedChn.Channels.Add(oDateChn) Call oProcessedChn.Channels.Add(oTimeChn)