Method: Add for Channels <DataPlugin>
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Add for Channels <DataPlugin>
Method: Add for Channels <DataPlugin>
Adds an object to the Channels collection and returns a Channel object.
Set oChannel = Object.Add(sName, eDataType)
| Object | Channels <DataPlugin> Object with this method | |||||||||||||||||||||
| sName | String Specifies the name of the channel. | |||||||||||||||||||||
| eDataType | Specifies the data type of the channel. Enumeration with the following selection terms:
| |||||||||||||||||||||
| oChannel | Channel <DataPlugin> Returned object |
| Note The channel name must be unique and must not include special characters. |
The following example generates the real data type channel MyChannel in the MyChnGroup channel group.
Dim oMyGrp: Set oMyGrp = Root.ChannelGroups.Add("MyChnGroup") Dim oMyChn: Set oMyChn = oMyGrp.Channels.Add("MyChannel", eR32)