Skip to content

Client Register Grid

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

This guide covers the register grid interface, reading, writing, and monitoring Modbus registers in Client mode.

New to Modbus? See Understanding Modbus for an explanation of register types, addressing, function codes, and common concepts.

Reading Registers

image

Single Read

  1. Configure the registers in the Register Configuration Panel (type, address, length)
  2. Click the READ button in the toolbar
  3. Data appears in rows in the grid

Use case: Quick data retrieval or testing

Important: When using multi-register data types, ensure your length covers all required registers:

  • int32/uint32/float need 2 consecutive registers
  • int64/uint64/double/datetime need 4 consecutive registers
  • Example: int32 at register 10 with length 11 (reads 0-10) → won't show int32 value, needs length 12 (reads 0-11)

Continuous Polling

  1. Configure the registers to read
  2. Click the POLL button in the toolbar (toggles on/off)
  3. Registers are read continuously at the configured interval
  4. Click POLL again to stop

Use case: Real-time monitoring of changing values

Poll Rate and Timeout Configuration

image

Adjust timing settings:

  1. Click the Time Settings icon (clock icon in toolbar)
  2. Adjust the Poll Rate slider
  3. Adjust the Timeout for read operations
  4. Lower poll rate = faster polling (but more network traffic)
  5. Higher timeout = wait longer for slow devices

Writing Registers

Writing Holding Registers

image

Holding registers can be written individually from the grid:

  1. Perform a read to populate the grid
  2. Find the register you want to modify
  3. Click the Write button in that row
  4. A write dialog appears next to the button with:
    • Data Type: Uses the configured data type, or choose one from the dropdown
    • Value: Enter the value you want to write
    • FC6 or FC16: Choose the function code (FC6 only available for int16/uint16)
  5. Click the function code button to send the write command

Writing Coils

Coils can be written from the grid:

  1. Perform a read to populate the grid
  2. Find the coil you want to modify
  3. Click the Write button in that row
  4. A write dialog appears with:
    • FC5 or FC15: Choose the function code
    • Coil toggle buttons to set values
  5. Click the write button to send the command

Write Restrictions

  • Input Registers: Cannot be written (read-only)
  • Discrete Inputs: Cannot be written (read-only)
  • Holding Registers: Can always be written
  • Coils: Can always be written

Data Grid Columns

For 16-bit Registers (Input Registers & Holding Registers)

image

Standard Columns:

Column Description Editable
Address Register address (0-65535) No
Conventional Address 0-based or 1-based reference (only shown for addresses < 10000) No
Data Type Interpretation type (int16, uint16, int32, float, etc.) Yes
Converted Value Value after type conversion and scaling No
Scaling Multiplication factor applied to raw value Yes
Interpolation Linear interpolation parameters (x1, y1, x2, y2) Yes
Group End Mark end of a register group Yes
Hex Value Hexadecimal representation No
Binary Value Binary representation No
Comment User notes Yes
Write Write button (holding registers only) Action

Advanced Mode Columns (enable via COG menu):

  • int16: Signed 16-bit integer interpretation
  • uint16: Unsigned 16-bit integer interpretation
  • int32: Signed 32-bit integer interpretation
  • uint32: Unsigned 32-bit integer interpretation
  • float: Single-precision floating point interpretation

64-bit Columns (enable via COG menu, requires Advanced Mode):

  • int64: Signed 64-bit integer interpretation
  • uint64: Unsigned 64-bit integer interpretation
  • double: Double-precision floating point interpretation

For Boolean Registers (Coils & Discrete Inputs)

Column Description Editable
Address Register address (0-65535) No
Conventional Address 0-based or 1-based reference (only shown for addresses < 10000) No
Bit Bit value (0 or 1) No
Comment User notes Yes
Write Write button (coils only) Action

·

Data Types and Conversions

Raw 16-bit register values can be interpreted as different data types.

Supported Data Types

Single Register (16-bit):

  • int16: Signed integer (-32,768 to 32,767)
  • uint16: Unsigned integer (0 to 65,535)

Two Registers (32-bit):

  • int32: Signed 32-bit integer
  • uint32: Unsigned 32-bit integer
  • float: Single-precision floating point
  • unix: Unix timestamp (seconds since 1970-01-01, displayed as yyyy/MM/dd HH:mm:ss)

Four Registers (64-bit):

  • int64: Signed 64-bit integer
  • uint64: Unsigned 64-bit integer
  • double: Double-precision floating point
  • datetime: IEC 61850-9-2 / IEC 60870-5-4 timestamp format (displayed as yyyy/MM/dd HH:mm:ss)

Text:

  • utf8: Text strings (variable length)
    • Each 16-bit register contains 2 ASCII characters
    • String continues until the next register with a defined data type
    • Or until the end of the configured read range
    • Example: utf8 at register 100, next defined type at 105 → reads 5 registers = 10 characters

Setting Data Types

  1. Read registers to populate the grid (or use Load Dummy Data from COG menu to work offline)
  2. Click the Data Type cell for a register
  3. Select the desired type from dropdown
  4. The Converted Value updates automatically

Endianness

For multi-register types (32-bit, 64-bit), byte order matters:

  • Big Endian (BE): Most significant byte first (Modbus standard, most PLCs)
  • Little Endian (LE): Least significant byte first (less common)

Toggle endianness using the BE/LE button in the toolbar. Hover for detailed explanation.

See Understanding Modbus - Big-Endian vs Little-Endian for detailed explanation with PLC code examples.

