DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Method: AddDirectAccessChannel for Channels <DataPlugin>

Method: AddDirectAccessChannel for Channels <DataPlugin>

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

Set oDirectAccessChannel = Object.AddDirectAccessChannel(oDAChn)
ObjectChannels <DataPlugin>
Object with this method
oDAChnDirectAccessChannel
Object to be added
oDirectAccessChannelDirectAccessChannel
Returned object

The following example shows the instructions required for reading the lines listed below:

12.06.2004; 1.345213.06.2004; 1.783414.06.2004; 2.003415.06.2004; 1.999616.06.2004; 1.564917.06.2004; 1.8957

The example first describes the file format and then transfers the file contents into two DirectAccess channels.

File.Formatter.TrimCharacters = " "
File.Formatter.LineFeeds  = vbNewLine
File.Formatter.TimeFormat = "DD.MM.YYYY"
File.Formatter.Delimiters = ";"
File.Formatter.Decimalpoint = "."

Dim oBlock : Set oBlock = File.GetStringBlock()
Dim oChn1  : Set oChn1  = oBlock.Channels.Add("Time", eTime)
Dim oChn2  : Set oChn2  = oBlock.Channels.Add("YShift", eR64)
Dim oMyGrp : Set oMyGrp = Root.ChannelGroups.Add("MyChannelGroup")
Call oMyGrp.Channels.AddDirectAccessChannel(oChn1)
Call oMyGrp.Channels.AddDirectAccessChannel(oChn2)
In This Section
Was this information helpful?