Proxus provides a high-performance Modbus TCP driver capable of batch reading and automatic byte swapping.
Supported Protocol Variants
| Protocol Type | Description |
|---|---|
Modbus_Tcp | Standard Modbus TCP |
Modbus_Rtu_OverTcp | Modbus RTU encapsulated over TCP |
ModbusAscii_OverTcp | Modbus ASCII encapsulated over TCP |
Connection Parameters
Basic Settings
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Host | string | Yes | - | IPv4 address of the PLC or Gateway |
| Port | int | No | 502 | Standard Modbus TCP port |
| PollingInterval | int | No | 1000 | Read cycle interval in milliseconds |
| ConnectTimeout | int | No | 3000 | Connection timeout (ms) |
| ReceiveTimeout | int | No | 3000 | Response timeout (ms) |
Modbus-Specific Settings
| Parameter | Type | Default | Description |
|---|---|---|---|
| Station | byte | 1 | Unit ID / Slave ID (1-255) |
| AddressStartWithZero | bool | true | Use 0-based addressing |
| DataFormat | enum | ABCD | Byte order (ABCD, DCBA, BADC, CDAB) |
| IsStringReverse | bool | false | Reverse string byte order |
| IsCheckMessageId | bool | true | Validate response message ID |
| Crc16CheckEnable | bool | true | Enable CRC16 check (RTU only) |
The Station parameter (Unit ID) is critical when connecting through a Modbus gateway to multiple devices. Each device behind the gateway has a unique Station ID.
Converting Datasheet Addresses
Device datasheets often use different addressing conventions. Here's how to convert them to Proxus format:
Common Datasheet Formats
| Datasheet Format | Meaning | Proxus Format |
|---|---|---|
40001 | Holding Register 1 | x=3;0 |
40100 | Holding Register 100 | x=3;99 |
30001 | Input Register 1 | x=4;0 |
30100 | Input Register 100 | x=4;99 |
00001 | Coil 1 | x=1;0 |
10001 | Discrete Input 1 | x=2;0 |
HR100 / 4x100 | Holding Register 100 | x=3;99 |
IR50 / 3x50 | Input Register 50 | x=4;49 |
Most device datasheets use 1-based addressing (first register = 1), but Modbus protocol uses 0-based addressing (first register = 0).
Always subtract 1 from datasheet addresses:
- Datasheet says
40100→ Proxus:x=3;99 - Datasheet says
30050→ Proxus:x=4;49
Conversion Formula
Proxus Address = Datasheet Address - Base - 1
Where Base:
40001 series → Base = 40000 (Holding Registers, FC03)
30001 series → Base = 30000 (Input Registers, FC04)
10001 series → Base = 10000 (Discrete Inputs, FC02)
00001 series → Base = 0 (Coils, FC01)Real-World Examples
| Device/Sensor | Datasheet Says | Proxus Address | Data Type |
|---|---|---|---|
| Energy Meter - Voltage | 30001 | x=4;0 | Float |
| Energy Meter - Current | 30003 | x=4;2 | Float |
| VFD - Motor Speed | 40201 | x=3;200 | UShort |
| VFD - Run Command | 00001 | x=1;0 | Bool |
| Temperature Sensor | 30101 | x=4;100 | Short |
Address Syntax
Proxus supports flexible address formats for all Modbus function codes.
Basic Format
The simplest format is just the register address:
{address}Example: 100 reads register 100 using the default function code (03 for Holding Registers).
Extended Format
For explicit control over station ID and function code:
s={station};x={function};{address}| Component | Description | Values |
|---|---|---|
s= | Station/Slave ID | 1-255 |
x= | Function Code | 1, 2, 3, 4 |
w= | Write Function Code (optional) | 5, 6, 15, 16 |
{address} | Register address | 0-65535 |
Examples
| Address | Description |
|---|---|
100 | Register 100, default function code |
x=3;100 | Holding Register 100 (FC03) |
x=4;100 | Input Register 100 (FC04) |
s=2;100 | Register 100 on Slave ID 2 |
s=2;x=3;100 | Holding Register 100 on Slave ID 2 |
s=5;x=4;500 | Input Register 500 on Slave ID 5 |
Function Codes
| Code | Area | Access | Description |
|---|---|---|---|
| 01 | Coils | Read/Write | Discrete outputs (bits) |
| 02 | Discrete Inputs | Read Only | Discrete inputs (bits) |
| 03 | Holding Registers | Read/Write | 16-bit registers |
| 04 | Input Registers | Read Only | 16-bit input registers |
Standard Notation Mapping
If you prefer traditional 5-digit or 6-digit Modbus notation:
| Notation | Function Code | Proxus Equivalent |
|---|---|---|
000001 - 009999 | FC01 (Coils) | x=1;0 |
100001 - 109999 | FC02 (Discrete Inputs) | x=2;0 |
300001 - 309999 | FC04 (Input Registers) | x=4;0 |
400001 - 409999 | FC03 (Holding Registers) | x=3;0 |
Use the explicit x={function};{address} format to avoid ambiguity. Different vendors interpret standard notation differently.
Data Types
Multi-register values are automatically reconstructed from consecutive registers.
| Type | Size | Registers | Description |
|---|---|---|---|
| Bool | 1 bit | N/A | Coils or Discrete Inputs |
| Short | 16 bit | 1 | Signed integer |
| UShort | 16 bit | 1 | Unsigned integer |
| Int | 32 bit | 2 | Signed 32-bit integer |
| UInt | 32 bit | 2 | Unsigned 32-bit integer |
| Long | 64 bit | 4 | Signed 64-bit integer |
| ULong | 64 bit | 4 | Unsigned 64-bit integer |
| Float | 32 bit | 2 | IEEE 754 single precision |
| Double | 64 bit | 4 | IEEE 754 double precision |
| String | Variable | N | ASCII string (requires length) |
Byte Order
Different devices use different byte ordering for multi-register values. Configure the ByteOrder in the Device Profile:
| Setting | Description | Example (0x12345678) |
|---|---|---|
ABCD | Big Endian | 12 34 56 78 |
DCBA | Little Endian | 78 56 34 12 |
BADC | Mid-Big Endian | 34 12 78 56 |
CDAB | Mid-Little Endian | 56 78 12 34 |
If Float or Int32 values appear extremely large, small, or nonsensical, the byte order is likely incorrect. Try different ByteOrder settings.
Performance Features
Batch Reading
The driver automatically groups contiguous addresses into single requests:
- Registers
100, 101, 102, 103→ Single read request - Gaps larger than 2 registers break the batch
- Dramatically reduces network round-trips
Polling Intervals
Configure different polling rates for different registers. Fast-changing values (e.g., motor speed) can poll at 100ms while slow-changing values (e.g., temperature) poll at 5000ms.
Industry Use Cases
Modbus is our most versatile driver, utilized extensively across multiple industries:
- Manufacturing: Integrating legacy PLCs, VFDs (Variable Frequency Drives), and simple IO blocks.
- Energy & Utilities: Real-time data acquisition from power meters, solar inverters, and battery management systems.
- Mining: Monitoring ventilation fans, pumps, and crushers to optimize extraction efficiency. sub-meters.
Troubleshooting
| Error | Cause | Solution |
|---|---|---|
| Timeout | Device not responding | Check IP, Port, Station ID |
| Illegal Data Address | Register doesn't exist | Verify register number in device manual |
| Illegal Function | Function code not supported | Use correct function code for data area |
| Gateway Path Unavailable | Wrong Station ID | Verify Unit ID for device behind gateway |
| Timeout | PollingInterval too short | Increase PollingInterval or check network latency |
| Checksum Error | Noise or wrong settings | Verify Baud Rate, Parity (RTU) or check interference |
For byte order issues, see Byte Ordering Problems. For address conversion, see Modbus Address Syntax.
Official Resources
- Modbus Organization: Modbus Specifications
- Implementation Guide: Modbus Messaging on TCP/IP