Scaling

Apply linear scaling to numeric values:

  1. Click the Scaling cell
  2. Enter a scaling factor (e.g., 0.1, 10, 0.01)
  3. Converted Value = Raw Value × Scaling Factor

Example:

  • Raw value: 1234
  • Scaling: 0.1
  • Converted value: 123.4

Use cases:

  • Convert fixed-point sensor values
  • Apply unit conversions
  • Scale engineering values

Interpolation

Apply linear interpolation for sensor calibration:

  1. Click the Interpolation cell
  2. Configure parameters (x1, y1, x2, y2)
  3. Values are mapped from input range [x1, x2] to output range [y1, y2]

Formula:

output = y1 + (value - x1) × (y2 - y1) / (x2 - x1)

Example (convert to percentage):

  • Raw: 0-65535 → Calibrated: 0-100%
  • x1=0, y1=0, x2=65535, y2=100
  • Raw value 32768 → 50%

RAW Mode

Toggle RAW button in the toolbar to see unscaled register values.

Why use RAW mode?

When you have scaling configured (e.g., scaling factor 0.1), the converted value shows the scaled result. But when writing to the device, you need to know the actual raw value being sent.

Example:

  • Scaling factor: 0.1
  • Converted value shows: 100
  • RAW mode shows: 1000 (this is what gets written to the device)

Use RAW mode to:

  • Verify what value is actually being written to the device
  • Debug scaling configurations
  • Understand the raw data format the device uses

View Configuration

Click the EYE icon in the toolbar to display your configuration in the grid.

What it does:

  • Shows all registers that have a data type configured
  • Useful to see what you've configured when the grid is empty
  • Review your configuration after loading a saved file
  • See all configured registers without reading from a device

Note: This only displays configured registers. To read these registers from the device, use the Read Configuration button (list icon) next to Address/Length.

Advanced Mode

image

Enable Advanced Mode via COG menu to:

  • Show additional columns: int16, uint16, int32, uint32, float
  • See all data type interpretations simultaneously for every register
  • Toggle BE/LE while polling to see all conversions update in real-time
  • Quickly identify the correct data type and endianness combination
  • Enable Show 64 bit values option (int64, uint64, double)

Load Dummy Data

Via COG menu, Load Dummy Data to:

  • Load empty rows based on configured address and length
  • Set up data types, scaling, and comments before connecting to a device
  • Prepare configurations offline
  • Useful for documentation and test planning

Configuration Management

Saving Configurations

  1. Enter a name in the Configuration Name input field
  2. Click the Save icon in the toolbar
  3. Configuration is saved to file

What's saved:

  • Register type, address, length
  • Data type assignments
  • Scaling factors
  • Interpolation settings
  • Comments
  • Group end markers

Loading Configurations

  1. Click the Load icon in the toolbar
  2. Choose the configuration file
  3. All settings are restored
  4. Use EYE icon to view only configured registers

Clearing

  • Clear Configuration icon: Removes data types, scaling, comments, interpolation settings
  • CLEAR button: Clears all register values from grid (empties rows)

Transaction Log

Click SHOW LOG button in toolbar to view all communication.

The transaction log displays:

Column Description
Timestamp When the transaction occurred
Transaction ID Unique identifier
Unit ID Modbus Unit/Slave ID
Function Code Modbus function code
Address Starting register address
Request Data Data sent to device
Response Data Data received from device
Error Error message (if any)

Group End Feature

The Group End column allows you to control how registers are grouped when using Read Configuration mode.

How It Works

When you enable Read Configuration (list icon in Register Configuration Panel):

  1. Modbux reads only registers that have configured data types
  2. It groups consecutive registers into efficient read blocks (max 100 registers per block)
  3. Group End = true on a register ends the current read block, overriding automatic grouping
  4. The next configured register starts a new read block

When to Use Group End

Scenario: Device allows reading 0-10, but returns an error if you try to read beyond register 10 (e.g., 0-12). Your next configured register is at address 14.

Configuration:

  • Registers 0-10: data types configured
  • Set Group End = true on register 10
  • Register 14: data type configured

Result with Read Configuration:

  • Read block 1: addresses 0-10 (stops at Group End marker)
  • Read block 2: address 14 (separate read operation)

Without Group End:

  • Modbux would try to read 0-14 in one operation
  • Even though register 14 is theoretically close, the device won't allow reading through the gap
  • Device returns error

Tips and Best Practices

Reading:

  • Start with small lengths (1-10 registers) to test
  • Increase length once communication is confirmed
  • Some devices have strict data frame requirements - try different lengths if issues occur
  • Use Read Configuration mode (list icon) to read only configured registers
  • Use Group End markers when using Read Configuration to handle device restrictions or register gaps

Writing:

  • Always read first to confirm communication
  • Click Write button on the register row
  • Enter value in the write dialog
  • Modbux automatically reads back the value after writing

Polling:

  • Use appropriate poll rates for your use case
  • Too fast may overload the device or network
  • Adjust via Time Settings icon

Data Types:

  • Consult device documentation for correct types
  • Use Advanced Mode to see all interpretations at once
  • Try different endianness (BE/LE toggle) if values seem wrong
  • Use scaling for fixed-point sensor values

Configuration:

  • Save configurations for frequently-used devices
  • Use comments to document register purposes
  • Name configurations descriptively
  • Use Group End when devices have read restrictions or register gaps

Next Steps

Clone this wiki locally