Перейти к содержанию

Навигация

WB-MIR v1 - Modbus IR Remote Control/en: различия между версиями

Новая страница: «On the example of a fully functional module, consider the main controls of the module and their purpose. {| class="wikitable" ! The name of the control !Purpose |…»
(Новая страница: «The 6-byte module signature is stored at address 200. The signature is unique for each model of Wiren Board devices and allows to identify the model by Modbus:»)
(Новая страница: «On the example of a fully functional module, consider the main controls of the module and their purpose. {| class="wikitable" ! The name of the control !Purpose |…»)
 
(не показано 8 промежуточных версий этого же участника)
Строка 217: Строка 217:


{| class="wikitable"
{| class="wikitable"
! style="font-weight: bold;" | Модуль
! style="font-weight: bold;" | Module
! style="font-weight: bold;" | Сигнатура
! style="font-weight: bold;" | Signature
|-
|-
| WB-MIR
| WB-MIR
Строка 224: Строка 224:
|}
|}


Для получения сигнатуры нужно выполнить команду READ_HOLDING_REGISTERS по адресу 200 (длина 6 регистров). Запись в эту область памяти не поддерживается, при попытке записи в недопустимое место возвращается ошибка 3. Пустые места в тексте сигнатуры забиваются значением 0x00.  
To get the signature of a device you need to run command READ_HOLDING_REGISTERS at 200 (length of 6 registers). Writing to this area of memory is not supported, and error 3 is returned when attempting to write to an invalid location. Empty spaces in the signature text are clogged with the value 0x00.  
Начиная с регистра 220 записана дата сборки прошивки, в формате "число'''x00'''время'''x00'''" в виде строки (пример: 'Jan 27 2017 17:01:13'). Длина записи — 21 регистр.
Starting from register 220, the firmware build date is recorded, in the format ''number'''x00'''time'''x00''''' as a string (example: 'Jan 27 2017 17:01:13'). The length of the record is 21 registers.


== Управление модулем из web-интерфейса ==
== Module management from the web interface ==


В настоящий момент для подключения модуля WB-MIR имеется два шаблона '''WB-MIR''' и '''WB-MIR (simple)'''. Шаблон '''WB-MIR''' предоставляет полный набор к функциям модуля из веб-интерфейса, включая обучение, а упрощенная версия '''WB-MIR (simple)''' может использоваться с уже обученным пультом и содержит гораздо меньшее количество элементов управления.
At the moment, to connect the module WB-MIR, there are two templates: '''WB-MIR''' and '''WB-MIR (simple)'''. Template '''WB-MIR''' provides a complete set of functions of the module from the web interface, including training, and a simplified version '''WB-MIR (simple)''' can be used with the already trained remote control and contains a much smaller number of controls.


{| class="wikitable"
{| class="wikitable"
|[[File:Web_wb_mir.png |600px|thumb|right|Веб-интерфейс модуля WB-MIR]]  
|[[File:Web_wb_mir.png |600px|thumb|right|WB-MIR Web interface]]  
|[[File:Web-wb-mir-simple.png|300px|thumb|right|Упрощенный веб-интерфейс модуля WB-MIR]]  
|[[File:Web-wb-mir-simple.png|300px|thumb|right|Simplified WB-MIR web interface]]  
|}
|}




На примере полнофункционального модуля рассмотрим основные органы управления модулем и их назначение.
<div class="mw-translate-fuzzy">
On the example of a fully functional module, consider the main controls of the module and their purpose.
{| class="wikitable"
{| class="wikitable"
! Название элемента управления
! The name of the control
!Назначение
!Purpose
|-
|-
|Input Voltage||Напряжение питания модуля
|Input Voltage||module supply Voltage
|-
|-
|Learn to RAM||Запись ИК-сигнала в оперативный буфер (см. раздел [[#Оперативный режим|Оперативный режим]]). Для обучения контрол переводится в положение ON, после обучения — OFF.   
|Learn-to-RAM||Write the IR signal in the operational buffer (see section [[#Operational mode|Operational mode]]). For learning, the control is turned ON, after learning — OFF.   
|-
|-
|Play from RAM||Воспроизведение ИК-сигнала из оперативного буфера (см. раздел [[#Оперативный режим|Оперативный режим]]).
|Play from RAM||Play the IR signal from the operating buffer (see [[#Operating mode|Operating mode]]).
|-
|-
|Learn to ROMx||Запись ИК-сигнала в соотв. ячейку ПЗУ (см. раздел [[#Постоянный режим|Постоянный режим]]). Для обучения контрол переводится в положение ON, после обучения — OFF.
|Learn to ROMx||IR signal Recording ACC. the cell of the ROM (see section [[#DC mode|DC mode]]). For learning, the control is turn ON position, after learning — OFF.
|-
|-
|Play from ROMx||Воспроизведение ИК-сигнала из соотв. ячейки ПЗУ (см. раздел [[#Постоянный режим|Постоянный режим]]). Для обучения контрол переводится в положение ON, после обучения — OFF.
|Play from ROMx||Play IR signal from resp. ROM cells (see [[#Constant mode|Constant mode]]]). For learning, the control is transferred to THE on position, after learning — OFF.
|-
|-
|ROMx -> RAM||Копирование данных из соотв. ячейки ПЗУ в оперативный буфер для редактирования (см. раздел [[#Постоянный режим|Постоянный режим]]). Для редактирования контрол переводится в положение ON, после редактирования — OFF.
|ROMx -> RAM||Copy data from ACC. ROM cells to the online buffer for editing (see [[#Constant mode|Constant mode]]). For editing, control is transferred to THE on position, after editing — OFF.
|-
|-
|Internal/External Temperature Sensor||Температура внутреннего/внешнего цифрового датчика. Если датчик отсутствует или неисправен, его название выделяется красным цветом.
|Internal/External Temperature Sensor||Internal/external digital temperature sensor. If the sensor is missing or defective, its name is highlighted in red.
|-
|-
|Serial NO||Серийный номер модуля WB-MIR, может потребоваться при обращении в техподдержку.
|Serial NO||the Serial number of the WB-MIR module may be required when contacting technical support.
|-
|-
|Reset all ROM||Сброс содержимого всех ячеек памяти. '''Будьте внимательны, очистка ПЗУ будет выполнена без запроса на подтверждение!'''
|Reset all ROM||Resets the contents of all memory locations. '''Be careful, ROM cleaning will be done without asking for confirmation!'''
|-
|-
|}
|}
</div>


== Управление модулем из командной строки ==
== Command-line device management ==
Программное обеспечение контроллера Wiren Board включает в себя утилиту modbus_client для работы с устройствами, подключенными к выходам RS-485, по протоколу Modbus, подробное описание команды находится на странице [[Modbus-client]]. Доступ к командной строке описан в статье [[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. (Module 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 answer from hexadecimal digits 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 \
Строка 272: Строка 274:
grep Data | sed -e 's/0x00/\\\x/g' -e 's/Data://' -e 's/\s//g'` </syntaxhighlight>
grep Data | sed -e 's/0x00/\\\x/g' -e 's/Data://' -e 's/\s//g'` </syntaxhighlight>


В результате выполнения команды получаем строку, например '''WBMIR'''. В этом примере модуль WB-MIR имеет Modbus-адрес 1.
As a result of the command, we receive string  '''WBMIR'''. The WB-MIR module in the example has Modbus address 1.
12 063

правки