Skip to main content

DAM-16DI communication protocol

This product is a 16-channel digital input module supporting standard Modbus RTU commands. For detailed command construction and parsing, use the register tables in this document together with the Modbus specification.

Modbus register reference

Device (slave) address

Default slave address is 0x01; configurable range 0x01–0xF7. Supported ranges:

Address rangeStatusDescription
0x00❌ DisabledNon-response broadcast: master only; slaves must not use this address and do not reply.
0x01~0xF7✅ AvailableStandard slave address; assignable to any device.
0xFE❌ DisabledResponse broadcast: master only; slaves must not use this address.
Note

When using broadcast address 0xFE, connect only one device on the bus; multiple devices responding will collide.

Function codes

This module is discrete-input oriented; the following function codes are supported.

FCFunctionNotes
02Read discrete inputsRead digital input state
03Read holding registersRead device parameters
06Write single registerWrite device parameters
10Write multiple registersWrite multiple device parameters

Register map

Address (HEX)ContentDescriptionTypeModbus FC
1x0000~1x000FCH1–CH16 digital inputsState of digital inputs CH1–CH16R0x02
4x8000SUKModel numberR/S0x03
4x8001Firmware versionDecimal value with implied decimal → version (e.g. 0x0064 = 100 → V1.00)R/W/S0x03,0x06
4x8002Slave addressStores Modbus address; default 0x0001R/W/S0x03,0x06
4x8003UART parametersUpper byte: stop/parity; lower byte: baud rateR/W/S0x03,0x06
4x8004WatchdogIf no valid Modbus within timeout, device resetsR/W/S0x03,0x06
4x8005Auto-report DIDigital input change auto-uploadR/W/S0x03,0x06
4x9000~4x900FUser string areaString formatR/W/S0x03,0x06,0x10
Note

Registers marked S retain values across power cycles.

Modbus RTU command reference

Read digital input states

Request: 01 02 00 00 00 10 79 C6

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
02FC 0x02Read discrete inputs
00 00Start addressFirst digital input address
00 10QuantityInput count; must not exceed max channels
79 C6CRC16CRC16 over preceding bytes

Response: 01 02 02 00 00 B9 B8

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
02FC 0x02Read discrete inputs
02Byte countTotal data bytes returned.
00 00Input statesPacked bits: Bit0 = first input, Bit1 = next, …; unused high bits are zero.
B9 B8CRC16CRC16 over preceding bytes

Examples (slave 0x01)

TX : 01 02 00 00 00 10 79 C6
RX : 01 02 02 00 00 B9 B8 //All inputs inactive
TX : 01 02 00 00 00 10 79 C6
RX : 01 02 02 01 00 B8 28 //CH1 active; others inactive
TX : 01 02 00 00 00 10 79 C6
RX : 01 02 02 41 00 89 E8 //CH1 and CH7 active; others inactive
TX : 01 02 00 01 00 03 69 CB //Query inputs 2–4
TX : 01 02 00 03 00 05 48 09 //Query inputs 4–8

Read firmware version

Request: 01 03 80 01 00 01 FC 0A

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
03FC 0x03Read firmware version (FC 03)
80 01Firmware registerFixed 4x8001
00 01Word countFixed 0x0001
FC 0ACRC16CRC16 over preceding bytes

Response: 01 03 02 00 64 B9 AF

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
03FC 0x03Read firmware version (FC 03)
02Byte countReturned byte count
00 64VersionDecimal ÷100 → version string (0x0064 = 100 → V1.00)
B9 AFCRC16CRC16 over preceding bytes

Examples (slave 0x01)

TX:01 03 80 01 00 01 FC 0A
RX:01 03 02 01 2C B8 09 //0x012C = 300 =V3.00

Read slave address

Request: FE 03 80 02 00 01 18 05

FieldMeaningNotes
FESlave address0xFE: responding broadcast; applies to all slaves
03FC 0x03Read holding registers (FC 03)
80 02Address registerFixed 4x8002
00 01Word countFixed 0x0001
18 05CRC16CRC16 over preceding bytes

Response: FE 03 02 00 01 6D 90

FieldMeaningNotes
FESlave address0xFE: responding broadcast; applies to all slaves
03FC 0x03Read holding registers (FC 03)
02Byte countReturned byte count
00 01Slave addrCurrent 0x0001–0x00F7
6D 90CRC16CRC16 over preceding bytes
Note

With 0xFE broadcast read, connect only one device to avoid bus collisions.

Examples (slave 0x01)

TX : FE 03 80 02 00 01 18 05
RX : FE 03 02 00 02 2D 91 //address:0x02

