MODBUSLAB / DOCUMENTATION

A clearer way to
work with Modbus.

Connect to a real device, learn from a virtual one, and follow every request from raw bytes to a useful answer. This guide covers the complete ModbusLab desktop workspace.

Get started RTU · TCP · Virtual bench
FIELD GUIDE12 TOPICSscreens, workflows
and protocol notes
FIRST SESSION

Get started.

ModbusLab is a local desktop workbench for connecting to, understanding, and testing Modbus RTU and Modbus TCP devices. Use it as a master to read and write data, or as a virtual lab when the target hardware is not available.

01

Start with the virtual bus

Open the app and keep the clearly labelled virtual connection. Three example Slave IDs let you explore registers, polling, traffic, and safe writes without attaching equipment.

02

Connect a real device when ready

Select New connection, choose Modbus RTU or Modbus TCP, enter the serial or network settings, then choose Open connection. A green port status means the transport is open; check each Slave ID separately for an online response.

03

Read a small, known range

In Register Explorer, select the Slave ID and memory area, enter the starting protocol offset and quantity, then press Read once. Start with a range confirmed by the device manual.

04

Make the values meaningful

Import or add a Device Model definition to name the register and specify its data type, scaling, unit, and word order. Compare the raw value with the decoded engineering value before using it.

05

Save a portable project

Use Save project to export a .modbuslab.json snapshot of the workspace. Saving is explicit; choose a file location that suits your project.

ModbusLab Overview showing an active virtual bus, responding slave, live register values and recent transactions
01 / OVERVIEWThe virtual workbench is ready to explore before a physical device is connected.

Writes are deliberate. Manual writes, replayed writes, and scenario steps that write require explicit confirmation. A timeout does not prove a write was not applied, so check the destination and device state before retrying manually.

BUILT FOR THE PEOPLE BEHIND THE SIGNAL

Who it is for.

ModbusLab is useful wherever a register map, a wire protocol, and a real-world device meet.

01

Controls engineers

Bring up meters, PLCs, drives, gateways, sensors, and other Modbus equipment. Verify addresses and scaling before integrating the device into a wider system.

02

Commissioning & maintenance

Check link settings, discover responding Slave IDs, compare raw data with expected values, and capture evidence when a site issue is intermittent.

03

Device & firmware teams

Exercise a Modbus master against a simulated slave, investigate requests and exceptions, and replay captured conversations while the physical device is elsewhere.

04

QA, labs & educators

Create repeatable checks, inject communication faults, share project files, and teach addressing, data types, byte order, and protocol framing with a virtual bench.

FROM THE BENCH TO THE FIELD

Practical workflows.

Understand an unfamiliar register map

Read a small range, watch the raw words change, then create definitions for candidate values. Try plausible signedness, float format, byte order, and scaling against a known physical reading. Keep the raw data visible while you validate the interpretation.

Test an integration before delivery

Start the TCP slave server on a local or lab address and a port above 1024 (1502 is a common non-privileged choice). Load realistic register values and have your external Modbus TCP master connect to the simulator.

Investigate an unreliable link

Check transport state first, then look for responses from the intended Slave ID. Filter the analyzer to the affected function, register, error, or latency. Open a transaction to inspect paired bytes and its decoded frame fields.

Build a regression check from a real session

Record known-good reads, save the capture, and turn expected raw values into a Test Scenario. Run the same sequence against a simulator or a connected device and keep the PASS/FAIL report with the project.

01 / WORKSPACE

Overview.

The left navigation opens each workspace screen. The project picker groups work into a named local project; the top bar shows the current screen, notifications, and project actions.

Project pickerOpen a saved project, create a new one, or choose a recent project. Save your current project before starting another if you want to preserve the latest changes.
Save projectExport the current connection settings, register definitions, simulator memory, captures, scenario steps, and restored log history to a JSON project file.
New connectionOpen the transport setup dialog for a virtual bus, RTU serial connection, or TCP connection.
SearchFind an application screen by name. Use Ctrl/⌘ + K to focus search; Ctrl/⌘ + S saves the project.
Help & documentationOpen the in-app reference and guidance. This website is the expanded guide for workflows and current feature boundaries.

The Overview cards summarize the active connection, device responsiveness, recent traffic, and selected register history. Use the shortcut buttons to jump to the Explorer, Analyzer, or Simulator.

02 / TRANSPORTS

Connections.

Choose New connection to select a transport. Name the connection so its purpose is easy to recognize in a saved project.

