WB-M1W2 1-Wire to Modbus Temperature Measurement Module/en: различия между версиями

Материал из Wiren Board
(Новая страница: «==Installation== 650px|thumb|center|Connect DS18B20 sensors to WB-M1W2 v.1 (left) and v. 2 (right) The converter is installed in cabl…»)
 
(не показаны 23 промежуточные версии этого же участника)
Строка 26: Строка 26:
The converter is installed in cable channels, boxes, soldering boxes. The recommended line length from the transmitter to the 1-Wire remote sensors is no more than 30 meters.
The converter is installed in cable channels, boxes, soldering boxes. The recommended line length from the transmitter to the 1-Wire remote sensors is no more than 30 meters.


== Технические характеристики ==
== Specifications ==
{| class="wikitable"
{| class="wikitable"
! style="text-align: center;" | Параметр
! style="text-align: center;" | Option
! style="text-align: center;" | Значение
! style="text-align: center;" | Value
|-
|-
! colspan="2" |Питание
! colspan="2" |Power
|-
|-
|Напряжение питания
|Supply voltage
|9 — 24 В постоянного тока
|9 — 24 V DC
|-
|-
|Потребляемая мощность
|Power consumption
|
|
0.1 Вт
0.1 W
|-
|-
!colspan="2" | '''Клеммники и сечение проводов'''  
!colspan="2" | '''Terminals and wire section'''
|-
|-
|| Рекомендуемое сечение провода с НШВИ, мм<sup>2</sup> || 0,75 — 1
|| Recommended wire cross-section with tips, mm<sup>2</sup>|| 0,75 — 1
|-
|-
|| Длина стандартной втулки НШВИ, мм || 8
|| Length of the standard sleeve tips, mm || 8
|-
|-
|| Момент затяжки винтов, Н∙м || 0,2
|| Torque of screws, N∙m || 0,2
|-
|-
! colspan="2" |Датчики
! colspan="2" |Sensors
|-
|-
| Внешние датчики
| External sensor
| Возможность подключения двух цифровых датчиков температуры DS18B20.
| Can connect two DS18B20 digital temperature sensors.
|-
|-
|Внутренний датчик
|Internal sensor
|Встроенный NTC-термистор
|Built-in NTC thermistor
|-
|-
! colspan="2" |Входы (подключаются вместо внешних датчиков)
! colspan="2" |Inputs (connect instead of external sensors)
|-
|-
|Количество дискретных входов
|Number of digital inputs
|2
|2
|-
|-
|Тип входов
|Input type
|"Сухой контакт", неизолированные
|Dry contact, uninsulated
|-
|-
|Напряжение в разомкнутом состоянии
|Tension in the open position
|3.3 V
|3.3 V
|-
|-
! colspan="2" |Управление
! colspan="2" |Control
|-
|-
|Интерфейс управления
|Management interface
|RS-485
|RS-485
|-
|-
|Изоляция интерфейса
|Interface isolation
|Неизолированный
|Uninsulated
|-
|-
|Протокол обмена данными
|Communication protocol
|Modbus RTU, адрес задается программно, заводские настройки указаны на наклейке
|Modbus RTU, address is set by software, factory settings are indicated on the label
|-
|-
|Параметры интерфейса RS-485
|RS-485 interface parameters
|  
|  
скорость 9600 бит/с; данные — 8 бит; четность N; стоп-биты 2;  
speed 9600 bps; data bits 8; parity N; stop bits 2;  
Начиная с версии прошивки '''3.1.0''' параметры интерфейсы могут быть настроены программно:
Starting from firmware version "'3.1.0"' parameters interfaces can be configured programmatically:
*Скорость: 1200, 2400, 4800, 9600 (по умолчанию), 19200, 38400, 57600, 115200 бит/с <br>([[UART_Communication_Settings|Настройка параметров обмена данными по RS-485 для modbus-устройств Wiren Board]])
*Speed: 1200, 2400, 4800, 9600 (default), 19200, 38400, 57600, 115200 bit/s <br>([[UART_Communication_Settings|configure RS-485 communication parameters for wiren Board modbus devices]])
*Данные: 8 бит
*Data: 8 bit
*Проверка чётности: нет (по умолчанию), 1 - нечётный (odd), 2 - чётный (even)  
*Parity check: none (default), 1 - odd (odd), 2 - even (even)  
*Стоповых бит: 2 (по умолчанию), 1
*Stop bits: 2 (default), 1
|-
|-
! colspan="2" |Габариты
! colspan="2" |dimensions
|-
|-
| Габариты
| Size
|
|
* 40x15x11 мм;
* 40x15x11 mm;
|-
|-
! colspan="2" |Условия эксплуатации
! colspan="2" |operating Conditions
|-
|-
| Температура воздуха
| Air temperature
| -40°С до +80°С
| -40°C to +80°C
|-
|-
| Относительная влажность воздуха
| Relative humidity
| до 98%,без конденсата влаги
| up to 98%,without moisture condensate
|}
|}


