Modbus Devices¶
Configure Modbus TCP devices to acquire data from PLCs, drives, meters, and other industrial equipment.
Screenshot placeholder: List of configured Modbus devices
What is a Modbus Device?¶
A Modbus Device represents a physical piece of equipment on your network that communicates using the Modbus TCP protocol. Examples: - PLCs (Programmable Logic Controllers) - VFDs (Variable Frequency Drives) - Power meters - Temperature controllers - Flow meters - Custom Modbus devices
Adding a Device¶
Screenshot placeholder: Add device configuration form
- Navigate to Devices → Add Device
- Fill in the configuration:
Basic Settings¶
- Device Name: Descriptive name (e.g., "Pump 1 VFD")
- Device ID: Unique identifier for Sparkplug (e.g., "Pump_01")
- Edge Node: Select the parent edge node
- Enabled: Enable/disable this device
Connection Settings¶
- Primary Host: IP address or hostname
- Port: Modbus port (default: 502)
- Slave/Unit ID: Modbus slave address (1-247)
- Timeout: Connection timeout in milliseconds (default: 5000)
- Retry Count: Number of retry attempts (default: 3)
Advanced Settings¶
- Secondary Host (optional): Failover IP address
- Frame Delay: Delay between reads in milliseconds
-
Zero-Based Addressing: Use 0-based register addressing
-
Click Test Connection
- Click Save
Testing Connection¶
Screenshot placeholder: Connection test result
Before saving, verify the device is reachable: 1. Click Test Connection 2. Gateway attempts to connect and read a register 3. Result shows success or error
Common connection errors: - Connection timeout: Check IP address and network - Connection refused: Verify port number - Invalid slave ID: Check Modbus slave/unit ID - No response: Device may be offline or busy
Device Status¶
Screenshot placeholder: Device connection status indicators
Each device shows real-time status: - 🟢 Connected: Successfully polling - 🟡 Connecting: Attempting connection - 🔴 Disconnected: Cannot reach device - 🟠 Degraded: Intermittent communication
Host Redundancy¶
Screenshot placeholder: Primary/secondary host configuration
Configure primary and secondary hosts for high availability: 1. Set Primary Host - Normal operation 2. Set Secondary Host - Automatic failover 3. Gateway monitors primary health 4. Automatically switches to secondary if primary fails 5. Auto-reconnects to primary when available
See Host Redundancy for details.
Device Operations¶
Start/Stop Polling¶
Screenshot placeholder: Device control buttons
- Start: Begin polling tags
- Stop: Stop polling (maintains configuration)
- Poll Once: Single poll for testing
Edit Device¶
- Click device name or Edit button
- Modify settings
- Click Save
- Device automatically restarts if running
Delete Device¶
- Click Delete button
- Confirm deletion
Warning
Deleting a device removes all associated tags and tag groups. This cannot be undone.
Using Templates¶
Device tag template configuration
Speed up configuration with device templates: 1. When creating device, select Template 2. Choose appropriate template 3. All tags automatically created 4. Customize as needed
See Device Templates for details.
Monitoring¶
Connection Statistics¶
Navigator root dashboard view
View real-time metrics: - Total queries sent - Successful responses - Failed queries - Success rate - Average response time - Last error
Logs¶
Access device-specific logs: - Connection events - Poll cycles - Errors and warnings - Tag read failures
Best Practices¶
- ✅ Use descriptive device names
- ✅ Configure host redundancy for critical devices
- ✅ Set appropriate timeouts based on network
- ✅ Group similar tags by poll rate
- ✅ Use templates for standard equipment
- ✅ Monitor connection statistics
- ✅ Test connections before deployment