Property: ByteOrder for Formatter
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Properties > Property: ByteOrder for Formatter
Property: ByteOrder for Formatter
Specifies the byte order in the file if the data type consists of several bytes.
Object.ByteOrder
Object | Formatter Object with this property | ||||||
Object.ByteOrder | Receives the sequence of bytes in the file. Enumeration with read and write access and the following selection terms:
|
If the byte order is BigEndian, the last byte is the byte with the highest value. If the byte order is LittleEndian, the opposite applies. In the former case, the number 255 is FF 00 in hexadecimal, and in the latter case, it is 00 FF.
The following example interprets the first byte as the higher-value byte when the channel values are read.
File.Formatter.ByteOrder = eBigEndian Dim oBlock : Set oBlock = File.GetBinaryBlock() Dim oChn1 : Set oChn1 = oBlock.Channels.Add("MyChannel1", eI32) Dim oChn2 : Set oChn2 = oBlock.Channels.Add("MyChannel2", eI32) Dim oMyGrp : Set oMyGrp = Root.ChannelGroups.Add("MyChannelGroup") oMyGrp.Channels.AddDirectAccessChannel(oChn1) oMyGrp.Channels.AddDirectAccessChannel(oChn2)