ModBus Pro User Manual
The complete reference guide to every feature in ModBus Pro. Whether you are commissioning your first Modbus device or debugging a 200-node RS485 network, this manual covers everything you need.
1. Getting Started
System Requirements
ModBus Pro runs on Windows desktop systems. Minimum requirements:
- Operating System: Windows 10 or Windows 11 (64-bit)
- RAM: 4 GB minimum, 8 GB recommended
- Disk Space: approximately 250 MB for installation
- Display: 1280 x 720 minimum resolution
- Network: Ethernet or Wi-Fi for Modbus TCP connections
- Serial: USB-to-RS485 adapter for Modbus RTU connections (driver must be installed)
Installation
ModBus Pro is distributed as a portable ZIP archive. There is no installer wizard to run through.
- Download the ZIP file from modbus.app.
- Extract the ZIP to any folder on your computer (for example,
C:\ModBusProor your Desktop). - Open the extracted folder and double-click ModBus Pro.exe to launch the application.
There is no need to run as administrator for normal operation. If you plan to use serial ports, make sure your USB-to-RS485 adapter drivers are already installed before launching the application.
Pin ModBus Pro.exe to your taskbar for quick access. Since there is no formal installer, Windows will not add it to your Start Menu automatically.
First Launch
When you first open ModBus Pro, you will see the main interface with a dark sidebar on the left and the connection bar at the top. The sidebar provides navigation between all major features: Register Browser, Device Library, Slave Simulator, Scripting, Communication Monitor, Discovery, Data Logging, Engineering Tools, and Settings.
The application starts in the Register Browser view by default. Before you can read any Modbus data, you need to configure and establish a connection using the connection bar at the top of the window.
License and Trial
ModBus Pro includes a 7-day free trial with full access to every feature. No sign-up, no email address, and no credit card are required to start the trial.
After the trial expires, you can purchase a license key from the pricing page. To activate your license:
- Open Settings from the sidebar.
- Paste your license key into the activation field.
- Click Activate. The application will verify your key online and unlock permanently.
Each license key is valid for one computer. If you need to transfer your license to a different machine, deactivate it first in Settings, then re-activate on the new machine.
UI Overview
The interface is organized into three main areas:
- Sidebar (left): Navigation between all application modules. Each icon represents a major feature area. Hover over icons to see labels.
- Connection Bar (top): Configure and manage your Modbus connection. Select the protocol (TCP or RTU), enter connection parameters, and connect or disconnect.
- Main Panel (center): The working area changes based on which module you have selected in the sidebar. This is where you interact with registers, view logs, run scripts, and use tools.
2. Connections
Understanding the Connection Bar
The connection bar runs along the top of the application and is always visible regardless of which module you are viewing. It contains all the parameters needed to establish a Modbus connection, a Connect/Disconnect button, and a status indicator showing your current connection state.
You can switch between Modbus TCP and Modbus RTU using the protocol selector on the left side of the connection bar.
Creating a Modbus TCP Connection
To connect to a Modbus device over TCP/IP (Ethernet):
- Select TCP as the protocol in the connection bar.
- Enter the Host (IP address or hostname) of the target device. For example:
192.168.1.100 - Enter the Port. The standard Modbus TCP port is
502. Some devices use alternative ports like 503 or 5020. - Set the Unit ID (also called Slave ID). For most TCP devices this is
1, but gateways that bridge to serial networks may require a specific Unit ID to address downstream devices. - Set the Timeout in milliseconds. The default of
3000ms (3 seconds) works for most networks. Increase this for high-latency connections or slow devices. - Click Connect.
Creating a Modbus RTU Connection
To connect to a Modbus device over a serial line (RS485/RS232):
- Select RTU as the protocol in the connection bar.
- Select the COM Port from the dropdown. This lists all available serial ports on your system. If your USB-to-RS485 adapter does not appear, check that its drivers are installed.
- Set the Baud Rate. Common values are
9600,19200,38400, and115200. This must match the baud rate configured on the slave device. - Set Parity. Options are
None,Even, orOdd. The most common Modbus default isNone(with 2 stop bits) orEven(with 1 stop bit). - Set Data Bits to
8(standard for Modbus RTU). - Set Stop Bits to
1or2depending on your device configuration. - Set the Unit ID (Slave Address) of the device you want to communicate with (1-247).
- Click Connect.
Every serial parameter (baud rate, parity, data bits, stop bits) must match between the master and the slave exactly. A mismatch in any single parameter will cause communication failures, typically resulting in timeout errors or CRC errors.
Connecting and Disconnecting
Click the Connect button to establish the connection. The status indicator will change to show that you are connected. To terminate the connection, click Disconnect. You can change connection parameters only while disconnected.
Managing Multiple Profiles
ModBus Pro allows you to save connection profiles so you do not have to re-enter parameters every time. When you have configured a connection, you can save it as a named profile. Switch between saved profiles using the profile dropdown. This is especially useful when you regularly work with multiple devices or sites.
Connection Status Indicators
The connection bar displays a colored indicator showing the current state:
- Grey: Disconnected. No active connection.
- Green: Connected. Communication is active and healthy.
- Red/Orange: Error state. The connection attempt failed or was lost.
Troubleshooting Connection Issues
If you cannot connect:
- TCP: Verify the IP address is correct and the device is reachable (try pinging it). Make sure port 502 (or your configured port) is not blocked by a firewall. Check that no other application is already occupying the port.
- RTU: Verify the COM port is correct and not in use by another application. Double-check baud rate, parity, data bits, and stop bits against the device documentation. Ensure the RS485 wiring is correct (A/B polarity is a common source of confusion between manufacturers).
3. Register Browser
Understanding Modbus Registers
Modbus organizes data into four types of registers:
| Type | Function Code | Access | Data |
|---|---|---|---|
| Coils | FC01 / FC05 / FC15 | Read/Write | Single-bit (ON/OFF) |
| Discrete Inputs | FC02 | Read Only | Single-bit (ON/OFF) |
| Holding Registers | FC03 / FC06 / FC16 | Read/Write | 16-bit word |
| Input Registers | FC04 | Read Only | 16-bit word |
Most real-world data (voltages, currents, power, temperatures, setpoints) lives in holding registers (FC03) or input registers (FC04). Coils and discrete inputs are used for digital signals like relay states, alarms, and control bits.
Adding Registers Manually
To add a register to the browser:
- Click the Add Register button.
- Enter the register Address (0-based). For example, holding register 40001 in documentation is address
0in ModBus Pro (since the application uses 0-based addressing). - Set the Quantity of registers to read in a single request (1 to 125 for holding/input registers).
- Select the Function Code (FC01, FC02, FC03, or FC04).
- Choose the Data Type for display interpretation.
- Optionally set the Byte Order, Scale Factor, and Offset.
- Give the register a descriptive Name (e.g., "Phase A Voltage").
Register Properties
Each register entry in the browser has the following configurable properties:
- Address: The 0-based Modbus register address.
- Quantity: How many consecutive registers to read in one request.
- Function Code: Which Modbus function to use (FC01-FC04 for reading).
- Data Type: How to interpret the raw register values (see Data Types section below).
- Byte Order: For multi-register types, how to arrange the bytes (see Byte Orders section below).
- Scale Factor: Multiply the raw value by this number. For example, a scale of
0.1converts a raw value of 2345 to a display of 234.5. - Offset: Add this value after scaling. Useful for sensors with non-zero baselines.
Reading Registers
There are two ways to read register values:
- Read Individual: Click the read icon on any single register entry to perform a one-time read of that register.
- Read All: Click the Read All button to send read requests for every register in your list in sequence.
The value column updates immediately with the response data, interpreted according to your configured data type and byte order.
Writing Registers
For writable registers (coils via FC05/FC15, holding registers via FC06/FC16):
- Write Single: Click the write icon on a register, enter the new value, and confirm. This uses FC06 (single register) or FC05 (single coil).
- Write Multiple: When a register entry has a quantity greater than 1, writing will use FC16 (multiple registers) or FC15 (multiple coils).
Writing incorrect values to holding registers can change device configuration, trigger relay trips, modify setpoints, or cause equipment damage on live systems. Always verify the correct register address and value before writing, especially on production equipment.
Continuous Polling
To monitor registers in real time, use the Start Polling button. This continuously reads all registers at a configurable interval. You can set the polling interval in milliseconds (e.g., 1000 ms for once per second). Click Stop Polling to end continuous reading.
Polling is useful for monitoring live process values like voltage, current, temperature, or power that change over time.
Data Types Explained
ModBus Pro supports the following data types for interpreting raw register values:
| Data Type | Size | Range / Description |
|---|---|---|
Unsigned (UINT16) | 1 register | 0 to 65,535 |
Signed (INT16) | 1 register | -32,768 to 32,767 |
Hex | 1 register | Displays raw hex value (e.g., 0x1A2B) |
Binary | 1 register | Displays all 16 bits (e.g., 0000 0001 1010 0011) |
Float32 (IEEE 754) | 2 registers | Floating-point number (e.g., 234.56) |
Int32 | 2 registers | -2,147,483,648 to 2,147,483,647 |
UInt32 | 2 registers | 0 to 4,294,967,295 |
Multi-register types (Float32, Int32, UInt32) occupy two consecutive 16-bit registers and require a byte order setting to decode correctly.
Byte Orders Explained
When a value spans two registers, the order of bytes matters. Different manufacturers use different conventions. ModBus Pro supports all four common byte orders:
Example: The float value 123.456 is represented by bytes 42 F6 E9 79. Here is how each byte order arranges them across Register 1 (high) and Register 2 (low):
If you are getting nonsensical values when reading Float32 or Int32 data, try each byte order until the values make sense. ModBus Pro's Engineering Tools include a converter that shows all four interpretations side by side.
The most common byte order for Modbus devices is ABCD (Big Endian), but many popular devices from manufacturers like Schneider and ABB use CDAB (Little Endian Word Swap). Always check the device documentation or use trial-and-error with known values.
Scale Factor and Offset
Many devices store scaled integer values instead of floating-point numbers. For example, a voltage of 234.5 V might be stored as the integer 2345 with an implied scale factor of 0.1. Configure the scale factor and offset in the register properties to have ModBus Pro display the correct engineering units automatically:
Displayed Value = (Raw Value x Scale Factor) + Offset
Card View vs Table View
The Register Browser offers two display layouts:
- Card View: Each register is displayed as an individual card with its name, address, value, and controls. Ideal for monitoring a small number of important registers.
- Table View: All registers are displayed in a compact table format. Ideal for large register maps where you need to see many values at once. Multi-register reads are expanded to show individual values for each address.
Toggle between views using the view selector in the toolbar.
Filtering Registers
When working with large register lists, use the filter/search bar to quickly find registers by name or address. The list updates in real time as you type.
4. Device Library
What It Is
The Device Library is a built-in collection of 82+ pre-built register maps for common industrial Modbus devices. Instead of manually entering register addresses, data types, and byte orders from a manufacturer's PDF, you can import a complete register map in one click.
How to Import a Device
- Navigate to the Device Library from the sidebar.
- Browse or search for your device by name, manufacturer, or category.
- Click on the device to see its register map details.
- Click Import to load all registers into the Register Browser.
After importing, all registers appear in the Register Browser with correct addresses, data types, byte orders, scale factors, and descriptive names already configured. You can then connect to your device and start reading immediately.
Available Categories
The library includes devices across a wide range of categories:
- Power Meters: ABB M4M, Schneider PM5xxx, Siemens PAC, Accuenergy, Eastron SDM, Carlo Gavazzi, and more
- Variable Frequency Drives (VFDs): ABB ACS, Siemens, Danfoss, WEG, Yaskawa
- Solar Inverters: SMA, Fronius, Huawei, SolarEdge, GoodWe, Sungrow
- Protection Relays: ABB REF615, REX615, Schneider Sepam, SEL
- PLCs and Controllers: Phoenix Contact PLCnext, Siemens, Wago
- Battery/BESS: Envision, BYD, CATL BMS systems
- Environmental Sensors: Temperature, humidity, pressure transmitters
Searching and Filtering
Use the search bar at the top of the Device Library to search by device name, manufacturer, or model number. You can also filter by category using the category tabs or dropdown.
What Happens After Import
Imported registers are added to your Register Browser workspace. They behave exactly like manually added registers: you can read them, write to them, poll them, and modify their properties. The import does not lock or restrict any settings.
5. Slave Simulator
What It Does
The Slave Simulator turns your computer into a virtual Modbus slave (server) device. It listens on a TCP port for incoming Modbus requests and responds with the register values you configure. This is extremely useful for:
- Testing your Modbus master application without physical hardware
- Simulating device responses during development
- Training and learning Modbus communication
- Verifying register maps before connecting to real devices
Setting Up a Slave
- Navigate to the Slave Simulator from the sidebar.
- Set the Unit ID that the simulated slave should respond to (default: 1).
- Set the Port that the slave will listen on (default: 502). If port 502 is in use, try an alternative like 5020.
Adding Register Values
The simulator supports all four register types: coils, discrete inputs, holding registers, and input registers. Each type has 10,000 addresses available (0 to 9,999).
To set register values:
- Select the register type (e.g., Holding Registers).
- Enter the address and the value you want that register to hold.
- For multi-register data types (Float32, Int32, UInt32), the simulator automatically writes to consecutive register addresses.
You can set values using different data formats including unsigned, signed, hex, binary, Float32 (with Big Endian, Little Endian, and Byte Swap variants), Int32, and UInt32.
Starting and Stopping the Slave
Click Start to begin listening for incoming Modbus requests. The status indicator will show that the slave is running. Click Stop to shut down the slave server. While the slave is running, any Modbus master (including ModBus Pro itself) can connect to it.
Testing Master-Slave Communication on Localhost
A common workflow is to run both the slave simulator and the master on the same computer:
- Start the Slave Simulator on port 502 (or any available port).
- Set some register values in the simulator.
- Go to the Register Browser and configure a TCP connection to
127.0.0.1(localhost) on the same port. - Connect and read registers. You should see the values you configured in the simulator.
This is the fastest way to test and learn Modbus communication without any hardware.
Multi-Register Data Formats
When configuring Float32, Int32, or UInt32 values, the simulator uses two consecutive registers. The byte order used for encoding can be selected in the format dropdown. This lets you test how your master handles different byte order conventions.
6. Scripting Engine
Overview
The Scripting Engine lets you automate Modbus operations using JavaScript. Write scripts to read registers, process data, write values based on conditions, implement polling loops, and build complex automation sequences. Scripts run inside the application with access to a dedicated Modbus API.
The Script Editor Interface
The scripting view consists of:
- Code Editor: A syntax-highlighted editor where you write your JavaScript code.
- Output Console: Displays log output from your script (info, success, warning, and error messages), each color-coded.
- Toolbar: Buttons to run, stop, and save your scripts.
Running and Stopping Scripts
Click Run (or press Ctrl+Enter) to execute the current script. The script runs asynchronously, so long-running scripts with delays will not freeze the interface. Click Stop to halt a running script at any time.
Available API Reference
Scripts have access to the following functions:
Read Operations
Read holding registersconst result = await modbus.readHoldingRegisters(address, quantity);
// Returns an array of register values, e.g., [1234, 5678]
Read input registers
const result = await modbus.readInputRegisters(address, quantity);
Read coils
const result = await modbus.readCoils(address, quantity);
// Returns an array of booleans, e.g., [true, false, true]
Read discrete inputs
const result = await modbus.readDiscreteInputs(address, quantity);
Write Operations
Write a single holding registerawait modbus.writeRegister(address, value);
Write multiple holding registers
await modbus.writeRegisters(address, [value1, value2, value3]);
Write a single coil
await modbus.writeCoil(address, true); // or false
Write multiple coils
await modbus.writeCoils(address, [true, false, true, true]);
Utility Functions
Connection check, delay, and logging// Check connection status
const connected = modbus.isConnected();
// Pause execution for specified milliseconds
await delay(1000); // wait 1 second
// Logging with different severity levels
log.info("Reading registers...");
log.success("Read complete: " + result);
log.warn("Value exceeds threshold");
log.error("Communication failed");
// Data conversion utilities
const floatVal = utils.toFloat32(reg1, reg2); // Convert 2 registers to float
const hexStr = utils.toHex(value); // Convert to hex string
Example Scripts
Example: Continuous monitoring with alarm threshold// Monitor a temperature register and log warnings
const TEMP_REGISTER = 100;
const ALARM_THRESHOLD = 85.0;
while (modbus.isConnected()) {
const regs = await modbus.readHoldingRegisters(TEMP_REGISTER, 2);
const temperature = utils.toFloat32(regs[0], regs[1]);
log.info("Temperature: " + temperature.toFixed(1) + " C");
if (temperature > ALARM_THRESHOLD) {
log.error("ALARM: Temperature " + temperature.toFixed(1) +
" exceeds threshold " + ALARM_THRESHOLD);
}
await delay(2000); // Poll every 2 seconds
}
Example: Read and write registers
// Read a setpoint, increase it by 10, and write it back
const regs = await modbus.readHoldingRegisters(50, 1);
log.info("Current setpoint: " + regs[0]);
const newValue = regs[0] + 10;
await modbus.writeRegister(50, newValue);
log.success("New setpoint written: " + newValue);
Example: Scan a range of registers
// Scan registers 0 to 99 and log non-zero values
for (let addr = 0; addr < 100; addr++) {
const regs = await modbus.readHoldingRegisters(addr, 1);
if (regs[0] !== 0) {
log.info("Register " + addr + " = " + regs[0]);
}
await delay(100); // Small delay between reads
}
Writing Your Own Scripts
Scripts are standard JavaScript with async/await support. All Modbus API calls return Promises, so always use await when calling them. You can use variables, loops, conditionals, functions, and any standard JavaScript features.
Tips and Best Practices
- Always add a
delay()inside loops to avoid flooding the bus with requests. A 100-500 ms delay between reads is usually sufficient. - Use
modbus.isConnected()as a loop condition so scripts stop gracefully when you disconnect. - Wrap Modbus calls in
try/catchblocks to handle communication errors without crashing the script. - Use
log.info()liberally to track what your script is doing. The output console is your primary debugging tool. - Save your scripts frequently using Ctrl+S.
7. Communication Monitor
What It Shows
The Communication Monitor displays a live log of all Modbus transactions between the master and slave. Every request (TX) and response (RX) is recorded with:
- Timestamp: The exact time the frame was sent or received.
- Direction: TX (transmitted/sent by master) or RX (received from slave).
- Function Code: The Modbus function code used.
- Raw Data: The complete hex frame.
- Response Time: How long the slave took to respond (in milliseconds).
- Status: Whether the request succeeded or returned an error/exception.
Filtering Messages
When the log gets busy, use the filter controls to show only the messages you care about. You can filter by function code, direction (TX only, RX only), or status (errors only). This is invaluable when debugging intermittent issues on a busy network.
Exporting the Log
Click the export button to save the entire communication log. This is useful for sharing diagnostic data with colleagues or equipment vendors when troubleshooting field issues.
Understanding Response Times
The response time column shows the elapsed time between sending a request and receiving the response. Healthy Modbus TCP responses are typically under 50 ms on a local network. RTU responses vary based on baud rate but should be consistent. Spikes in response time can indicate network congestion, device overload, or intermittent wiring issues.
8. Discovery
Auto-Scanning for Devices
The Discovery feature lets you automatically find Modbus devices on your network without knowing their addresses in advance. This is especially useful when commissioning new sites or working with unfamiliar equipment.
How It Works
Discovery works by sending read requests to a range of addresses and checking for valid responses:
- TCP Mode: Scans an IP address range (e.g., 192.168.1.1 to 192.168.1.254) on the specified port. For each IP, it sends a test read request and records devices that respond.
- RTU Mode: Scans a range of Unit IDs (e.g., 1 to 247) on the connected serial port. Each ID is probed with a test read.
Configure the scan range, port (for TCP), and the function code/address used for the probe request, then start the scan. The process may take several minutes for large ranges.
Interpreting Results
Discovered devices appear in a results list showing the IP address or Unit ID, the response received, and any identifying information. From the results, you can quickly set up a connection to any discovered device.
9. Data Logging
Setting Up Data Logging
Data Logging records register values over time to a file, letting you track trends, capture transient events, and build historical datasets for analysis.
Configuring Registers and Intervals
To set up a logging session:
- Navigate to the Data Logging module from the sidebar.
- Select which registers to log. You can choose from the registers already configured in your Register Browser.
- Set the logging interval (how often to read and record values). For example, every 1 second, every 5 seconds, or every 60 seconds.
- Choose the output file location and name.
The register count displayed reflects the total number of individual register addresses being logged, which accounts for the quantity field of each register definition. For example, a single entry reading 10 registers at address 100 counts as 10 logged registers.
Starting and Stopping Logging
Click Start Logging to begin recording. The application will read the selected registers at each interval and append the values to the log file. Click Stop Logging to finish the session and finalize the file.
CSV Export Format
Data is exported in CSV (comma-separated values) format, which can be opened in Excel, Google Sheets, or any data analysis tool. The CSV includes:
- A header row with column names (timestamp, register names)
- One row per sample interval
- ISO 8601 timestamps in the first column
- Raw and/or scaled values for each register
Analysing Logged Data
Open the exported CSV in your preferred tool to create charts, calculate statistics, or identify anomalies. Common analysis tasks include plotting voltage and current over time, detecting power quality events, tracking temperature trends, and verifying setpoint changes.
10. Engineering Tools
ModBus Pro includes a suite of engineering tools accessible from the sidebar. These tools help with number conversion, protocol testing, and understanding Modbus internals.
Number Converter
Convert between decimal, hexadecimal, binary, Float32 (IEEE 754), and raw register values. Enter a value in any format and see the equivalent in all other formats instantly. This tool also shows all four byte order interpretations for Float32 values, making it easy to identify the correct byte order for your device.
CRC-16 Calculator
Calculate the Modbus CRC-16 checksum for any byte sequence. Enter a hex frame (without CRC) and the tool computes the CRC that should be appended. Useful for verifying frames captured on an oscilloscope or logic analyzer, or for manually constructing Modbus RTU packets.
FC22 Mask Write Tool
Function Code 22 (Mask Write Register) lets you modify individual bits within a holding register without overwriting the entire value. The tool provides a visual interface for setting the AND mask and OR mask, showing the bit-level effect on the register value. This is useful for toggling control bits without disturbing adjacent bits in the same register.
FC23 Read/Write Multiple Tool
Function Code 23 allows you to read and write registers in a single transaction. The tool lets you configure the read start address, read quantity, write start address, and write values, then sends the combined request. This can reduce round-trip communication time when you need to both read and write in the same cycle.
Connection Test
A simple diagnostic that verifies your connection by sending a test read request and measuring the response time. Useful for confirming basic connectivity before configuring a full register map.
Exception Code Reference
A built-in reference table listing all nine standard Modbus exception codes with their meaning, common causes, and recommended fixes:
| Code | Name | Common Cause |
|---|---|---|
01 | Illegal Function | The function code is not supported by this device |
02 | Illegal Data Address | The register address does not exist on this device |
03 | Illegal Data Value | The value in the write request is outside the permitted range |
04 | Slave Device Failure | An internal error occurred in the slave device |
05 | Acknowledge | The device accepted the request but needs time to process it |
06 | Slave Device Busy | The device is processing another command; retry later |
07 | Negative Acknowledge | The device cannot perform the requested programming function |
08 | Memory Parity Error | The device detected a parity error in its extended memory |
0A | Gateway Path Unavailable | The gateway could not find a route to the target device |
0B | Gateway Target Failed to Respond | The device behind the gateway did not respond |
Function Code Reference
A reference table listing all supported Modbus function codes with their purpose, data direction, and typical usage. See Section 12 for the full reference.
11. Settings
License Management
The Settings page is where you manage your ModBus Pro license:
- Activate: Enter your license key and click Activate. The application verifies the key online and unlocks all features permanently.
- Deactivate: If you need to move your license to another computer, deactivate it first. This frees the license for re-activation elsewhere.
- Transfer: Deactivate on the old machine, then activate on the new machine using the same key. Each key supports one active machine at a time.
License status (active, trial, expired) is shown clearly on the settings page.
Application Preferences
Configure application-level settings such as default connection parameters, UI preferences, and logging options. Changes take effect immediately.
12. Function Code Reference
ModBus Pro supports the following standard Modbus function codes:
| FC | Name | Direction | Description |
|---|---|---|---|
01 | Read Coils | Read | Read the ON/OFF status of 1 to 2000 coils. Returns packed bits (8 coils per byte, LSB first). |
02 | Read Discrete Inputs | Read | Read the ON/OFF status of 1 to 2000 discrete inputs. Same response format as FC01. |
03 | Read Holding Registers | Read | Read 1 to 125 consecutive 16-bit holding registers. The most commonly used function code for reading configuration and measurement data. |
04 | Read Input Registers | Read | Read 1 to 125 consecutive 16-bit input registers. Typically used for read-only process values like sensor measurements. |
05 | Write Single Coil | Write | Write a single coil to ON (0xFF00) or OFF (0x0000). The response echoes the request. |
06 | Write Single Register | Write | Write a single 16-bit value to a holding register. The response echoes the request. |
15 | Write Multiple Coils | Write | Write 1 to 1968 coils in a single request. Values are packed as bits, same as FC01 response format. |
16 | Write Multiple Registers | Write | Write 1 to 123 consecutive holding registers in a single request. Required for writing multi-register values like Float32. |
22 | Mask Write Register | Write | Modify individual bits in a holding register using AND and OR masks without overwriting unrelated bits. |
23 | Read/Write Multiple | Read+Write | Read and write registers in a single transaction. The write operation executes before the read. |
Not all devices support all function codes. If a device does not support a particular function code, it will return Exception Code 01 (Illegal Function). Check the device documentation for supported function codes.
13. Troubleshooting
Common Connection Errors and Fixes
Timeout / No Response
You send a request but never receive a response. Possible causes:
- Wrong IP address or COM port. Double-check the connection parameters.
- Wrong Unit ID. The slave only responds to its configured address. Try Unit ID 1 if unsure.
- Firewall blocking port 502. Add a firewall rule to allow TCP traffic on the configured port.
- RTU parameter mismatch. Baud rate, parity, data bits, or stop bits do not match between master and slave.
- Wiring issue. For RS485, check A/B polarity, termination resistors, and cable continuity.
- Device is offline. Verify the device has power and is operational.
Increase the timeout value to rule out slow responses. If increasing timeout does not help, the issue is likely connectivity, not timing.
Connection Refused (TCP)
The TCP connection is actively rejected by the target. This means the IP address is reachable but nothing is listening on the specified port. Check that the Modbus TCP service is enabled on the device and that you are using the correct port number.
CRC Errors (RTU)
CRC errors indicate data corruption on the serial line. Common causes include electrical noise (especially near VFDs or motors), incorrect wiring, missing termination resistors, or ground loops. Check your RS485 wiring and shielding.
"SerialPort is not defined"
This error means the serial port library is not available. This typically happens if:
- The native serial port module was not included in the build.
- Your USB-to-RS485 adapter driver is not installed or not functioning.
Ensure your adapter is plugged in and its drivers are installed. Restart the application after connecting the adapter.
Exception Codes
When a slave device rejects a request, it returns an exception response instead of the requested data. The exception code tells you why. See the Engineering Tools section for a complete reference of all exception codes, their causes, and solutions.
Reading Wrong Values
If you are getting values that look like garbage or are clearly wrong:
- Wrong byte order: This is the most common cause for Float32/Int32 values. Try all four byte orders (ABCD, DCBA, BADC, CDAB).
- Wrong data type: Make sure you are interpreting the register with the correct type (unsigned vs signed, 16-bit vs 32-bit).
- Wrong register address: Confirm whether your device uses 0-based or 1-based addressing. A register listed as 40001 in documentation is address 0 in ModBus Pro.
- Missing scale factor: Some devices store values as scaled integers. Check if a scale factor or divisor needs to be applied.
Performance Tips
- When polling many registers, group consecutive addresses into a single read request with a larger quantity rather than making many individual requests. This reduces bus overhead significantly.
- Do not set polling intervals below 100 ms unless you have a specific need and know your bus can handle it. Aggressive polling can overwhelm slow devices.
- For RTU networks with many slaves, increase the timeout to account for the sequential nature of RS485 communication. Only one device can talk at a time.
- Close the Communication Monitor when not needed during high-frequency polling to reduce UI rendering overhead.
14. Keyboard Shortcuts
| Ctrl + Enter | Run the current script in the Scripting Engine |
| Ctrl + S | Save the current script |
| Escape | Stop a running script |
| Ctrl + D | Disconnect from the current Modbus connection |
Download ModBus Pro and start diagnosing
7-day free trial with full access to every feature. No sign-up required. Works on Windows 10 and 11.
Download Free Trial