-
Notifications
You must be signed in to change notification settings - Fork 4
Client Register Grid
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.
- Configure the registers in the Register Configuration Panel (type, address, length)
- Click the READ button in the toolbar
- 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)
- Configure the registers to read
- Click the POLL button in the toolbar (toggles on/off)
- Registers are read continuously at the configured interval
- Click POLL again to stop
Use case: Real-time monitoring of changing values
Adjust timing settings:
- Click the Time Settings icon (clock icon in toolbar)
- Adjust the Poll Rate slider
- Adjust the Timeout for read operations
- Lower poll rate = faster polling (but more network traffic)
- Higher timeout = wait longer for slow devices
Holding registers can be written individually from the grid:
- Perform a read to populate the grid
- Find the register you want to modify
- Click the Write button in that row
- 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)
- Click the function code button to send the write command
Coils can be written from the grid:
- Perform a read to populate the grid
- Find the coil you want to modify
- Click the Write button in that row
- A write dialog appears with:
- FC5 or FC15: Choose the function code
- Coil toggle buttons to set values
- Click the write button to send the command
- 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
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
| 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 |
·
Raw 16-bit register values can be interpreted as different 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
- Read registers to populate the grid (or use Load Dummy Data from COG menu to work offline)
- Click the Data Type cell for a register
- Select the desired type from dropdown
- The Converted Value updates automatically
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.
Apply linear scaling to numeric values:
- Click the Scaling cell
- Enter a scaling factor (e.g.,
0.1,10,0.01) - 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
Apply linear interpolation for sensor calibration:
- Click the Interpolation cell
- Configure parameters (x1, y1, x2, y2)
- 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%
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
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.
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)
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
- Enter a name in the Configuration Name input field
- Click the Save icon in the toolbar
- Configuration is saved to file
What's saved:
- Register type, address, length
- Data type assignments
- Scaling factors
- Interpolation settings
- Comments
- Group end markers
- Click the Load icon in the toolbar
- Choose the configuration file
- All settings are restored
- Use EYE icon to view only configured registers
- Clear Configuration icon: Removes data types, scaling, comments, interpolation settings
- CLEAR button: Clears all register values from grid (empties rows)
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) |
The Group End column allows you to control how registers are grouped when using Read Configuration mode.
When you enable Read Configuration (list icon in Register Configuration Panel):
- Modbux reads only registers that have configured data types
- It groups consecutive registers into efficient read blocks (max 100 registers per block)
- Group End = true on a register ends the current read block, overriding automatic grouping
- The next configured register starts a new read block
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
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