DUSB and D232 Communications v0.4
DUSB and D232 Communications v0.4
Communications
Specification
Plasmatronics
Rev 0.4
20240423
Please note that the DUSB and D232 are powered via the connection to the Dingo.
Communications Parameters
All communications are RTU mode.
As per the Modbus specification, the default communications parameters are:
9600 baud
8 data bits
Even parity
1 stop bit
No flow control
The default server (slave) address is 0x08.
Alternate values are supported and are configurable via software settings.
Function codes 0x03, 0x04 and 0x10 all refer to an identical register space.
0x1250
0x125D
0x1F21
0x1F23
REMOTE
0x1F30
0x1F35
0x2000
RAM
0x21FF
0x3000
EEPROM
0x31FF
0x4000
HISTORY
0x4FFF
0x5000
0x5004
Data types
All registers are 16 bits wide, but can have varying representations.
Type Description
UINT8 Unsigned 8 bit integer. The upper 8 bits can be ignored.
INT8 Signed 8 bit integer, 2’s complement format. The upper 8 bits can be ignored.
UINT16 Unsigned 16 bit integer.
INT16 Signed 16 bit integer, 2’s complement format.
BITMASK Treat as UINT16.
ENUM Enumerated type. Consult the reference manual for meanings of specific values.
Data Mask
Some registers contain multiple properties within a single register. In such cases a mask of the appropriate bits
is specified to show the significant bits. The value itself is shifted the same amount that the mask would need
to be shifted so that the lowest set bit of the mask moves into the least significant bit. For example a value with
mask of 0xF0 would be shifted 4 times to the right after applying the mask to the data.
Plasmatronics Software
wwww.plasmatronics.com.au has python and vbs example scripts (DSCRIPT) and
Excel and OpenOffice Calc spreadsheets (Dingo.xls and DinglLO.ods) using
this protocol for downloading data. Also PRISM software for Dingo Remote
operation from MS Windows.
Please note that as per Modbus protocol, the D232 and DUSB do not reply to queries with an invalid or missing
CRC. The Dingo scripts at www.plasmatronics.com.au include CRC calculation routines.. Another online
resource for calculating Modbus CRCs can be found at http://www.lammertbies.nl/comm/info/crc-
calculation.html (but please note that the byte order of the output is wrong! - use the example below as a
reference). Other PC programs are also available, such as RealTerm, which can automatically append correct
CRC bytes to manually constructed queries.
Tx (Send):
0x08 0x04 0x10 0x04 0x00 0x01 0x74 0x52
Rx: (Receive):
0x08 0x04 0x02 0x00 0x7C 0x64 0xD0
Tx:
0x08 0x10 0x30 0x24 0x00 0x01 0x02 0x00 0x8c 0xFB 0x42
Rx:
0x08 0x10 0x30 0x24 0x00 0x01 0x4e 0x5b
XLMI_DEVICE_KEY A special number for the device. 0x5000 20480 UINT16 0xFACE 0xFACE
(All devices must return a valid value)
XLMI_VERISON Version number of firmware. 0x5001 20481 UINT16 1270 MAX
(All devices must return a valid value)
XLMI_SERIAL_MSW Device serial ID (hi word) 0x5002 20482 UINT16 MIN MAX
XLMI_SERIAL_LSW Device serial ID (low word) 0x5003 20483 UINT16 MIN MAX
XLMI_UPTIME Number of seconds device has been running. 0x5004 20484 UINT16 seconds 0 MAX
Wraps back to zero on overflow
XLMI_BAUDRATE Stored baud rate 0x5010 20496 UINT16 bps 1200 19200
default 9600, Value of 0xFFFF also means default.
XLMI_OPTIONS_SLAVEADDR Modbus slave address.(Default 8). 0x5014 20500 0xFF UINT8 1 247
ESS
XLMI_RESET Special register for soft reset. 0x5FFF UINT16
To prevent unintended resets the device requires a
specific procedure of reads and writes in order to reset
properly:
1. Write any value to the XLMI_RESET register
2. Read the XLMI_RESET register and retain the result
3. Write the read value into the XLMI_RESET register.
The device will reset immediately and will not respond.
A maximum of 4 seconds is allowed between each
step. If this time out expires, the sequence must be
restarted.