Modbus RTU setup dialog with serial port, baud, parity, data bits, stop bits and timeout
02 / MODBUS RTUPick the port and match the device’s serial format exactly.
Modbus TCP setup dialog with host, port and response timeout
03 / MODBUS TCPEnter the device host or IP address and TCP port.
Virtual busConnect the master to the built-in simulated devices. It is the safest place to learn the interface and test a workflow without physical equipment.
Modbus RTUChoose an enumerated serial port, baud rate, parity, data bits, stop bits, and response timeout. Make every serial setting match the device and bus.
Modbus TCPEnter an IPv4/hostname target, TCP port (commonly 502), and response timeout. Confirm routing and firewall access from this computer.
Open connection / CancelOpen the configured master transport or dismiss setup. Opening a port does not by itself mean that a Slave ID is present.
Scan slavesIn Register Explorer, scan a chosen Slave ID range. The app probes holding-register offset 0; a valid Modbus exception also proves a device responded.

Two separate states: “COM port open” describes the RTU transport. “Slave 1 online” means that specific ID replied. A port can remain open while an individual device is offline or times out.

03 / READ THE MAP

Register Explorer.

Read and interpret data in the four Modbus memory areas. Protocol offsets are zero-based; a conventional holding register number 40001 maps to protocol offset 0.

Register Explorer showing Slave ID and range controls, four memory areas, register decoding and raw values
04 / REGISTER EXPLORERKeep the labelled register, wire offset, raw words, and decoded value distinct.
Slave IDUnit address to read or write (1-247 for ordinary addressed slaves).
Start offset / QuantityZero-based starting address and number of bits or registers in the request. Use the device documentation and stay within the selected area’s supported range.
Memory tabsHolding Registers (FC03/06/16), Input Registers (FC04), Coils (FC01/05/15), and Discrete Inputs (FC02). Inputs are conventionally read-only.
Read onceSend one read using the selected Slave ID, area, offset, and quantity.
Polling on/offStart or stop repeated reads at the chosen interval. Requests are serialized, so a new poll waits for the previous transaction.
Scan slavesPause polling and open a discovery range. Scanning probes holding-register offset 0 for each chosen ID.
WriteChoose a write function and raw value(s). Review destination and quantity, tick the confirmation, and press Confirm & write. Acknowledgement means the slave accepted the request; verify important state with a read.
Register definitionSelect a model row to edit its name, address, area, data type, scale, offset, unit, read/write metadata, byte order, and word order. Save definition updates the current model.
Register historyChoose a numeric definition to plot recently captured reads. The chart keeps up to 60 samples.

What each value column means

ColumnMeaning
RegisterHuman-facing reference number or name from the device model.
Protocol offsetAddress sent on the wire, beginning at zero. Example: holding 40001 → offset 0.
Raw valueUnsigned 16-bit words received from the device before decoding.
Type / byte order / word orderHow one or more words become an integer, float, text, or bit field.
Scale / offset / unitEngineering conversion and display metadata for a definition.
Final valueDecoded raw value × scale + offset, followed by the model’s unit.
AccessRead/write note from the model. It documents the device map; confirmation still protects writes.

Supported decoders include UInt16/32/64, Int16/32/64, Float32/64, Hex, Binary, ASCII, and bit fields. Multiword values depend on byte and word order. ASCII currently decodes one 16-bit word per definition; very large scaled 64-bit integers may be rejected when conversion would lose precision.

04 / FOLLOW THE EXCHANGE

Traffic Analyzer.

The Analyzer records this application’s master transactions and pairs each transmitted request with its response. It is useful for diagnosis, but it is not a passive network sniffer.

Traffic Analyzer showing paired Modbus transactions with request response bytes and latency
05 / TRAFFIC ANALYZERNewest paired transactions are shown first; click a row to decode its frames.
Search HEX bytes or errorFilter by a hexadecimal byte sequence or an error message.
FiltersShow fields for Slave ID, function code, register offset, minimum latency, and errors only.
Pause live / Resume liveFreeze or resume the displayed stream. Pausing the view does not stop communication acquisition.
Export captureSave the observed transaction list in a portable capture JSON file.
Clear trafficRemove retained transactions from the current view and log.
Transaction rowOpen the decoder: timestamp, direction, Slave ID, function, offset, quantity, latency, status, exception/error, and raw bytes.
Copy transaction / DoneCopy one transaction as JSON for a bug report, or close the decoder.

The analyzer retains up to 5,000 transactions and displays the newest 400. For TCP it decodes the MBAP transaction, protocol, length and unit fields. For RTU it shows the address, function, data and low-byte-first CRC. An exception response is a valid protocol reply that reports an error condition.

05 / HARDWARE-FREE TESTING

Slave Simulator.

Build a virtual device bench for a master you are developing or validating. The simulator supports multiple independent Slave IDs and a real TCP server.

