DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

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])
ObjectChannels <Data>
Object with this method
NameString
Specifies the name of the new implicit channel.
StartValueVariant
Specifies the start value of the new implicit channel.
IncrementVariant
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.
SizeLongInteger
Specifies the number of values of the new implicit channel.
DataTypeEnumeration with the following selection terms:
10 DataTypeChnFloat64 64-bit real values
23 DataTypeChnString Text
30 DataTypeChnDate Time values
[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.
oImplicitChannelImplicitChannel <Data>
Returned object

The following example generates a DataTypeFloat64 type implicit channel:

VBScriptPython

 

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:

VBScriptPython

 

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)
In This Section
Was this information helpful?