12 063
правки
(Новая страница: «*'''Byte swap''' - changes the byte order in Modbus registers. By default, values are written to registers in the big-endian format. If this flag is set, the regi…») |
(Новая страница: «*'''Word swap''' - change word order for compound values. For example, the value 0x12345678 will be written as 0x56781234.») |
||
Строка 87: | Строка 87: | ||
*'''Byte swap''' - changes the byte order in Modbus registers. By default, values are written to registers in the big-endian format. If this flag is set, the register will be interpreted as little-endian. Important: the flag only applies to individual registers; for compound values (larger than 2 bytes), only the order of each two-byte word changes. For example, the value 0x12345678 will be written as 0x34127856, | *'''Byte swap''' - changes the byte order in Modbus registers. By default, values are written to registers in the big-endian format. If this flag is set, the register will be interpreted as little-endian. Important: the flag only applies to individual registers; for compound values (larger than 2 bytes), only the order of each two-byte word changes. For example, the value 0x12345678 will be written as 0x34127856, | ||
* '''Word swap''' - | *'''Word swap''' - change word order for compound values. For example, the value 0x12345678 will be written as 0x56781234. | ||
Таким образом, чтобы записать значение в формате little-endian, нужно установить оба последних флага. | Таким образом, чтобы записать значение в формате little-endian, нужно установить оба последних флага. |
правки