Modbus RTU/TCP Slave/en: различия между версиями

Новая страница: «*'''Word swap''' - change word order for compound values. For example, the value 0x12345678 will be written as 0x56781234.»
(Новая страница: «*'''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''' - поменять порядок слов для составных значений. Например, значение 0x12345678 будет записываться как 0x56781234.
*'''Word swap''' - change word order for compound values. For example, the value 0x12345678 will be written as 0x56781234.


Таким образом, чтобы записать значение в формате little-endian, нужно установить оба последних флага.
Таким образом, чтобы записать значение в формате little-endian, нужно установить оба последних флага.
12 063

правки