Set slave address

Request: FE 06 80 02 00 01 D4 05

FieldMeaningNotes
FESlave address0xFE: responding broadcast; applies to all slaves
06FC 0x06Write single holding register (FC 06)
80 02Address registerFixed 4x8002
00 01New addressSlave address to set, range 0x0001–0x00F7
D4 05CRC16CRC16 over preceding bytes

Response: FE 06 80 02 00 01 D4 05

FieldMeaningNotes
FESlave address0xFE: responding broadcast; applies to all slaves
06FC 0x06Write single holding register (FC 06)
80 02Address registerFixed 4x8002
00 01New addressSlave address to set, range 0x0001–0x00F7
D4 05CRC16CRC16 over preceding bytes
Note

With 0xFE broadcast write, connect only one device or all devices will receive the same address.

Examples (slave 0x01)

Set address 0x01 :FE 06 80 02 00 01 D4 05
Set address 0x02 :FE 06 80 02 00 02 94 04
Set address 0x03 :FE 06 80 02 00 03 55 C4

Set UART parameters

Request: 01 06 80 03 00 05 90 09

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
06FC 0x06Write single holding register (FC 06)
80 03UART registerFixed 4x8003
00 05UARTBits 0–7: baud rate
0 : 4800
1 : 9600
2 : 19200
3 : 38400
4 : 57600
5 : 115200
6 : 128000
7 : 256000
Bits 8–12: parity
0 : None,
1: Even parity,
2: Odd parity
Bits 13–16: stop bits
0 : 1 stop bit,
1: 1.5 stop bits,
2: 2 stop bits
90 09CRC16CRC16 over preceding bytes

Response: 01 06 80 03 00 05 90 09

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
06FC 0x06Write single holding register (FC 06)
80 03UART registerFixed 4x8003
00 05UARTUART value
90 09CRC16CRC16 over preceding bytes

Examples (slave 0x01)

9600 baud, none, 1 stop :01 06 80 03 00 01 91 CA
9600 baud, even, 2 stop :01 06 80 03 00 D1 90 56
115200 baud, none, 1 stop :01 06 80 03 00 05 90 09

Set watchdog

Request: 01 06 80 04 00 0A 61 CC

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
06FC 0x06Write single holding register (FC 06)
80 04Watchdog registerFixed 4x8004
00 0ATimeout / interval0 disables watchdog. Non-zero enables: each valid Modbus frame feeds the dog; if the interval expires without a valid frame, the firmware resets.
Timeout = value × 100 ms (e.g. 0x000A → 1 s).
61 CCCRC16CRC16 over preceding bytes

Response: 01 06 80 04 00 0A 61 CC

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
06FC 0x06Write single holding register (FC 06)
80 04Watchdog registerFixed 4x8004
00 0ATimeout / intervalWatchdog timeout value
61 CCCRC16CRC16 over preceding bytes

Examples (slave 0x01)

Watchdog 10 s :01 06 80 04 00 64 E0 20
Disable watchdog :01 06 80 04 00 00 E1 CB

Set DI auto-upload

Request: 01 06 80 05 FF 00 61 CC

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
06FC 0x06Write single holding register (FC 06)
80 05Auto-upload registerFixed 4x8005
FF 00On/offDigital inputs can auto-report on change. 0 disables; any non-zero value enables reporting when DI state changes.
61 CCCRC16CRC16 over preceding bytes

Response: 01 06 80 05 FF 00 61 CC

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
06FC 0x06Write single holding register (FC 06)
80 05Auto-upload registerFixed 4x8005
FF 00On/offDigital inputs can auto-report on change. 0 disables; any non-zero value enables reporting when DI state changes.
61 CCCRC16CRC16 over preceding bytes

Examples (slave 0x01)

Enable auto-upload :01 06 80 05 FF 00 61 CC
Disable auto-upload :01 06 80 05 00 00 B0 0B

Exception codes

On protocol or device errors, the slave returns an exception response:

Response: 01 85 03 02 91

FieldMeaningNotes
01Slave address0x00: broadcast; 0x01–0xF7: slave address
85Exception FCException FC = request FC + 0x80
03Ex. codeException code
02 91CRC16CRC16 over preceding bytes

Exception codes (single byte) indicate error type. Common Modbus exceptions:

CodeNameDescription
0x01Illegal functionRequested function not supported.
0x02Illegal data addressRequested data address invalid.
0x03Illegal data valueData value or operation not allowed.
0x04Server device failureServer device failure.
0x05AcknowledgeRequest accepted and being processed.
0x06Device busyDevice busy; cannot execute now.