DIAdem Help

Method: Add for Channels <DataPlugin>

  • Updated2024-09-12
  • 1 minute(s) read

Method: Add for Channels <DataPlugin>

Adds an object to the Channels collection and returns a Channel object.

Set oChannel = Object.Add(sName, eDataType)
ObjectChannels <DataPlugin>
Object with this method
sNameString
Specifies the name of the channel.
eDataTypeSpecifies the data type of the channel.
Enumeration with the following selection terms:
2 eI16 16-bit integer values
3 eI32 32-bit integer values
9 eR32 32-bit real values
10 eR64 64-bit real values
23 eString Text
24 eEnum Enumeration
30 eTime Time values
oChannelChannel <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)