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

Навигация

WB-M1W2 1-Wire to Modbus Temperature Measurement Module/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 | rowspan="…»)
 
(не показано 15 промежуточных версий этого же участника)
Строка 40: Строка 40:
0.1 W  
0.1 W  
|-
|-
!colspan="2" | эээTerminals and wire section'''
!colspan="2" | '''Terminals and wire section'''
|-
|-
|| Recommended wire cross-section with tips, mm<sup>2</sup>|| 0,75 — 1
|| Recommended wire cross-section with tips, mm<sup>2</sup>|| 0,75 — 1
Строка 341: Строка 341:
|}
|}


==Сигнатура устройства ==
== 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-M1W2
| WB-M1W2
Строка 353: Строка 353:
|}
|}


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


== Работа преобразователя с контроллером Wiren Board ==
== Operation of the transmitter with the Wiren Board controller ==
Для преобразователя WB-M1W2 в контроллере Wiren Board предусмотрен соответствующий шаблон WB-M1W2.
For Converter WB-M1W2 in the Wiren Board controller is equipped with the corresponding pattern for WB-M1W2.


Описание каналов шаблона
Description of the channels of the template
{| class="wikitable"
{| class="wikitable"
! Название канала
! Channel name
!Назначение
!Appointment
|-
|-
|Input Voltage||Напряжение питания модуля
|Input Voltage||module supply Voltage
|-
|-
|Internal Temperature Sensor||Температура внутреннего/внешнего цифрового датчика. Если датчик отсутствует или неисправен, его название выделяется красным цветом.
|Internal Temperature Sensor||Internal/external digital temperature sensor. If the sensor is missing or defective, its name is highlighted in red.
|-
|-
|External Sensor 1
|External Sensor 1
|Температура внешнего цифрового датчика, подключенного к порту 1. Если датчик отсутствует или неисправен, его название выделяется красным цветом.
|Temperature of an external digital sensor connected to port 1. If the sensor is missing or defective, its name is highlighted in red.
|-
|-
|External Sensor 2
|External Sensor 2
|Температура внешнего цифрового датчика, подключенного к порту 2. Если датчик отсутствует или неисправен, его название выделяется красным цветом.
|Temperature of an external digital sensor connected to port 2. If the sensor is missing or defective, its name is highlighted in red.
|-
|-
|Serial NO||Серийный номер модуля, может потребоваться при обращении в техподдержку.
|Serial NO||module Serial number may be required when contacting technical support.
|-
|-
|}
|}


С версии прошивки 4.0.0 преобразователь WB-M1W2 позволяет конфигурировать каждый из двух входов как дискретный вход. Режим входа задаётся в регистрах 275-276 (см. таблицу выше). В контроллерах Wiren Board этот режим настраивается через Setup-секцию драйвера.
Since firmware version 4.0.0, the WB-M1W2 Converter allows you to configure each of the two inputs as a discrete input. The input mode is set in registers 275-276 (see the table above). In Wiren Board controllers this mode is configured through the Setup-section of the driver.


Для отображения регистров, соответствующих дискретным входам, нужно выбрать шаблон "WB-M1W2 DI":  
To display the registers corresponding to the discrete inputs, select the template "WB-M1W2 DI":  


[[File:M1w2 as discrete inputs example.png|400px|thumb|center|Пример настройки WB-M1W2 на дискретные входы.]]
[[File:M1w2 as discrete inputs example.png|400px|thumb|center|Example of WB-M1W2 configuration for discrete inputs.]]


Каналы дискретных входов (не забудьте перевести входы в режим дискретных, как написано выше):
Channels of discrete inputs (do not forget to put the inputs in discrete mode, as written above):
{| class="wikitable"
{| class="wikitable"
! Название канала
! Channel name
!Назначение
!Purpose
|-
|-
|Discrete Input 1
|Discrete Input 1
||Состояние входа 1. 0 - разомкнут, 1 - замкнут на GND
||Input status 1. 0 - open, 1 - closed on GND
|-
|-
|Discrete Input 2
|Discrete Input 2
||Состояние входа 2. 0 - разомкнут, 1 - замкнут на GND
||Input status 2. 0 - open, 1 - closed on GND
|-
|-
|Counter 1
|Counter 1
|Счётчик срабатываний входа 1
|Input operation counter 1
|-
|-
|Counter 2
|Counter 2
|Счётчик срабатываний входа 2
|Input counter 2
|}
|}


== Управление модулем из командной строки ==
== 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 we are connected to the module of the desired type. (Module wb-mqtt-serial should 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 \
Строка 412: Строка 412:
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>


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


== Обновление прошивки устройства ==
== Device firmware update ==
Начиная с новых версий микропрограмм устройства поддерживается функционал обновления прошивки (микропрограммы) по протоколу Modbus. Это дает возможность расширять функциональные возможности устройств и устранять ошибки в микропрограммном обеспечении непосредственно на месте монтажа. Подробнее о перепрошивке устройств рассказано в статье [[WB-MCU-Flasher|Загрузка прошивок на устройства Wiren Board]]. Список версий прошивок, поддерживающих обновление, а также устройств, для которых эта функция реализована, можно найти в статье [[Firmware_Changelog]].
Starting with the new firmware versions of the device, the firmware update functionality (firmware) via the Modbus Protocol is supported. This makes it possible to extend the functionality of the devices and eliminate errors in the firmware directly at the installation site. Read more about flashing devices described in the article [[WB-MCU-Flasher|Download firmware to Wiren Board devices]]. A list of firmware versions that support the update, as well as devices for which this feature is implemented, can be found in [[Firmware_Changelog/en| Firmware Changelog]].


==Изображения и чертежи устройства==
== Images and drawings of the device ==
{{Wbincludes:WBPictures|1}}
{{Wbincludes:WBPictures|1}}
12 063

правки