Chapter 6: Communicating With DGH D1100‑Series and D3100‑Series Modules

📚 Chapter 6 — Communicating With DGH D1100‑Series and D3100‑Series Modules

🎯 Learning Objectives

By the end of this lesson, students will be able to:

  • Understand the ASCII‑based communication protocol used by DGH modules
  • Identify similarities and differences between the D1100 and D3100 series
  • Send commands to read data, configure modules, and change addresses
  • Decode SU commands for the D1100 series
  • Understand why the D3100 series does not use SU
  • Interpret responses from both families
  • Troubleshoot common communication issues

1️⃣ Overview of the Two Module Families

D1100‑Series (D1000 Family)

  • Analog input modules (voltage, current, temperature, etc.)
  • Use the D1000 command set
  • Configurable using the SU command
  • ASCII‑based protocol
  • Multi‑drop capable (RS‑485)
  • Address stored in non‑volatile memory

D3100‑Series

  • Digital I/O modules (relay outputs, digital inputs)
  • Use the D3000 command set
  • Do NOT use SU
  • Address is set using the WE (Write EEPROM) command
  • ASCII‑based protocol
  • Multi‑drop capable

Both families share:

  • ASCII message frame
  • $ or # prompt
  • Single ASCII address character
  • terminator
  • Similar read/write command structure

But they differ in:

  • Command set
  • Configuration method
  • Response format

2️⃣ The DGH ASCII Message Frame (Both Families)

DGH ASCII Message Frame Structure

All DGH modules use the same message envelope:

Field Description Example
Prompt $ (normal) or # (long format) $
Address One ASCII character 1, A, S
Command Two ASCII characters RD, SU, DI
Data Optional data field 53070182
Checksum Optional (only with # prompt) AB
Terminator Carriage return (ASCII 0x0D) <CR>

Prompt

  • $ → normal

  • # → long format (includes checksum)

Address

  • One ASCII character

  • 1, A, S, Z, etc.

  • Set differently depending on module family

Command

  • Two ASCII characters

  • Examples: RD, RS, WE, SU, DO, DI

Data

  • Optional

  • Used by SU (D1100) and WE (D3100)

Terminator

  • CR (ASCII 0x0D)

3️⃣ 3. Reading Data

D1100‑Series (Analog Input)

  • Read analog input command:

    • $1RD<CR>
  • Response:

    • +1.2345<CR>

D3100‑Series (Digital I/O)

  • Read digital inputs command:

    • $1DI<CR>
  • Response:

    • 00001101<CR>
  • Read relay states:

    • $1RS<CR>

4️⃣ Writing / Controlling Outputs

D3100‑Series (Digital Outputs)

  • Turn on relay 1:

    • $1ON1<CR>
  • Turn off relay 1:

    • $1OF1<CR>
  • Write entire output byte:

    • $1WR15<CR>

    • (sets outputs to 0x0F)

5️⃣ Changing the Module Address

D1100‑Series

  • Uses SU Byte 1 (ASCII address).

    • Example: change address to S:

    • $xSU53070182<CR>

D3100‑Series

  • Uses WE (Write EEPROM).

    • Example: change address to S:

    • $xWE53<CR>

  • This is a major difference we must understand

6️⃣ Why the SU Command Exists Only in the D1100‑Series

The D1100‑series has:

  • Analog filtering
  • Display formatting
  • Parity/baud/linefeed options
  • Alarm settings
  • Extended addressing (legacy)

These require a 4‑byte configuration block, hence the SU command.

The D3100‑series is simpler:

  • No filtering
  • No display formatting
  • No analog scaling
  • No extended addressing

So it uses WE instead of SU.

7️⃣ Troubleshooting Communication (Both Families)

Common issues:

  • Wrong baud rate

  • Wrong parity

  • Wrong address

  • Missing <CR>

  • Using $ when module expects #

  • RS‑485 wiring reversed

  • USB‑RS232 adapters with poor timing

Quick checks:

  • Send $*RS<CR> (wildcard address)

  • Try 300 baud (factory default)

  • Try no parity, 8 data bits, 1 stop bit

  • Verify ASCII characters (not hex)

8️⃣ SU Command Decoding (D1100‑Series Only)

SU Command Decoding Sheet

SU Command Format

$xSU [Byte1] [Byte2] [Byte3] [Byte4] <CR>

Field Meaning
$ Prompt (normal command)
x Module address (ASCII character)
SU Setup command
Byte1-Byte4 Configuration bytes
CR Carriage return (0x0D)

Byte‑by‑Byte Meaning

Byte 1 — ASCII Address Table

  • This is simply the ASCII code for the module’s address.

  • Examples:

    • 0x31 → ‘1’
    • 0x53 → ‘S’
    • 0x5A → ‘Z’

Important:

Byte 1 is not decoded bit‑by‑bit. It does not contain addressing mode.

Byte 2 — Communication Configuration (FULL original table)

Bit:   7     6     5     4     3     2     1     0
       |     |     |     |     |     |     |     |
       |     |     |     |     |     |     |     └── Baud (LSB)
       |     |     |     |     |     |     └──────── Baud
       |     |     |     |     |     └────────────── Baud (MSB)
       |     |     |     |     └──────────────────── Reserved
       |     |     |     └────────────────────────── Addressing Mode
       |     |     └──────────────────────────────── Parity (LSB)
       |     └────────────────────────────────────── Parity (MSB)
       └──────────────────────────────────────────── Linefeed
  • Bit 7 — Linefeed

    • 1 = Linefeed ON

    • 0 = Linefeed OFF

  • Bits 6–5 — Parity

Bits Meaning
00 No parity
01 Even parity
11 Odd parity
  • Bit 4 — Addressing Mode (missing from modern manual)
Bit Meaning
0 Normal Addressing
1 Extended Addressing
  • Bit 3 — Reserved

    • Always 0
  • Bits 2–0 — Baud Rate

Bits Baud
000 38400
001 19200
010 9600
011 4800
100 2400
101 1200
110 600
111 300

Byte 3 — Module Options

Controls things like:

  • Echo on/off
  • Alarm enable
  • Units (°C/°F)
  • Digital filtering enable
  • Delay settings
  • Zero‑offset enable
  • Temperature scale
  • Input type (for some modules)

The exact bit meanings vary by module type.

Byte 4 — Display / Format / Filter Options

Controls things like:

  • Decimal places
  • Output format
  • Filtering level
  • Engineering units
  • Display resolution
  • Auto‑zero
  • Smoothing filters

The exact bit meanings vary by module type.

9️⃣ Worked Example: $xSU53070182

Break the SU data:

Byte Value Meaning
Byte1 53 ASCII S → module address = S
Byte2 07 Communication settings
Byte3 01 Module options
Byte4 82 Display/filter options

Decode Byte 2:

0x07 = 0000 0111
          ^
          bit 4 = 0 → Normal Addressing

✔ Addressing Mode = Normal ✔ Baud = 300 ✔ Parity = None ✔ Linefeed = OFF

  • How SU fits into the DGH Message Frame
flowchart LR
    A["$ (Prompt)"] --> B["x (ASCII Address)"]
    B --> C["SU (Command)"]
    C --> D["53 07 01 82 (Data: Byte1–Byte4)"]
    D --> E["[CR] (Terminator)"]