PortTester Studio MODBUS TCP/RTU & SERIAL

TX: 0 B
RX: 0 B
🌐
Bridge Offline
Download PC Bridge (v2.1.4)
📡 Communication Traffic Monitor
[System] PortTester Studio initialized. Select Modbus TCP or Serial Port to begin.
Ready (Double-click any value cell to write FC06/FC16, click bit to toggle)
Address Alias (Memo) UINT16 INT16 HEX BIN (16-Bit Click Toggle) ASCII INT32 (2W) FLOAT32 (2W) Changes

Modbus Request Builder

[Modbus TCP MBAP]

📊 Modbus Packet Analyzer (Live & Manual Decoder)

Automatic incoming packet parsing & manual HEX inspection
Format:
Prefix: Suffix:
Quick Modbus Commands:
(0 chars)
⇄
(0 bytes / 0 words)
Insert Control Char:
# Char HEX DEC BIN Description
Type text or hex to display character byte breakdown.
Press keyboard function keys (F1~F10) or click any button below to immediately transmit the preset command.

Modern Modbus & Serial Communication Engineering Guide

🚀 Prerequisite Step 1: Download & Connect Hardware Bridge

To test Modbus TCP slave equipment or communicate over physical serial COM ports (RS-232 / RS-485), you must first download the GoGG PC Hardware Bridge and run it on your local system. Standard web browsers do not possess native operating system privileges to open raw serial ports or direct industrial TCP sockets. The lightweight Bridge agent (Bridge.exe) operates locally on your machine (127.0.0.1:8765) to safely broker Modbus telegrams, serial packets, and loopback simulation tests.

📥 Download Bridge (.zip) v2.1.4 Extract archive and run Bridge.exe.
⚠️ Important Notice: Intended Use & Commercial Disclaimer

Personal Development & Testing Purpose Only: PortTester Studio and the GoGG PC Hardware Bridge (Bridge.exe) are provided strictly for individual engineering development, protocol learning, hardware benchmarking, and offline laboratory testing. They are NOT certified or rated for commercial production machinery, life-safety automation, or live factory floor control. Any deployment in commercial or production environments is done at your own sole risk. GoGG and the software authors accept no liability or responsibility for any industrial equipment damage, operational failure, communication loss, production downtime, or financial damages resulting from the use of this software.

The Modbus protocol, originally established by Modicon (now Schneider Electric) in 1979, remains the premier industrial messaging architecture for programmable automation controllers, servo drives, temperature transmitters, Variable Frequency Drives (VFDs), power meters, and human-machine interfaces (HMIs). This guide details the protocol specifications, frame formats, floating-point byte arrangement, serial port arbitration, and integration with the GoGG PC Hardware Bridge.

1. Modbus TCP, Modbus RTU & Raw Serial Modes

PortTester Studio supports three primary industrial communication modes selectable from the top connection bar:

2. Standard Modbus Function Codes and Register Addressing

Modbus categorizes device memory into four distinct object tables, traditionally identified by 5-digit or 6-digit reference numbers:

Function Code Action Access Type Target Memory Table Reference Prefix
01 (0x01) Read Coils Read / Write Discrete Output Bits 00001 - 09999 (0xxxx)
02 (0x02) Read Discrete Inputs Read Only Physical Sensor Inputs 10001 - 19999 (1xxxx)
03 (0x03) Read Holding Registers Read / Write Analog Outputs & Parameters 40001 - 49999 (4xxxx)
04 (0x04) Read Input Registers Read Only Analog Sensor Measurements 30001 - 39999 (3xxxx)
05 (0x05) Write Single Coil Write Force Bit ON (0xFF00) / OFF (0x0000) 0xxxx
06 (0x06) Write Single Register Write Preset Single 16-bit Register 4xxxx
15 (0x0F) Write Multiple Coils Write Preset Sequence of Bit Coils 0xxxx
16 (0x10) Write Multiple Registers Write Preset Continuous 16-bit Registers 4xxxx

3. 32-Bit Floating Point & Multi-Word Byte Swapping

