Relay Module Modbus Management/en: различия между версиями

Новая страница: «==== Register reading example === Let's check whether it is true that we are connected to the module of the desired type. (Service wb-mqtt-serial needs to be stop…»
(Новая страница: «== Command-line device management == The Wiren Board controller software includes modbus_client utility to work with devices connected to the RS-485 outputs, via…»)
(Новая страница: «==== Register reading example === Let's check whether it is true that we are connected to the module of the desired type. (Service wb-mqtt-serial needs to be stop…»)
Строка 233: Строка 233:
The Wiren Board controller software includes  modbus_client utility to work with devices connected to the RS-485 outputs, via Modbus Protocol, the detailed description of the command is on the page [[Modbus client/en| Modbus client]]. Access to the command line is described in [[SSH/en| SSh]].
The Wiren Board controller software includes  modbus_client utility to work with devices connected to the RS-485 outputs, via Modbus Protocol, the detailed description of the command is on the page [[Modbus client/en| Modbus client]]. Access to the command line is described in [[SSH/en| SSh]].


=== Пример чтения регистров ===
==== Register reading example ===
Проверим, верно ли, что мы подключились именно к модулю нужного типа. (Сервис wb-mqtt-serial должен быть предварительно остановлен). По адресу 200 хранится уникальная сигнатура длиной в 6 регистров. Прочтем 6 регистров, начиная с адреса 200, и преобразуем полученный шестнадцатеричный ответ в символьную строку:
Let's check whether it is true that we are connected to the module of the desired type. (Service wb-mqtt-serial needs to be stopped). At address 200, a unique signature of 6 registers is stored. Let's read 6 registers, starting with the address 200, and convert the received hexadecimal answer into a character string:


<syntaxhighlight lang="bash">echo  -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \
<syntaxhighlight lang="bash">echo  -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \
12 063

правки