Перейти к содержанию

Навигация

Modbus-client/en: различия между версиями

Новая страница: «---- 5.5. Let's turn on relay 6 on WB-MR14 relay module(addresses of flags registers start from zero, remember that!). Use the command 0x05 (Write Single Coil):…»
(Новая страница: «---- 4. Determine the current address of the device connected to the Wiren Board. The address is unknown to us and we do not want to change it. To do this, at the…»)
(Новая страница: «---- 5.5. Let's turn on relay 6 on WB-MR14 relay module(addresses of flags registers start from zero, remember that!). Use the command 0x05 (Write Single Coil):…»)
Строка 131: Строка 131:


----
----
5. На модуле WB-MR14 включим реле с номером 6 (адреса регистрв флагов начинаются с нуля, помним об этом!). Используем для этого команду 0x05 (Write Single Coil):
5.5. Let's turn on relay 6 on WB-MR14 relay module(addresses of flags registers start from zero, remember that!). Use the command 0x05 (Write Single Coil):
<syntaxhighlight lang="bash">modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a1 -t0x05 -r0x05 0x01</syntaxhighlight>
<syntaxhighlight lang="bash">modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a1 -t0x05 -r0x05 0x01</syntaxhighlight>
Ответ:
Answer:
<syntaxhighlight lang="bash">Data to write: 0x1
<syntaxhighlight lang="bash">Data to write: 0x1
Opening /dev/ttyAPP1 at 9600 bauds (N, 8, 2)
Opening /dev/ttyAPP1 at 9600 bauds (N, 8, 2)
12 063

правки