== Дополнительные Функции==
== Additional functionality==


'''Смена адреса''' производится широковещательный (slave_id 0) командой записи (WRITE_SINGLE_REGISTER) в holding register с адресом 128 (0x80).
'''Address change''' is broadcast (slave_id 0) team record (WRITE_SINGLE_REGISTER) to holding register with address 128 (0x80).


По адресу 200 лежит '''сигнатура''' длинной 6 байт. Сигнатура уникальна для каждой модели устройства и позволяет идентифицировать модель.
At adress 200 lies 6 bytes '''signature'''. The signature is unique for each device model and allows you to identify the model.
Для получения сигнатуры нужно выполнить READ_HOLDING_REGISTERS адрес 200 длина 6.   
To obtain the signatures necessary to fulfill READ_HOLDING_REGISTERS, address 200, length 6.   
Запись в эту область памяти не поддерживается, при попытки записи в недопустимое место возвращается ошибка 3.
Writing to this area of memory is not supported and error 3 is returned when attempting to write to an invalid location.


== Карты регистров ==
== Register map ==


{| class="wikitable"
{| class="wikitable"
! rowspan="2" |Регистр/ адрес
! rowspan="2" |Register/ address
! rowspan="2" |Тип
! rowspan="2" |Type
! rowspan="2" |Чтение/ запись
! rowspan="2" |Read/ write
! rowspan="2" |Значение по умолчанию
! rowspan="2" |Default
! rowspan="2" |Формат
! rowspan="2" |Format
! rowspan="2" |Назначение
! rowspan="2" |Purpose
!Версии
!Versions
прошивки
insertions
|-
|-
!
!
Строка 129: Строка 129:
|0x7FFF
|0x7FFF
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с встроенного датчика
|Temperature with built-in sensor
|
|
|-
|-
Строка 137: Строка 137:
|0x7FFF
|0x7FFF
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с первого внешнего датчика 1-Wire
|Temperature from the first external 1-Wire sensor
|
|
|-
|-
Строка 145: Строка 145:
|0x7FFF
|0x7FFF
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с второго внешнего датчика 1-Wire
|Temperature from second external 1-Wire sensor
|
|
|-
|-
Строка 153: Строка 153:
|0
|0
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с первого внешнего датчика 1-Wire. При ошибке опроса датчика сохраняет предыдущее валидное значение (статус датчика читать из discrete регистра 16).
|Temperature from the first external 1-Wire sensor. In case of an error, the sensor retains the previous valid value (sensor status read from the discrete register 16).
| rowspan="2" |начиная с прошивки 4.6.0
| rowspan="2" |starting with firmware 4.6.0
|-
|-
|21
|21
Строка 161: Строка 161:
|0
|0
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с второго внешнего датчика 1-Wire. При ошибке опроса датчика сохраняет предыдущее валидное значение (статус датчика читать из discrete регистра 17).
|Temperature from the second external 1-Wire sensor. In case of an error, the sensor retains the previous valid value (sensor status read from the discrete register 17).
|-
|-
|99||holding||RW||16|| 1 = 0.0625C
|99||holding||RW||16|| 1 = 0.0625 C
||(доступно с версии прошивки 3.10.0)  
||(available from firmware version 3.10.0)  
Фильтр подозрительных значений для датчиков 1-Wire (85.000C, 127.937C).  
Suspicious value filter for 1-Wire sensors (85.000 C, 127.937 C).  
Значения отбрасываются, если предыдущее отличается от подозрительного больше, чем на значение регистра*0.0625C.  
Values are discarded if the previous value differs from the suspect value by more than * 0.0625 C.  
Запишите 0, чтобы отключить фильтр.
Write 0 to disable the filter.
|3.10.0
|3.10.0
|-
|-




|104-105 || input || R || || 32-bit unsigned int  
| 104-105 || input || R|| || 32-bit unsigned int || uptime counter in seconds |
|| Время работы устройства (uptime counter) в секундах
|
|-
|-


Строка 184: Строка 182:
|96
|96
|baud rate / 100
|baud rate / 100
|скорость порта RS-485, '''делённая на 100'''. Допустимые скорости: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
|RS-485 port speed, "'divided by 100"'. Permissible speeds: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
| rowspan="3" |>3.1.0
| rowspan="3" |>3.1.0
|-
|-
Строка 192: Строка 190:
|0
|0
|
|
|настройка бита чётности порта RS-485. Допустимые значения: 0 - нет бита чётности (none), 1 - нечётный (odd), 2 - чётный (even)
|configure the RS-485 port parity bit. Valid values: 0 - no parity bit (none), 1 - odd (odd), 2 - even (even)
|-
|-
|112
|112
Строка 199: Строка 197:
|2
|2
|
|
|количество стоп-битов порта RS-485. Допустимые значения: 1, 2
|number of stop bits of RS-485 port. Valid values: 1, 2
|-
|-
|
|
Строка 213: Строка 211:
|RW
|RW
|0
|0
|отличное от 0
|other than 0
|запись в регистр вызывает перезагрузку модуля без сохранения состояния
|write to the register causes a reset of the module without saving state
|
|
|-
|-
Строка 222: Строка 220:
| -
| -
|mV
|mV
|текущее напряжение питания модуля
|current supply voltage of the module
|
|
|-
|-
Строка 230: Строка 228:
|1
|1
|
|
|Modbus-адрес устройства
|The Modbus address of the device
|
|
|-
|-
| 129 (0x81) || holding || RW || 0 || 0 или 1 || Переход в [[WB-MCU-Flasher|режим загрузчика]] || начиная с прошивки 4.5.0
| 129 (0x81) || holding || RW|| 0 || 0 or 1 || Go to [[WB-MCU-Flasher|bootloader mode]] || starting with firmware 4.5.0
|-
|-
|200-206
|200-206
|input
|input
|R
|R
|см. [[Sensors Modbus Management|Сигнатура устройства]]
|see [[Sensors Modbus Management/en|Device signature]]
|
|
|сигнатура
|signature
|
|
|-
|-
Строка 247: Строка 245:
|R
|R
|
|
|__date__ __time__
|__date__ _ _ time__
|дата сборки прошивки
|the build date of the firmware
|
|
|-
|-
Строка 256: Строка 254:
|216
|216
|°C × 100 (signed)
|°C × 100 (signed)
|Компенсация самонагрева встроенного датчика температуры.
|Self-heating compensation of the built-in temperature sensor.
Значение регистра вычитается из температуры, измеренной встроенным датчиком (регистр 6)
The register value is subtracted from the temperature measured by the built-in sensor (register 6)
|
|
|-
|-
Строка 264: Строка 262:
|R
|R
|
|
|строка, null-terminated
|string, null-terminated
|версия прошивки
|firmware version
|
|
|-
|-
Строка 273: Строка 271:
|
|
|32-bit unsigned int
|32-bit unsigned int
|уникальный идентификатор (S/N)
|unique identifier (S/N)
|
|
|-
|-
Строка 288: Строка 286:
|RW
|RW
|0
|0
|0 или 1
|0 or 1
|Режим входа №1: 0 - 1-wire, 1 - дискретный вход
|Input mode # 1: 0 - 1-wire, 1 - discrete input
| rowspan="6" |>=4.0.0
| rowspan="6" |>=4.0.0
|-
|-
Строка 296: Строка 294:
|RW
|RW
|0
|0
|0 или 1
|0 or 1
|Режим входа №2: 0 - 1-wire, 1 - дискретный вход
|Input mode # 2: 0 - 1-wire, 1 - discrete input
|-
|-
|277
|277
Строка 304: Строка 302:
|
|
|16-bit unsigned int
|16-bit unsigned int
|Счетчик срабатываний для входа №1
|Counter for input #1
|-
|-
|278
|278
Строка 311: Строка 309:
|
|
|16-bit unsigned int
|16-bit unsigned int
|Счетчик срабатываний для входа №2
|Counter positives for the entrance №2
|-
|-
|0
|0
Строка 317: Строка 315:
|R
|R
|
|
|0 или 1
|0 or 1
|Текущее состояние входа №1: 0 - разомкнут, 1 - замкнут на GND. Если для входа выбран режим 1-wire, значение всегда равно 0.
|Current state of input #1: 0 - open, 1 - closed on GND. If 1-wire mode is selected for input, the value is always 0.
|-
|-
|1
|1
Строка 324: Строка 322:
|R
|R
|
|
|0 или 1
|0 or 1
|Текущее состояние входа №2: 0 - разомкнут, 1 - замкнут на GND. Если для входа выбран режим 1-wire, значение всегда равно 0.
|Current state of input #2: 0 - open, 1 - closed on GND. If 1-wire mode is selected for input, the value is always 0.
|-
|-
|16
|16
Строка 331: Строка 329:
|R
|R
|
|
|0 или 1
|0 or 1
|Статус опроса датчика 1-Wire входа №1: 0 - датчик не подключен, 1 - датчик подключен и корректно опрашивается
|Sensor polling status 1-Wire input no. 1: 0 - sensor not connected, 1 - sensor connected and correctly polled
| rowspan="2" |начиная с прошивки 4.6.0
| rowspan="2" |starting with firmware 4.6.0
|-
|-
|17
|17
Строка 339: Строка 337:
|R
|R
|
|
|0 или 1
|0 or 1
|Статус опроса датчика 1-Wire входа №2: 0 - датчик не подключен, 1 - датчик подключен и корректно опрашивается
|Sensor polling status 1-Wire input no. 2: 0 - sensor not connected, 1 - sensor connected and correctly polled
|}
|}


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

