12 063
правки
(Новая страница: «---- 3. Read the registers of the relay module WB-MR14 with address 0x01, containing the signature of the device, WBMR14. It is known that the signature is stored…») |
(Новая страница: «In the answer we received 6 16-bit values, each of which contains the code of one ASCII-character. Convert them, replacing the initial '''0x00''' with '''/x''' an…») |
||
Строка 113: | Строка 113: | ||
Data: 0x0057 0x0042 0x004d 0x0052 0x0031 0x0034 </syntaxhighlight> | Data: 0x0057 0x0042 0x004d 0x0052 0x0031 0x0034 </syntaxhighlight> | ||
In the answer we received 6 16-bit values, each of which contains the code of one ASCII-character. Convert them, replacing the initial '''0x00''' with '''/x''' and removing spaces, to the form \x57, etc, which is understandable to the echo command, and display the resulting: | |||
<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 \ | ||
-a1 -t0x03 -r200 -c 6 | \ | -a1 -t0x03 -r200 -c 6 | \ |
правки