Modbus Reader
Read, monitor, and automate Modbus TCP/RTU register polling directly inside Visual Studio Code.
- Multi-device sessions (TCP + RTU)
- Auto-read monitoring with interval polling
- Automations (conditions → actions)
- History + export (CSV)
Contents
Key Features
Sessions (TCP / RTU)
- Create and manage multiple Modbus sessions (TCP and RTU)
- Connection status indicators (connected / disconnected / error)
- Session persistence across VS Code restarts
- Supports standard read function codes:
- FC01 Coils
- FC02 Discrete Inputs
- FC03 Holding Registers
- FC04 Input Registers
Monitoring
- Auto-read intervals: 1s, 5s, 15s, 30s, 1m, 5m
- View values in decimal, hex, and binary
- Per-session history (last 1,000 readings)
- Export readings/logs to CSV (with timestamps)
Automations
- Interval-based execution (scheduler)
- Conditions with operators:
=, ≠, >, <, ≥, ≤
- Actions:
- Show VS Code notifications
- Append events to a log file
- Visual runtime feedback:
- “Running” spinner while evaluations execute
- Status bar countdown to next run
Environment Variables
- Centralize reusable values (IPs, ports, Unit IDs, etc.)
- Reference anywhere with:
${VARIABLE_NAME}
Pro Features
- Up to 50 concurrent sessions
- 1,000 entry history per session
- Pagination for large datasets (50 entries/page)
- Sticky table headers
- CSV export with timestamps
Quick Start
1) Create a session
- Open Modbus Reader in the Activity Bar
- Click + New Session
- Choose TCP or RTU
- Enter connection details:
TCP
- Host:
192.168.1.100
- Port:
502 (default)
RTU
- Serial Port:
COM3 / /dev/ttyUSB0
- Baud Rate: e.g.,
9600
- Set Unit ID (default
1) and Timeout (default 3000ms)
- Click Add
2) Connect + read registers
- Select the session
- Click Connect
- Choose register type: Holding / Input / Coil / Discrete
- Enter:
- Start address (e.g.,
0)
- Count (e.g.,
10)
- Click Read
3) Enable auto-read monitoring
- Select an interval (1s → 5m)
- Click Start Auto-Read
- Watch values update in real time
- Click Stop to pause
4) Create an automation
- Open the Automate view
- Click + New Automation
- Name the automation
- Select one or more sessions
- Add conditions (example:
holding[100] > 50)
- Add actions (notification and/or logging)
- Save and toggle Enabled
5) Use environment variables
- Open the Env view
- Click + New Variable
- Add:
- Name:
DEVICE_IP
- Value:
192.168.1.100
- Reference anywhere:
${DEVICE_IP}
Automation Examples
Temperature threshold alert
Condition: holding[100] > 75
Action: Notify "High temperature detected!"
| |