WB-MSx Consumer IR Manual/en: различия между версиями
(Новая страница: «To write the signal number <code>i</code> from the remote control to memory, write 1 to the flag register at <code>5300 + i</code>. Then point the remote control…») |
(Новая страница: «==== Playback of a signal from ROM ==== To play back the signal number <code>i</code> from memory, write 1 to the flag register at <code>5100 + i</code>. If the s…») |
||
Строка 53: | Строка 53: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ==== Playback of a signal from ROM ==== | ||
To play back the signal number <code>i</code> from memory, write 1 to the flag register at <code>5100 + i</code>. If the signal number <code>i</code> has not been recorded before, an error will be returned. While the signal is playing, the flag register at <code>5100 + i</code> will be set to 1 and then set to 0. While the signal is being played, no other operations with the IR transceiver via Modbus will be available. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# | #Give the command to play the signal with the number 1. The device connected to port /dev/ttyRS485-1 has Modbus 16 | ||
root@wirenboard:~# modbus_client --debug -m rtu -b9600 -s2 -pnone /dev/ttyRS485-1 -a16 -t5 -r5101 1 | root@wirenboard:~# modbus_client --debug -m rtu -b9600 -s2 -pnone /dev/ttyRS485-1 -a16 -t5 -r5101 1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ==== Edit the signal in ROM ==== | ||
To edit the signal number <code>i</code> or record it via Modbus (without remote control), write 1 in the flag register at <code>5200 + i</code>. After that, the signal in the form of a sequence of natural numbers (see the figure "Example of the contents of the WB-MIR operational buffer") will be written to the consecutive storage registers, starting with the register <code>2000</code>. At the end of the sequence there will be two consecutive storage registers containing 0. If the signal number <code>i</code> has not been recorded before, the storage registers <code>2000</code> and <code>2001</code> will contain 0. To make changes to the sequence (including writing a Modbus command), you must write the correct sequence to the storage registers using the <code>WRITE_SINGLE_REGISTER</code> and <code>WRITE_MULTI_REGISTERS</code>commands. At the end of the modified sequence, there must also be an end-of-sequence marker - two consecutive storage registers containing 0. To remove the signal, write 0 in the first two storage registers (<code>2000</code> and <code>2001</code>). After editing, write 0 in the flag register at <code>5200 + i</code>. Until the flags register at the address <code>5200 + i</code> will not be a 0, no other operations, including over other signals will not be available. | |||
==== Удаление всех сигналов из постоянной памяти ==== | ==== Удаление всех сигналов из постоянной памяти ==== |