A modern Windows GUI for quickly polling Modbus devices using the modpoll utility. It streamlines serial and TCP polling, provides sensible equipment presets, shows a live command preview, parses and color-codes responses, and can optionally fetch unit metadata from a local IWMAC MySQL database.
- ⚡ One-click polling over serial (RTU) or TCP
- 🔧 Equipment presets auto-fill baud, parity, data/stop bits
- 🧪 Live command preview with on-the-fly edits
- 🟢🟡🔴 Status indicator with green/yellow/red blink feedback
- 🧠 Smart log parsing: suppresses boilerplate, counts attempts, highlights issues
- 🔎 COM port discovery via pySerial and Windows Registry
- 🗃️ Units tab (optional): fetches COM/IP/baud/parity from local MySQL
- 🔢 Auto-handling of COM10+ ports using
\\.\COMnformat
On first run, the app will ensure modpoll.exe is available:
- By default it will download to
C:\iwmac\bin\modpoll.exefrom a GitHub release. - If the folder does not exist, download if from here Download modpoll.exe
Download the latest executable directly from our releases:
- File Size: ~10.6 MB
- Dependencies: None (standalone executable)
- Download the
ModPollingTool.exefile from the link above - Extract or place the file in your desired directory
- Run the executable by double-clicking
ModPollingTool.exe - No installation required - it's a portable application
- Press “Refresh” to list COM ports (or type one manually).
- Choose an equipment preset (left pane) or type settings manually.
- For RTU: pick
COMport, set Address and Baud/Parity as needed. - For TCP: enter
host[:port]in “Modbus TCP/IP (-m tcp)”. - Verify the live “Command” preview.
- Click “Start Polling”. Use “Stop Polling” to end.
- Select a
COMport. COM ports ≥ 10 are automatically formatted as\\.\COMn. - Set Address (-a), Baudrate (-b), Parity (-p). Advanced (-d data bits, -s stop bits, -r start reference, -c count, -t type) are available under the Advanced tab.
- Click “Start Polling”. The log shows attempts, parsed data lines like
[100]: 70, and highlights timeouts or port errors.
- Enter
host[:port]in “Modbus TCP/IP (-m tcp)”. - Address (-a), registers (-r, -c) and type (-t) still apply.
- Click “Start Polling”.
- Search and select an equipment model; the app fills typical baud/parity/data/stop settings.
- You can still override any field afterward.
- The “Command” field shows exactly what will be passed to
modpoll. - Edit the command inline for advanced scenarios (e.g., adding flags not exposed in the UI). The app will use your edited command when starting polling.
- The circular indicator blinks while parsing responses:
- Green: valid responses or non-fatal Modbus exceptions (function/data address/value)
- Yellow: checksum errors
- Red: timeouts or port/socket errors
- “Get units data” queries the local database for unit details, then auto-populates a table with Unit ID/Name, Driver, Address, IP/COM, Baudrate, Parity.
- A toggle filters to “Modbus-supported units” (those with a modbus value).
The app constructs a modpoll command and runs it without spawning a console window. Examples:
# Serial RTU example
modpoll COM3 -b9600 -pnone -a1 -r100 -c1 -t3
# TCP example
modpoll -m tcp 192.168.1.50:502 -b9600 -peven -d8 -s1 -a1 -r100 -c10 -t3The log suppresses modpoll headers and focuses on data, attempts, and actionable errors (timeouts, serial port already open, checksum errors, etc.).
By default the app manages its own copy of modpoll.exe at C:\iwmac\bin\modpoll.exe (downloading it if missing).
Place modpoll.exe at that location. This avoids any dependency on a system-installed copy and keeps the binary under versioned distribution.
- modpoll.exe not found: Ensure the app can write to the configured path, or place
modpoll.exethere manually. If downloading fails, check network and proxy settings. - Serial port already open: Stop any service using the same COM port (e.g., IWMAC plant server) and try again.
- Reply time-out: Inspect wiring, address, baudrate, parity. Many devices require exact settings; try vendor presets.
- Checksum error: Usually wiring/noise or parity/baud mismatch. Re-check cable shields and ground.
- COM port missing: Click Refresh, or type it manually; verify device manager; for virtual ports, ensure the vendor tool created the port.
- GUI built with
tkinterandttk - Serial ports via
pyserialand Windows Registry scan - Subprocess runs
modpoll.exewithCREATE_NO_WINDOW, streaming stdout/stderr in real-time - Log filtering avoids
modpollbanners and emphasizes actionable lines
Consider adding a license (e.g., MIT) to clarify usage and redistribution.
Modern Windows GUI for quickly testing Modbus devices using the Modpoll utility. Built with Python and Tkinter, with quality-of-life features for serial/TCP, command preview, status indicator, and a Units tab that reads plant data from MySQL.
- GUI for Modpoll: Start/stop polling without the command line.
- Equipment presets: Auto-applies baudrate, parity, bits, etc.
- Command preview: Live
modpollcommand string updates as you change settings. - Status indicator: Color feedback for responses and errors.
- Units tab: Pulls unit metadata (Unit ID/Name, Driver/Address, Regulator, IP, COM) from MySQL.
- The app runs a known
modpoll.exerather than whatever may exist in the system PATH. It ensures the binary exists and downloads it if missing. - Intention: always use the bundled/known Modpoll binary rather than any other system-installed one [[memory:5703358]].
- Select equipment on the left. Preset communication parameters are applied automatically.
- In the Basic tab, pick a COM port or enter a Modbus TCP/IP host:port in the Advanced tab field.
- Optionally adjust Advanced settings (data bits, stop bits, start reference, count, type).
- Click Start Polling to run. Output appears in the log; the circular indicator shows status.
- Use Units → Get units data to fetch from MySQL. Columns auto-size and support scrolling.
- Serial port already open: Stop any service using the COM port (e.g., plant server) and try again.
- Port or socket open error / Reply time-out: Verify wiring/IP/port, parity/baudrate, address, and that the device is reachable.