Текущая версия на 14:22, 19 июля 2019

Другие языки:
WB-M1W2
WB-M1W2, v.2


Buy online

WB-M1W2 is a compact bus coupler, designed for polling two digital 1-Wire

thermometers (DS18B20) via Modbus RTU Protocol on RS-485 bus.

Inputs

The module is powered by screw terminals V+ and GND, RS-485 line is connected to inputs A and B.

Version 1: Two external DS18B20 temperature sensors are connected via a parasitic power supply circuit, when the +5V and GND pins are connected to the GND terminal, the data output is connected to 1-Wire terminal 1 or 2.


Version 2: Two external temperature sensor DS18B20 is connected on an active power circuit, connect the sensor GND to the GND terminal, a data output connected to terminal 1 or 2 1-Wire, the sensor supply voltage is applied from the output to 5V out. In version 2 there is an additional protection of inputs 1-Wire.

Also, the device has an internal temperature sensor (NTC-thermistor).

In firmware version 4.0.0 and higher, it is also possible to configure the 1-Wire inputs of the module as discrete or counting inputs.

Installation

Connect DS18B20 sensors to WB-M1W2 v.1 (left) and v. 2 (right)

The converter is installed in cable channels, boxes, soldering boxes. The recommended line length from the transmitter to the 1-Wire remote sensors is no more than 30 meters.

