12 063
правки
(Новая страница: «'''Address change''' is broadcast (slave_id 0) team record (WRITE_SINGLE_REGISTER) to holding register with address 128 (0x80).») |
|||
(не показано 20 промежуточных версий этого же участника) | |||
Строка 40: | Строка 40: | ||
0.1 W | 0.1 W | ||
|- | |- | ||
!colspan="2" | | !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 | ||
Строка 106: | Строка 106: | ||
'''Address change''' is broadcast (slave_id 0) team record (WRITE_SINGLE_REGISTER) to holding register with address 128 (0x80). | '''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 == | ||
{| 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) | ||
| | |Temperature from the first external 1-Wire sensor | ||
| | | | ||
|- | |- | ||
Строка 145: | Строка 145: | ||
|0x7FFF | |0x7FFF | ||
|°C × 16 (signed) | |°C × 16 (signed) | ||
| | |Temperature from second external 1-Wire sensor | ||
| | | | ||
|- | |- | ||
Строка 153: | Строка 153: | ||
|0 | |0 | ||
|°C × 16 (signed) | |°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). | ||
| rowspan="2" | | | rowspan="2" |starting with firmware 4.6.0 | ||
|- | |- | ||
|21 | |21 | ||
Строка 161: | Строка 161: | ||
|0 | |0 | ||
|°C × 16 (signed) | |°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. | |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 | |3.10.0 | ||
|- | |- | ||
|104-105 || input || R || || 32-bit unsigned int | | 104-105 || input || R|| || 32-bit unsigned int || uptime counter in seconds | | ||
|| | |||
| | |||
|- | |- | ||
Строка 184: | Строка 182: | ||
|96 | |96 | ||
|baud rate / 100 | |baud rate / 100 | ||
| | |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 | ||
| | | | ||
| | |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 | ||
| | | | ||
| | |number of stop bits of RS-485 port. Valid values: 1, 2 | ||
|- | |- | ||
| | | | ||
Строка 213: | Строка 211: | ||
|RW | |RW | ||
|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 | | 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 | ||
| | |see [[Sensors Modbus Management/en|Device signature]] | ||
| | | | ||
| | |signature | ||
| | | | ||
|- | |- | ||
Строка 247: | Строка 245: | ||
|R | |R | ||
| | | | ||
|__date__ | |__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. | ||
The register value is subtracted from the temperature measured by the built-in sensor (register 6) | |||
| | | | ||
|- | |- | ||
Строка 264: | Строка 262: | ||
|R | |R | ||
| | | | ||
| | |string, null-terminated | ||
| | |firmware version | ||
| | | | ||
|- | |- | ||
Строка 273: | Строка 271: | ||
| | | | ||
|32-bit unsigned int | |32-bit unsigned int | ||
| | |unique identifier (S/N) | ||
| | | | ||
|- | |- | ||
Строка 288: | Строка 286: | ||
|RW | |RW | ||
|0 | |0 | ||
|0 | |0 or 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 | |0 or 1 | ||
| | |Input mode # 2: 0 - 1-wire, 1 - discrete input | ||
|- | |- | ||
|277 | |277 | ||
Строка 304: | Строка 302: | ||
| | | | ||
|16-bit unsigned int | |16-bit unsigned int | ||
| | |Counter for input #1 | ||
|- | |- | ||
|278 | |278 | ||
Строка 311: | Строка 309: | ||
| | | | ||
|16-bit unsigned int | |16-bit unsigned int | ||
| | |Counter positives for the entrance №2 | ||
|- | |- | ||
|0 | |0 | ||
Строка 317: | Строка 315: | ||
|R | |R | ||
| | | | ||
|0 | |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 | |1 | ||
Строка 324: | Строка 322: | ||
|R | |R | ||
| | | | ||
|0 | |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 | |16 | ||
Строка 331: | Строка 329: | ||
|R | |R | ||
| | | | ||
|0 | |0 or 1 | ||
| | |Sensor polling status 1-Wire input no. 1: 0 - sensor not connected, 1 - sensor connected and correctly polled | ||
| rowspan="2" | | | rowspan="2" |starting with firmware 4.6.0 | ||
|- | |- | ||
|17 | |17 | ||
Строка 339: | Строка 337: | ||
|R | |R | ||
| | | | ||
|0 | |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: | |||
{| 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: | ||
|} | |} | ||
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 ''number'''x00'''time'''x00''''' 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 | |||
{| 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 | ||
| | |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 | ||
| | |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. | ||
|- | |- | ||
|} | |} | ||
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": | |||
[[File:M1w2 as discrete inputs example.png|400px|thumb|center| | [[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 | ||
|| | ||Input status 1. 0 - open, 1 - closed on GND | ||
|- | |- | ||
|Discrete Input 2 | |Discrete Input 2 | ||
|| | ||Input status 2. 0 - open, 1 - closed on GND | ||
|- | |- | ||
|Counter 1 | |Counter 1 | ||
| | |Input operation counter 1 | ||
|- | |- | ||
|Counter 2 | |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/en| Modbus client]]. Access to the command line is described in [[SSH/en| 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: | |||
<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> | ||
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 [[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}} |
правки