Skip to content

Client Overview

Jens De Ketelaere edited this page Oct 31, 2025 · 4 revisions

Client mode allows you to connect to Modbus devices, read and write registers, and monitor device communication in real-time.

What is Client Mode?

In Client mode, Modbux acts as a Modbus master/client that can:

  • Connect to Modbus TCP or RTU devices
  • Read data from registers and coils
  • Write values to registers and coils
  • Poll registers continuously for monitoring
  • Scan Unit IDs and register addresses

When to Use Client Mode

Use Client mode when you need to:

  • Test Modbus devices during development
  • Debug communication issues with Modbus devices
  • Monitor device data in real-time
  • Configure device registers by reading and writing values
  • Discover devices by scanning Unit IDs
  • Map register layouts by scanning address ranges
  • Validate device responses and troubleshoot

Supported Protocols

Modbus TCP

  • Network-based protocol over Ethernet
  • Default port: 502
  • Ideal for industrial Ethernet devices
  • No special hardware required
  • Scan Unit IDs to find which Unit IDs respond on the connected device

Modbus RTU

  • Serial communication protocol using RS-485
  • Requires USB-to-RS485 adapter
  • Common in industrial systems
  • Scan Unit IDs to find which Unit IDs respond on the connected bus

See Client Connection for connection details.

Main Interface Components

1. Connection Panel (Top Right)

image

Configure your connection to the Modbus device:

  • Protocol toggle (TCP or RTU)
  • Device address (IP address or serial port)
  • Unit ID
  • Connect/Disconnect button (turns yellow when connected)

2. Register Configuration Panel (Top Left)

image

Define what data you want to read or write:

  • Register type (Holding, Input, Coils, Discrete Inputs)
  • Starting address (0-65535)
  • Number of registers (length)
  • Address base toggle (0 or 1) - This value only serves as a visual reference!
    • Modbux internally always uses 0-based addressing (0-65535)
    • The toggle changes the displayed "conventional address" next to the input field
    • Note: The conventional address is only shown for addresses below 10000
    • Conventional naming examples:
      • Coils: 0-9999
      • Discrete Inputs: 10000-19999
      • Input Registers: 30000-39999
      • Holding Registers: 40000-49999
    • These conventions are commonly used in documentation but don't always match internal Modbus protocol addresses
    • Manufacturers differ: some use 40000, others 40001 for the first holding register (address 0)
    • Hover over the conventional address for detailed explanation
  • Read Configuration button (list icon)
    • Reads all registers that have been configured with a data type from your loaded configuration
    • Instead of reading a continuous range (address + length), it reads only the specific registers you've configured
    • Groups consecutive registers into efficient read blocks (max 100 registers per block)
    • Respects Group End markers to create separate read operations
    • Only enabled when you have configured registers with data types
    • Perfect for reading scattered registers efficiently

3. Toolbar

Left side:

image
  • POLL: Toggle continuous polling at configured interval
  • READ: Single read operation
  • BE/LE Toggle: Big-Endian or Little-Endian byte order for multi-register data types (16-bit registers only)
    • BE (Big-Endian): Most significant byte first (Modbus standard, most PLCs including Siemens S7)
    • LE (Little-Endian): Least significant byte first (less common)
    • Hover for detailed endianness explanation table
  • Timer Icon: Configure poll rate and timeout settings
  • RAW: Display values without applied scaling

Right side (aligned right):

image
  • EYE Icon: Show configured registers from loaded configuration
  • Load/Save/Clear Configuration Icons: Manage register configurations
  • Configuration Name Input: Name your configuration for easy identification
  • CLEAR: Empty the data grid
  • SHOW LOG: Open transaction log
  • COG Icon (Settings Menu):
    • Advanced mode: Show additional columns with (u)int16, (u)int32, and float conversions to see all interpretations simultaneously
    • Show 64 bit values: Display 64-bit data type columns (requires Advanced mode)
    • Scan Unit IDs: Open scan modal to discover devices
    • Scan Registers: Scan address range and populate grid with registers containing non-zero values
    • Load Dummy Data: Load empty rows for the configured address and length to set up configuration without connecting to a device

Note: Write controls are on individual register rows in the data grid.

4. Data Grid

Displays register data in multiple containers (one per register type):

  • Address and current values
  • Data type interpretation
  • Hex and binary representation
  • Editable fields (data type, scaling, comments)
  • Write buttons on individual rows (for holding registers and coils)

Typical Workflow

  1. Configure Connection

    • Select protocol using the toggle (TCP or RTU)
    • Enter device address (IP or serial port)
    • Set Unit ID
  2. Connect to Device

    • Click the Connect button
    • Button turns yellow when connected
    • Status messages appear as notifications
  3. Configure Registers

    • Select register type
    • Enter starting address and length
    • Note: Address base is for visual reference only
  4. Read Data

    • Click Read for single read
    • Or click Poll for continuous monitoring
    • Rows appear in the grid with data
  5. Analyze Data

    • View values in the grid
    • Apply data type conversions
    • Add comments and scaling
    • Toggle RAW mode to see unscaled values
  6. Write Data (if needed)

    • Modify values in the grid
    • Click Write button on individual register rows
    • Only available when not polling
  7. Save Configuration (optional)

    • Name your configuration
    • Save register configurations for reuse via Save icon
    • Load later with Load icon
    • Your configuration persists automatically between sessions - saving to a file is only necessary if you want to share it, back it up, or switch between different configurations

Next Steps

Clone this wiki locally