Method: AddImplicitChannel for Channels <Data>
- Updated2024-09-12
- 2 minute(s) read
Internal Data > Methods > Method: AddImplicitChannel for Channels <Data>
Method: AddImplicitChannel for Channels <Data>
Creates a new implicit channel in the script interface for internal data.
Set oImplicitChannel = Object.AddImplicitChannel(Name, StartValue, Increment, Size, DataType, [DestIndex])
Object | Channels <Data> Object with this method | |||||||||
Name | String Specifies the name of the new implicit channel. | |||||||||
StartValue | Variant Specifies the start value of the new implicit channel. | |||||||||
Increment | Variant Specifies the step width of the new implicit channel. To generate a date/time channel, enter the step width as a real value in seconds. | |||||||||
Size | LongInteger Specifies the number of values of the new implicit channel. | |||||||||
DataType | Enumeration with the following selection terms:
| |||||||||
[DestIndex] | LongInteger Specifies the position of the new channel in the collection of existing channels. If you do not specify the DestIndex parameter, DIAdem creates the new channel at the end of the collection. | |||||||||
oImplicitChannel | ImplicitChannel <Data> Returned object |
The following example generates a DataTypeFloat64 type implicit channel:
VBScript | Python |
Dim oMyGroup, oMyChannel Set oMyGroup = Data.Root.ChannelGroups Set oMyChannel = oMyGroup.Add("MyChnGrp").Channels.AddImplicitChannel("MyImplChn", 1, 1, 100,DataTypeFloat64)
The following example creates an implicit DataTypeDate type channel with a step width of one day:
VBScript | Python |
Dim oMyGroups, oMyGroup, oMyChannel, MyDate Set oMyGroups = Data.Root.ChannelGroups Set oMyGroup = oMyGroups.Add("MyChnGrp") Set oMyChannel = oMyGroup.Channels.AddImplicitChannel("MyImplChn", DateSerial(2015, 3, 15), Cdbl(3600*24), 100, DataTypeDate)