Method: AddDirectAccessChannel for Channels <DataPlugin>
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > 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)
Object | Channels <DataPlugin> Object with this method |
oDAChn | DirectAccessChannel Object to be added |
oDirectAccessChannel | DirectAccessChannel Returned object |
The following example shows the instructions required for reading the lines listed below:
12.06.2004; 1.3452¶ 13.06.2004; 1.7834¶ 14.06.2004; 2.0034¶ 15.06.2004; 1.9996¶ 16.06.2004; 1.5649¶ 17.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)