Sensors Modbus Management/en: различия между версиями

Нет описания правки
(Новая страница: «| 110 || holding || RW|| 96 || baud rate / 100 || RS-485 port speed, '''divided by 100'''. Permissible speeds: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200…»)
 
(не показано 14 промежуточных версий 3 участников)
Строка 168: Строка 168:
|0
|0
|ppm (400-1500)
|ppm (400-1500)
|Manual calibration of CO2 sensor. For calibration, write down here the current CO2 concentration measured by another instrument
|Service register, doesn't present in most devices. Manual calibration of CO2 sensor. For calibration, write down here the current CO2 concentration measured by another instrument
| -
| -
| -
| -
Строка 181: Строка 181:
|0xFF
|0xFF
|days'
|days'
|Cycle time for co sensor self-calibration algorithm (ABC)
|Service register, doesn't present in most devices. Cycle time for co sensor self-calibration algorithm (ABC)
| -
| -
| -
| -
Строка 221: Строка 221:
|96||holding||R||2000 / 5000||ppm
|96||holding||R||2000 / 5000||ppm
||(available from firmware version 3.5.0) CO2 concentration measurement Range. Valid values: 2000, 5000, 10000.  
||(available from firmware version 3.5.0) CO2 concentration measurement Range. Valid values: 2000, 5000, 10000.  
| -
| -
| -
|C
|C
|3.5.0
|-
|91||holding||RW||20 (200 ms)||× 10 ms
||Время усреднения шума
|S
| -
| +
|S
|S
|-
|92
||holding
||RW||0||x0.0625||Служебный регистр HOLD_REG_SPL_RAW_OFFSET - сдвиг значения АЦП
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|S
|S
|S
|4.9.0
|-
|93
||holding
||RW||0||x0.1dB||Служебный регистр HOLD_REG_SPL_OFFSET - поправка к значению уровня шума
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|S
|S
|S
|4.9.0
|-
|-
|95
|holding
|RW
|1
|1 or 0
|Режим автокалибровки датчика CO2 (ABC) на атмосферный уровень CO2
| -
| -
| -
|C
|
|-
|96||holding||R||2000 / 5000||ppm
||(доступно с версии прошивки 3.5.0) Диапазон измерения концентрации CO2. Допустимые значения: 2000, 5000, 10000.
| -
| -
| -
| -
Строка 265: Строка 323:




|100
||input
||R||||||Служебный регистр HOLD_REG_SPL_RAW_INT
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|S
|S
|S
|
|-




Строка 278: Строка 347:
||R||||||Service register HOLD_REG_TH_ERRORS
||R||||||Service register HOLD_REG_TH_ERRORS
|colspan="5"|all
|colspan="5"|all
|
|-
|103
||holding
||RW||||||Служебный регистр HOLD_REG_ILLUMINANCE_MODE
|<nowiki>+</nowiki>
|<nowiki>+</nowiki>
|<nowiki>+</nowiki>
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|
|
|-
|-
Строка 320: Строка 401:




| 110 || holding || RW|| 96 || baud rate / 100 || RS-485 port speed, '''divided by 100'''. Permissible speeds: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 <br>([[UART_Communication_Settings|configure RS-485 communication parameters for wiren Board modbus devices]])
| 110 || holding || RW|| 96 || baud rate / 100 || RS-485 port speed, '''divided by 100'''. Permissible speeds: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 <br>([[UART_Communication_Settings/en|Configure RS-485 communication parameters for Wiren Board Modbus devices]])
|colspan="5"|all
|colspan="5"|all
| rowspan="3" |>3.1.0
| rowspan="3" |>3.1.0
Строка 342: Строка 423:
|
|
|-
|-
| 129 (0x81) || holding || RW|| 0 || 0 or 1 || Go to [[WB-MCU-Flasher|bootloader mode]]  
| 129 (0x81) || holding || RW|| 0 || 0 or 1 || Go to [[WB-MCU-Flasher/en|bootloader mode]]  
|colspan="5"|all || 4.5.0
|colspan="5"|all || 4.5.0
|-
|-
Строка 413: Строка 494:
|}
|}


===Карта регистров флагов (Coils)===
===Coils===
Регистры, связанные с ИК-управлением, описаны в статье [[WB-MSx_Consumer_IR_Manual]].
Registers related to IR control are described in [[WB-MSx_Consumer_IR_Manual/en]].


{| border="1" class="wikitable" style="text-align:center"
{| border="1" class="wikitable" style="text-align:center"
!Начальный адрес || Количество || Назначение || В модификациях
!Starting address || Quantity || Purpose || In modifications
!С версии прошивки
!From firmware version
|-
|-
| 0 || 1 || style="text-align:left" |Включение пищалки (buzzer) || WB-MSW2, WB-MSW v.3
| 0 || 1 || style="text-align:left" |Enable buzzer (buzzer) || WB-MSW v.3, WB-MSW2
|
|
|-
|-
| 1 || 1 || style="text-align:left" | Принудительная калибровка встроенного датчика CO2. Включать после 20 минут работы при уровне CO2, равном 400 ppm || WB-MSW2
| 1 || 1 || style="text-align:left" | Forced calibration of the built-in CO2 sensor. Turn on after 20 minutes of operation at a CO2 level of 400 ppm || WB-MSW v.3, WB-MSW2
|
|
|-
|-
| 2 || 1 || style="text-align:left" | Включение подогрева (heater) в микросхеме сенсора температуры и влажности HDC1080 || WB-MS (в серии 2017 г.), WB-MSW2, WB-MSW v.3
| 2 || 1 || style="text-align:left" | Turn on the heating (heater) in the temperature and humidity sensor chip HDC1080 || WB-MS, WB-MSW v.3, WB-MSW2
|3.2.0
|3.2.0
|-
|-
|3
|3
|1
|1
|Включение датчика CO2
|Power on/off of the CO2 sensor
|WB-MSW v.3
|WB-MSW V. 3
|4.1.0
|4.1.0
|-
|-
| 10 || 1 || style="text-align:left" | Включение зеленого светодиода || WB-MSW v.3  
| 10 || 1 || style="text-align:left" | Green led on || WB-MSW v.3  
|
|
|-
|-
| 11 || 1 || style="text-align:left" | Включение красного светодиода || WB-MSW v.3  
| 11 || 1 || style="text-align:left" | Enable red led || WB-MSW v.3  
|
|
|-
|-
|}
|}


===Сигнатура устройства ===
== Device signature ==


По адресу 200 хранится сигнатура модуля длиной 6 байт. Сигнатура уникальна для каждой модели устройств Wiren Board и позволяет идентифицировать модель по Modbus:
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:


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


Для получения сигнатуры устройства нужно выполнить команду 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.


== Управление модулем из командной строки ==
== 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 hexadecimal answer 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/ttyRS485-1 \
-a1 -t0x03 -r200 -c 6 | \
-a1 -t0x03 -r200 -c 6 | \
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>


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