DIAdem Help

Content Type
Programming Language
Current manual

Object: FixedWidthChannelFormatter

Object: FixedWidthChannelFormatter

The FixedWidthChannelFormatter object contains information about how the values of a channel are represented in the text file.

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

0127+098
0000-876
-128+654

The text file contains the values from two channels. The FixedWidthChannelFormatter object specifies that four characters in a text line correspond to one channel value:

Dim oBlock: Set oBlock = File.GetFixedWidthBlock
Dim oChannelGroup: Set oChannelGroup = Root.ChannelGroups.Add("Channelgroup")
          
Dim oChn1  : Set oChn1  = oBlock.Channels.Add("Channel1", eI32)
oChn1.Formatter.CharacterCount = 4
oChn1.Formatter.SampleWidth = 1
Call oChannelGroup.Channels.AddDirectAccessChannel(oChn1)

Dim oChn2  : Set oChn2  = oBlock.Channels.Add("Channel2", eI32)
oChn2.Formatter.CharacterCount = 4
oChn2.Formatter.SampleWidth = 1

Call oChannelGroup.Channels.AddDirectAccessChannel(oChn2)
oBlock.Position = File.Position

Methods

IsKindOf

Was this information helpful?