Specifications

Option Value
Power
Supply voltage 9 — 24 V DC
Power consumption

0.1 W

Terminals and wire section
Recommended wire cross-section with tips, mm2 0,75 — 1
Length of the standard sleeve tips, mm 8
Torque of screws, N∙m 0,2
Sensors
External sensor Can connect two DS18B20 digital temperature sensors.
Internal sensor Built-in NTC thermistor
Inputs (connect instead of external sensors)
Number of digital inputs 2
Input type Dry contact, uninsulated
Tension in the open position 3.3 V
Control
Management interface RS-485
Interface isolation Uninsulated
Communication protocol Modbus RTU, address is set by software, factory settings are indicated on the label
RS-485 interface parameters

speed 9600 bps; data bits 8; parity N; stop bits 2; Starting from firmware version "'3.1.0"' parameters interfaces can be configured programmatically:

dimensions
Size
  • 40x15x11 mm;
operating Conditions
Air temperature -40°C to +80°C
Relative humidity up to 98%,without moisture condensate

Additional functionality

Address change is broadcast (slave_id 0) team record (WRITE_SINGLE_REGISTER) to holding register with address 128 (0x80).

At adress 200 lies 6 bytes signature. The signature is unique for each device model and allows you to identify the model. To obtain the signatures necessary to fulfill READ_HOLDING_REGISTERS, address 200, length 6. Writing to this area of memory is not supported and error 3 is returned when attempting to write to an invalid location.

Register map

Register/ address Type Read/ write Default Format Purpose Versions

insertions