Because the base Modbus protocol strictly defines registers as 16-bit integers, representing IEEE-754 32-bit single-precision floating-point measurements (such as temperature, flow rate, or power wattage) requires combining two adjacent 16-bit registers (4 bytes: A, B, C, D). However, various PLC and instrument manufacturers store and transmit these 4 bytes in different endianness configurations:

PortTester's Live Register Decoder dynamically computes all 4 permutations simultaneously, eliminating trial-and-error calculations during instrumentation commissioning.

4. PC Hardware Bridge & Serial COM Setup

While modern web browsers restrict direct physical RS-232/485 serial and low-level TCP socket manipulation, the GoGG PC Local Hardware Bridge provides a zero-latency WebSocket and REST relay on http://127.0.0.1:8765:

  1. Download and extract `Bridge.zip` from the download link above.
  2. Launch Bridge.exe on your Windows PC.
  3. Connect your USB-to-RS485 adapter (FTDI / CH340 / CP2102) to your sensor bus, and ensure the 120Ω termination resistor is installed at both ends of the transmission line.
  4. Select Serial Modbus RTU / COM in PortTester, click 🔄 to refresh ports, choose your COM port and baud rate, and execute requests with live packet decoding.

5. Serial Modbus RTU vs. General Raw Serial Communication

Industrial serial links support both structured protocols like Modbus RTU and non-delimited Raw Serial streams:

6. Schema-Free Live Register Poller & Address Discovery Scanner

When commissioning field equipment without an existing register map, the Live Poller & Scanner tab enables rapid reverse-engineering and real-time diagnostics across any Modbus TCP or RTU device:

7. Frequently Asked Questions (FAQ)

Q: What causes Modbus Exception Code 02 (Illegal Data Address)?
A: Exception 02 occurs when the slave controller does not contain the requested register number, or when reading past the boundary of the configured register map. Note that Modbus addresses are 0-based over the wire (e.g., holding register 40001 corresponds to address 0x0000 in the PDU).

Q: Why does my RS-485 communication result in CRC errors?
A: Common causes include swapped A(+) and B(-) differential signal lines, mismatched baud rates or parity configurations, missing common ground reference causing high common-mode voltage, or insufficient 3.5 character time delays between consecutive query packets.

Related Reference Guides: Modbus TCP vs. Modbus RTU Protocol Architecture • Modbus CRC-16 & ASCII LRC Frame Checksum Calculation • RS-232, RS-422 & RS-485 Wiring, Termination & Fail-Safe Bias

⚙️ Explore More GoGG Engineering Tools

Engineering • Utilities • 3D Machine Digital Twins
🔬 Engineering • Trajectory

Trajectory

SCANLAB RTC6, Power PMAC (.pmc), ACS Motion (ACSPL+), and G-Code 1nm trajectory & speed simulator.

Launch Trajectory ➔
📊 Automation

Melsec Monitor

Mitsubishi MELSEC PLC register diagnostics, GX Works3 parsing, and interactive HMI simulation.

Launch Tool ➔
🔌 Diagnostics

Port Tester

TCP socket, UDP broadcast, Modbus TCP/RTU, and RS-232/485 serial communication analyzer.

Open Tester ➔
📐 Utilities • CAD

CAD Viewer

Universal DWG, DXF, PLT (HPGL), SVG, Gerber & IGES viewer with 1nm zoom and micro-gap detection.

Open Viewer ➔
🔍 Vision WASM

Barcode & DPM Reader

Client-side WebAssembly scanner for 1D/2D barcodes and metal Direct Part Mark (DPM) codes.

Scan Codes ➔
📐 Machines • Digital Twin

UVW Stage 3D Twin

3-DOF planar alignment simulator with real-time forward and inverse kinematics calculations.

Open Simulator ➔
🦾 Machines • Robotics

6-Axis Robot Arm

6-DOF industrial robot simulator with analytical forward/inverse kinematics and pick-and-place cycles.

Launch Robot ➔
💬 Community Discussion & Feedback

Ask questions, report hardware device compatibility, or discuss industrial serial and Modbus communication tips.

Legal & Usage Disclaimer: PortTester Studio and the GoGG Hardware Bridge (Bridge.exe) are strictly designed for personal development, protocol research, and experimental testing. Commercial production usage is unauthorized and at the user's sole risk. The authors disclaim all liability for damages or downtime.