UART Communication Settings/en: различия между версиями

Новая страница: «You can find out the current settings of the data exchange parameters by reading the value of the above registers, for example:»
(Новая страница: «You can find out the current settings of the data exchange parameters by reading the value of the above registers, for example:»)
Строка 29: Строка 29:
To be able to access the device that supports the modbus RTU Protocol over the RS-485 bus, it is necessary to know its modbus address, as well as the data exchange rate, parity, the number of stop bits installed on the device. '''Important: Before executing the commands below, stop the wb-mqtt-serial:<code> service wb-mqtt-serial stop service</code>'''
To be able to access the device that supports the modbus RTU Protocol over the RS-485 bus, it is necessary to know its modbus address, as well as the data exchange rate, parity, the number of stop bits installed on the device. '''Important: Before executing the commands below, stop the wb-mqtt-serial:<code> service wb-mqtt-serial stop service</code>'''


Узнать текущие настройки параметров обмена данными, можно, прочитав значение указанных выше регистров, например:
You can find out the current settings of the data exchange parameters by reading the value of the above registers, for example:


     (echo -n '100 \* '; echo  -e `modbus_client --debug -mrtu -b9600 -pnone -s2 /dev/ttyAPP1 -a0x01 -t0x03 -r110 | grep Data | sed -e 's/Data://' -e 's/s//g'` | xargs printf "%d") | xargs expr
     (echo -n '100 \* '; echo  -e `modbus_client --debug -mrtu -b9600 -pnone -s2 /dev/ttyAPP1 -a0x01 -t0x03 -r110 | grep Data | sed -e 's/Data://' -e 's/s//g'` | xargs printf "%d") | xargs expr
12 063

правки