6 input R 0x7FFF °C × 16 (signed) Temperature with built-in sensor
7 input R 0x7FFF °C × 16 (signed) Temperature from the first external 1-Wire sensor
8 input R 0x7FFF °C × 16 (signed) Temperature from second external 1-Wire sensor
20 input R 0 °C × 16 (signed) Temperature from the first external 1-Wire sensor. In case of an error, the sensor retains the previous valid value (sensor status read from the discrete register 16). starting with firmware 4.6.0
21 input R 0 °C × 16 (signed) Temperature from the second external 1-Wire sensor. In case of an error, the sensor retains the previous valid value (sensor status read from the discrete register 17).
99 holding RW 16 1 = 0.0625 C (available from firmware version 3.10.0)

Suspicious value filter for 1-Wire sensors (85.000 C, 127.937 C). Values are discarded if the previous value differs from the suspect value by more than * 0.0625 C. Write 0 to disable the filter.

3.10.0
104-105 input R 32-bit unsigned int
110 holding RW 96 baud rate / 100 RS-485 port speed, "'divided by 100"'. Permissible speeds: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 >3.1.0
111 holding RW 0 configure the RS-485 port parity bit. Valid values: 0 - no parity bit (none), 1 - odd (odd), 2 - even (even)
112 holding RW 2 number of stop bits of RS-485 port. Valid values: 1, 2
120 (0x78) holding RW 0 other than 0 write to the register causes a reset of the module without saving state
121 (0x79) input R - mV current supply voltage of the module
128 (0x80) holding RW 1 The Modbus address of the device
129 (0x81) holding RW 0 0 or 1 Go to bootloader mode starting with firmware 4.5.0
200-206 input R see Device signature signature
220-241 input R __date__ _ _ time__ the build date of the firmware
245 holding RW 216 °C × 100 (signed) Self-heating compensation of the built-in temperature sensor.

The register value is subtracted from the temperature measured by the built-in sensor (register 6)

250-269 input R string, null-terminated firmware version
270-271 input R 32-bit unsigned int unique identifier (S/N)
275 holding RW 0 0 or 1 Input mode # 1: 0 - 1-wire, 1 - discrete input >=4.0.0
276 holding RW 0 0 or 1 Input mode # 2: 0 - 1-wire, 1 - discrete input
277 input R 16-bit unsigned int Counter for input #1
278 input R 16-bit unsigned int Counter positives for the entrance №2
0 discrete R 0 or 1 Current state of input #1: 0 - open, 1 - closed on GND. If 1-wire mode is selected for input, the value is always 0.
1 discrete R 0 or 1 Current state of input #2: 0 - open, 1 - closed on GND. If 1-wire mode is selected for input, the value is always 0.
16 discrete R 0 or 1 Sensor polling status 1-Wire input no. 1: 0 - sensor not connected, 1 - sensor connected and correctly polled starting with firmware 4.6.0
17 discrete R 0 or 1 Sensor polling status 1-Wire input no. 2: 0 - sensor not connected, 1 - sensor connected and correctly polled

Device signature

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:

Module Signature
WB-M1W2 WBMIR'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. Starting from register 220, the firmware build date is recorded, in the format numberx00timex00 as a string (example: 'Jan 27 2017 17:01:13'). The length of the record is 21 registers.

Operation of the transmitter with the Wiren Board controller

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

Channel name Appointment
Input Voltage module supply Voltage
Internal Temperature Sensor Internal/external digital temperature sensor. If the sensor is missing or defective, its name is highlighted in red.
External Sensor 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 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 module Serial number may be required when contacting technical support.

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.

To display the registers corresponding to the discrete inputs, select the template "WB-M1W2 DI":

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):

Channel name Purpose
Discrete Input 1 Input status 1. 0 - open, 1 - closed on GND
Discrete Input 2 Input status 2. 0 - open, 1 - closed on GND
Counter 1 Input operation counter 1
Counter 2 Input counter 2

Command-line device management

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. Access to the command line is described in SSH.

Register reading example

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:

echo  -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \
-a1 -t0x03 -r200 -c 6 | \
grep Data | sed -e 's/0x00/\\\x/g' -e 's/Data://' -e 's/\s//g'`

As a result of the command, we receive string WBM1W2. The WB-M1W2 module in the example has Modbus address 1.

Device firmware update

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 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.

Images and drawings of the device


По ссылкам ниже вы можете скачать изображения и чертежи устройства WB-M1W2.

Corel Draw 2018: WB_M1W2.cdr.zip

Corel Draw PDF: WB_M1W2.cdr.pdf

Autocad 2013 DXF: WB_M1W2.dxf.zip

Autocad PDF: WB_M1W2.pdf