Property: DecimalPoint for StringChannelFormatter
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Properties > Property: DecimalPoint for StringChannelFormatter
Property: DecimalPoint for StringChannelFormatter
Specifies the decimal symbol used in a channel.
If you do not use the property DecimalPoint to specify an individual decimal symbol for a channel, the DataPlugin uses the general decimal symbol to read in the channel. Use the Formatter.DecimalPoint property to specify the decimal symbol generally used in the file.
Use the DecimalPoint property to assign an individual decimal symbol to an empty string, so that the general decimal symbol is valid for this channel.
Object.DecimalPoint
Object | StringChannelFormatter Object with this property |
Object.DecimalPoint | String with read and write access |
The following example shows the settings required for reading the lines listed below:
0,001234; 1.941434¶ 0,002398; 2.342393¶ 0,001296; 3.451496¶ 0,001628; 4.071624¶ 0,001683; 5.261483¶
The DecimalPoint property specifies a comma as the decimal symbol of the file and a special decimal symbol which is only valid for the second channel.
File.Formatter.TrimCharacters = " " File.Formatter.LineFeeds = vbNewLine File.Formatter.DecimalPoint = "," File.Formatter.Delimiters = ";" Dim oBlock, oGrp, oChn Set oBlock = File.GetStringBlock() Set oGrp = Root.ChannelGroups.Add("MyChannelGroup") Set oChn = oBlock.Channels.Add("Date1",eTime) Call oGrp.Channels.AddDirectAccessChannel(oChn) Set oChn = oBlock.Channels.Add("Date2",eTime) oChn.Formatter.DecimalPoint = "." Call oGrp.Channels.AddDirectAccessChannel(oChn)