DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Method: Add for BinaryDirectAccessChannels

Method: Add for BinaryDirectAccessChannels

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

Set oDirectAccessChannel = Object.Add(Name, DataType, [ContiguousValues])
ObjectBinaryDirectAccessChannels
Object with this method
NameString
Specifies the name of the channel.
DataTypeSpecifies the data type of the channel.
Enumeration with the following selection terms:
 0
eNoType 
Not defined
 1
eI8 
8-bit integer
 5
eByte 
Byte
 2
eI16 
16-bit integer
 3
eI32 
32-bit integer
 4
eI64 
64-bit integer
 9
eR32 
32-bit real
 10
eR64 
64-bit real
 30
eTime 
Time
 23
eString 
Text
 8
eU64 
64-bit unsigned integer
 7
eU32 
32-bit unsigned integer
 6
eU16 
16-bit unsigned integer
 24
eEnum 
Enumeration
[ContiguousValues]LongInteger
Specifies how many values of a block belong to a channel.
The value -1 means that the number of values based on the number of channels are calculated automatically.
oDirectAccessChannelDirectAccessChannel
Returned object

The following example reads a binary file that contains three channels with 32-bit integer values. The channel data is in blocks. A block is structured in such a way that the first three values belong to the first channel, the fourth value belongs to the second channel, and the fifth and sixth values belong to the third channel:


Dim oBlock : Set oBlock = File.GetBinaryBlock()
Dim oChn1 : Set oChn1 = oBlock.Channels.Add("Channel1", eI32, 3)
Dim oChn2 : Set oChn2 = oBlock.Channels.Add("Channel2", eI32, 1)
Dim oChn3 : Set oChn3 = oBlock.Channels.Add("Channel3", eI32, 2)
In This Section
Was this information helpful?