12 063
правки
(Новая страница: «'''Using address 0 will reset all addresses to all devices on the bus! Never use this command if more than one device is connected to the RS-485 port!'''») |
(Новая страница: «<syntaxhighlight lang="bash">root@wirenboard:~# modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a0 -t0x06 -r0x80 1 Data to write: 0x1 Opening /dev/ttyAPP1 at…») |
||
Строка 32: | Строка 32: | ||
ERROR occured! | ERROR occured! | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The error message should not be frightening: Modbus devices do not respond to commands sent to the broadcast address. Check if the address is still in the address register: | |||
<syntaxhighlight lang="bash">root@wirenboard:~# modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a1 -t0x03 -r0x80 | <syntaxhighlight lang="bash">root@wirenboard:~# modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a1 -t0x03 -r0x80 | ||
Opening /dev/ttyAPP1 at 9600 bauds (N, 8, 2) | Opening /dev/ttyAPP1 at 9600 bauds (N, 8, 2) | ||
Строка 41: | Строка 41: | ||
Data: 0x0001 | Data: 0x0001 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Fine, the device with address 0x01 returned value 1 when reading register 0x80 (we remember that one register stores two eight-bit values, so the output of the command contains four hexadecimal digits: 0x0001). The yellow led blinked again when referring to the device. |
правки