Slave Simulator showing the TCP server, fault injection controls and three virtual devices
06 / SLAVE SIMULATORShare the simulator memory with the internal virtual bus and external TCP masters.
Listen addressInterface and port for the external Modbus TCP master; start with loopback 127.0.0.1:1502 for same-computer tests.
Start server / Stop serverStart or stop the TCP slave endpoint. The status badge shows whether it is listening.
Dynamic valuesEnable example sine-driven readings. Disable dynamics before assigning values to offsets that the example signals update.
Edit memoryEdit the JSON memory for all four areas and devices. Coils and discrete inputs use 0 or 1. The default capacity is 256 values per area.
Add device / Remove slaveAdd another simulated device with a unique Slave ID or remove a listed slave.
Fault type / Apply faultApply normal operation, response delay, timeout, dropped response, invalid CRC, Modbus exception, random holding value, or device restart. Delay and exception choices expose additional settings. Faults apply globally to simulated devices.
Simulator memory JSON editor with cancel and apply buttons
07 / MEMORY EDITORKeep a JSON snapshot of the memory shape and values you want the external master to see.

The external simulator is a Modbus TCP slave, not an RTU slave server. External TCP masters may write coils and holding registers; discrete inputs and input registers are externally read-only. TCP has no CRC, so invalid-CRC injection is available on the internal virtual RTU bus only.

06 / DESCRIBE THE DEVICE

Device Models.

A Device Model gives raw addresses the names, formats, units, and access notes that make a device understandable. Start from a small validated map and refine it as you learn.

Device Models page with import and export controls and a register definition table
08 / DEVICE MODELSImport an existing map or build the definition directly in the app.
Import modelLoad CSV, Excel (.xlsx), or JSON definitions. The expected columns are name, address, area, type, scale, offset, unit, access, byteOrder, and wordOrder.
Format selector / ExportChoose CSV, JSON, or Excel, then export the current model. An exported file is a useful template for future imports.
Add registerCreate a definition with a starting address, memory area, type, scale, offset, unit, access, byte order, and word order.
Definition rowClick a row to edit it. A multi-register type occupies multiple consecutive protocol addresses; keep the range inside the valid address space.

The access field describes the device model; it does not disable the manual write function. The app still requires a separate confirmation for every write.

07 / REPEAT A SESSION

Record & Replay.

Capture transactions with their values and original timing. Replay a known exchange or populate the simulator with observations from a real device.

Record and Replay screen with recording controls, Device Clone and playback timeline
09 / RECORD & REPLAYKeep the request sequence and timing together for repeatable investigation.
Start recording / Stop recordingBegin or end capture of subsequent master transactions. Recordings stop near 100,000 transactions.
Save capture / Open captureExport a JSON capture or load one for inspection and replay.
Replay speedChoose 0.25×, 0.5×, 1×, 2×, 5×, or 10× while preserving time gaps between request starts.
Replay transactionsRun the loaded or recorded requests against the active connection. Captures containing writes require confirmation; writes are never automatically retried.
Clone into simulatorCopy successfully observed values and cycle matching captured reads and response latencies. Unobserved addresses keep simulator defaults.

A clone reproduces only captured observations and timing; it cannot infer undocumented vendor logic or responses that were never recorded. Replay accepts up to 10,000 transactions and one hour of scheduled playback.

08 / CHECK EXPECTED BEHAVIOR

Test Scenarios.

Turn a known operating sequence into a repeatable check. Steps run in order and stop at the first failure.

Test Scenarios screen showing a six-step verification scenario and run controls
10 / TEST SCENARIOSUse explicit reads, waits, raw writes, and assertions to document a test.
Import / ExportLoad or save scenario definitions as JSON so they can be reviewed and versioned with a project.
Edit JSON / Add stepEdit the definition directly or add an ordered action. A step contains the action settings and target device/register details.
ReadRead a chosen area, offset, and quantity.
WriteWrite raw values. The whole run asks for confirmation when it contains writes.
WaitPause for a specified interval before continuing.
AssertCompare a raw value using eq, ne, gte, or lte. Assertions validate the raw register word, not the scaled display value.
Run scenarioExecute in sequence and review the timestamped PASS/FAIL report. Execution stops on the first failure.
09 / CONNECT & CONFIGURE

Integrations & settings.

ModbusLab settings with polling interval, safe writes and local Rust engine status
11 / WORKSPACE PREFERENCESPolling is serialized; safe write confirmation is always enabled.
Integrations screen with the available SNMP v2c GET adapter and planned protocol adapters
12 / INTEGRATIONSSNMP v2c GET is available alongside clearly marked future adapters.
SNMP host / port / community / OIDEnter the agent details and object identifier for a one-off SNMP v2c UDP GET.
Send GET requestSend the configured query and inspect the returned value or error. SNMP community strings are sent in plaintext; use a trusted network.
MQTT / REST / OPC UAThese adapters are shown as future integrations and are not currently implemented.
Project nameChoose a recognizable name for this local workspace.
Polling intervalChoose 250, 500, 1,000, 2,000, 5,000, or 10,000 ms. Requests remain serialized.
Safe write modeAlways enabled. It requires confirmation for manual writes, replay, and test sequences that contain writes.
Save projectExport the current project snapshot; this is a manual save and is not automatic.
QUICK PROTOCOL REFERENCE

