Modbus DIA Block Register Map
From Digi Developer
(Note: this feature is being tested, and will be included in a future release of DIA)
Contents |
DIA Modbus Register Map (Basic)
The block oriented Modbus server returns a fixed register map common for all supported devices. Registers which are unused (for example the analog outputs on a analog input device) shall be zero (0x0000).
Basic Register Map
All supported devices start with the basic register map, where any analogs are converted to fixed point integers.
| Modbus | Offset | Mode | Name | Description |
| 4x00001 | 0 | Read-Only | -- | Magic Number, always 0xE801 for this register map |
| 4x00002 | 1 | Read-Only | status | Device Status as 16 bits, See below |
| 4x00003 | 2 | Read-Only | din | Digital Inputs as 16 bits, 0 if none |
| 4x00004 | 3 | Read-Only | ain1 | Analog Input #1, 0 if none |
| 4x00005 | 4 | Read-Only | ain2 | Analog Input #2, 0 if none |
| 4x00006 | 5 | Read-Only | ain3 | Analog Input #3, 0 if none |
| 4x00007 | 6 | Read-Only | ain4 | Analog Input #4, 0 if none |
| 4x00008 | 7 | Read-Write | dot | Digital Outputs as 16 bits, 0 if none |
| 4x00009 | 8 | Read-Write | aot1 | Analog Output #1, 0 if none |
| 4x00010 | 9 | Read-Write | aot2 | Analog Output #2, 0 if none |
| 4x00011 | 10 | Read-Write | aot3 | Analog Output #3, 0 if none |
| 4x00012 | 11 | Read-Write | aot4 | Analog Output #4, 0 if none |
| 4x00013 | 12 | Read-Only | volt | Battery Voltage as Fixed Point, so 0 = 0.0v, 420 = 4.20v up to 65535 = 635v, 0 if none |
| 4x00014 | 13 | Read-Only | timestamp | Low Word of UNIX style date/time of last data reading |
| 4x00015 | 14 | Read-Only | -- | High Word of UNIX style date/time of last data reading |
| 4x00016 | 15 | Read-Only | dd | Lower word of the XBee DD value |
| 4x00017 | 16 | Read-Only | mac | bytes 7-8 of IEEE MAC Address |
| 4x00018 | 17 | Read-Only | -- | bytes 5-6 of IEEE MAC Address |
| 4x00019 | 18 | Read-Only | -- | bytes 3-4 of IEEE MAC Address |
| 4x00020 | 19 | Read-Only | -- | bytes 1-2 of IEEE MAC Address |
Device Status Bits
The 16-bit device status shall be
| mask | bit | Description |
| 0x0001 | 1 | Driver Fault; if 1 then some DIA driver fault is true |
| 0x0002 | 2 | Device is off-line; if 1 then the device is not responding. Depending on config, normally there will be no Modbus response in this situation to simulate an unreachable slave. |
| 0x0004 | 3 | Low-battery signal; if 1 then device signals a low-battery condition |
| 0x0008 | 4 | Device Fault; if 1 then device is talking, but indicating internal error |
| 0x0010 | 5 | Event Sample; if 1 then the data in this sample was triggered by an event, such as alarm exception or the operator pressing the 'wake / sample' button. If 0, then this sample is a normal time cycle update. |
| 0x00E0 | 6-8 | Reserved |
| 0x0100 | 9 | If 1, then Digital Input register is valid |
| 0x0200 | 10 | If 1, then Analog Input registers are valid |
| 0x0400 | 11 | If 1, then Digital Output register is valid |
| 0x0800 | 12 | If 1, then Analog Output registers are valid |
| 0xF000 | 13-16 | Reserved |
Supported Devices
Digi XBee AIO Adapter (mbdia_xbee_aio driver)
Returns four analog values only - registers NOT listed in the table below are always zero.
| Modbus | Offset | Mode | Description |
| 4x00001 | 0 | Read-Only | Magic Number, always 0xE801 for this register map |
| 4x00002 | 1 | Read-Only | Device Status as 16 bits |
| 4x00004 | 3 | Read-Only | Analog Input #1, see format below |
| 4x00005 | 4 | Read-Only | Analog Input #2, see format below |
| 4x00006 | 5 | Read-Only | Analog Input #3, see format below |
| 4x00007 | 6 | Read-Only | Analog Input #4, see format below |
| 4x00014 | 13 | Read-Only | Low Word of UNIX style date/time of last data reading |
| 4x00015 | 14 | Read-Only | High Word of UNIX style date/time of last data reading |
The fixed-point format for the registers shall be:
- type = 'raw', then the raw binary value
- type = 'off', then zero
- type = 'TenV', then voltage * 1000, so 4.23v is 4230
- type = 'CurrentLoop', then current * 1000, so 12.10mA is 12100
- type = 'Differential', then voltage * 1000, so -1.23v is 0xFB32 and +1.23v is 1230
Digi XBee /L/T/H Sensor Adapter (mbdia_xbee_sensor driver)
Returns four analog values only - registers NOT listed in the table below are always zero.
| Modbus | Offset | Mode | Description |
| 4x00001 | 0 | Read-Only | Magic Number, always 0xE801 for this register map |
| 4x00002 | 1 | Read-Only | Device Status as 16 bits |
| 4x00004 | 3 | Read-Only | Temperature as Deg C, fixed point * 100, so 2300 = 23.00 DegC |
| 4x00005 | 4 | Read-Only | Light as direct value |
| 4x00006 | 5 | Read-Only | Humidity as fixed point * 100, so 7950 = 79.50 % RH, zero if this sensor does NOT have a humidity input |
| 4x00007 | 6 | Read-Only | Temperature as Deg F, fixed point * 100, so 7950 = 79.50 DegF |
| 4x00014 | 13 | Read-Only | Low Word of UNIX style date/time of last data reading |
| 4x00015 | 14 | Read-Only | High Word of UNIX style date/time of last data reading |
Digi Smart Plug (mbdia_xbee_rpm driver)
Returns four analog values only - registers NOT listed in the table below are always zero.
| Modbus | Offset | Mode | Description |
| 4x00001 | 0 | Read-Only | Magic Number, always 0xE801 for this register map |
| 4x00002 | 1 | Read-Only | Device Status as 16 bits |
| 4x00003 | 2 | Read-Only | Digital Outputs: bit 0x0001 is plug status |
| 4x00004 | 3 | Read-Only | Current as Amps, fixed point * 100, so 230 = 2.3 Amps |
| 4x00005 | 4 | Read-Only | Light as direct value |
| 4x00006 | 5 | Read-Only | Temperature as Deg C, fixed point * 100, so 2950 = 29.50 DegC |
| 4x00007 | 6 | Read-Only | Always zero |
| 4x00014 | 13 | Read-Only | Low Word of UNIX style date/time of last data reading |
| 4x00015 | 14 | Read-Only | High Word of UNIX style date/time of last data reading |
Massa M3 Ultrasonic Level Sensor (mbdia_massa_m3 driver)
Any registers not show below are returned as zero (0) - but that might change in the future.
| Modbus | Offset | Mode | Description |
| 4x00001 | 0 | Read-Only | Magic Number, always 0xE801 for this register map |
| 4x00002 | 1 | Read-Only | Device Status as 16 bits |
| 4x00004 | 3 | Read-Only | Level as inches, fixed point * 100, so 1423 = 14.23 inches |
| 4x00005 | 4 | Read-Only | Temperature as Deg C, fixed point * 100, so 2315 = 23.15 DegC |
| 4x00006 | 5 | Read-Only | Target Strength, fixed point * 100, so 7500 = 75% |
| 4x00007 | 6 | Read-Only | Latest Event counter as word, so 1 to 65535 |
| 4x00013 | 12 | Read-Only | Battery Voltage, fixed Point * 100, so 420 = 4.20v |
| 4x00014 | 13 | Read-Only | Low Word of UNIX style date/time of last data reading |
| 4x00015 | 14 | Read-Only | High Word of UNIX style date/time of last data reading |
Notes:
- Target Strength is only 0%, 25%, 50%, 75% or 100%
Categories: DIA | Modbus