Function codes.

Modbus function codes identify the operation inside a request. The Explorer selects the corresponding read or write function from its memory area and action.

CodeOperationTypical areaAccess
01Read CoilsCoilsRead
02Read Discrete InputsDiscrete inputsRead
03Read Holding RegistersHolding registersRead
04Read Input RegistersInput registersRead
05Write Single CoilCoilsWrite · confirm
06Write Single RegisterHolding registersWrite · confirm
15 (0F)Write Multiple CoilsCoilsWrite · confirm
16 (10)Write Multiple RegistersHolding registersWrite · confirm

Modbus RTU frames use CRC-16, transmitted low byte first. Modbus TCP wraps the PDU in an MBAP header and does not use an RTU CRC. For conventional reference numbering, 00001 denotes a coil, 10001 a discrete input, 30001 an input register, and 40001 a holding register; those labels are separate from the zero-based protocol offset.

WHEN A DEVICE DOES NOT ANSWER

Troubleshooting.

The serial port opens, but the slave is offline

Check the Slave ID, wiring polarity and common reference, termination/biasing, and matching baud rate, parity, data bits, and stop bits. A port-open status only confirms the local transport.

TCP times out or disconnects

Check the IP/hostname, port, route, firewall, and that the remote device accepts Modbus TCP. After a failed TCP exchange the stream is closed to avoid a late response contaminating the next request; open the connection again.

An exception says “Illegal data address”

Verify the memory area, zero-based offset, quantity, and whether the device exposes that address. A valid exception means the slave replied, even though the requested operation was rejected.

The raw word is correct, but the displayed value is not

Confirm signedness, register grouping, byte order, word order, scale, and offset against the vendor map. Keep the raw value in view while testing a definition.

A write timed out

The device may have applied a write even if its reply was lost. Read the target state before deciding whether to issue another write.

How do I test without hardware?

Use the virtual bus for the app's internal master, or start the TCP slave server and connect an external master to its listen address. The external RTU slave server is not included.

Licenses and offline use.

A monthly license costs USD 10 per month. A lifetime license costs USD 40 once. Each permits up to three installations. Checkout is hosted by Stripe, and the licensing service grants access only after a verified payment.

In the desktop app, open Settings and enter your license key and a recognizable device name. A random installation identity is stored in your operating system credential store. No hardware fingerprint is collected. Online activation is required.

The app refreshes its server-signed entitlement on startup, every 24 hours, and before a short paid period ends. Offline access lasts at most seven days and cannot exceed a monthly subscription's paid boundary. A server refusal removes cached access; a temporary network outage can use the remaining signed lease.

Deactivate a device in Settings, or use Manage license and devices on the website to revoke a lost installation. Its slot stays reserved until its last issued offline token expires, within seven days. This prevents one license from being cycled through unlimited offline computers. The manager displays the release time.

Save your key in a password manager. If the key and original browser receipt are both lost, support must verify ownership against the original payment. Automated email recovery is not enabled. Stripe hosts checkout and the billing portal; the licensing service never receives card details, register maps, Modbus values, projects, device addresses or communication logs.

TRANSPARENT BY DESIGN

Current capabilities.

ModbusLab is built for local, explicit work. Projects and captures are files on your computer; register maps, values and traffic logs are never sent to the licensing service. Licensed desktop builds require online activation and periodic renewal, with signed offline access for at most seven days within the paid period.

The desktop shell uses Tauri, while an independent Rust core handles protocol validation, RTU/TCP transports, simulation, typed device models, recording, scenario execution, and SNMP. Keeping the engine separate makes it reusable from future CLI, service, or alternative frontends.

  • One active master connection and one active device model per workspace; the simulator supports multiple independent Slave IDs.
  • The Analyzer observes ModbusLab’s own master traffic, not unrelated network clients or external masters talking to the simulator.
  • External slave simulation is TCP only. Invalid CRC injection is available on the internal virtual RTU bus.
  • SNMP v2c GET is implemented; SNMPv3, traps, MQTT, REST, and OPC UA are not yet available.
  • Linux, Windows, and macOS unsigned debug installer builds pass in GitHub Actions. These checks do not cover signing, notarization, or release distribution.
  • Physical RS-485 hardware and production devices have not been validated as part of this development preview.