PLC Relay
Configure PLC Relay to read and write PLC tags over Allen-Bradley, Modbus TCP, or Siemens S7.
Supported Protocols
Connection Settings
PLC Address
Simulation Mode
Tag Configuration
Data Types
Tag Name Formats
Web Dashboard
HTTP API
Read Before You Trust the Status Code
Health and Validation
Returns service status, PLC connection state, the active driver and mode, and the latest tag validation summary. Returns 200 with plc_connected: false when the PLC is unreachable, so check the field rather than the status code.
Service status
Service status, healthy or unhealthy
Whether the PLC is connected
Number of configured tags
Active PLC driver
Whether the relay is talking to a real PLC or the in-memory simulator
Configured PLC address
Service status
Validates every configured tag against the PLC, checking that it exists and that its data type matches the configuration. Useful after a PLC program change or a reconnection. Returns a summary with validated: false and zeroed counts when no validation results are available.
Validation summary
Whether validation has been performed
Total number of configured tags
Tags that passed validation
Tags not found on the PLC
Tags whose PLC type does not match the configuration
Tags not yet validated
Service not initialized
Tag Definitions
Read and Write Values
Reads one tag by name. A read that reaches the service but fails at the PLC returns 200 with error populated and value null, so check error as well as the status code.
Name of the tag to read, as configured in PLC_TAGS.
Station1.CycleCountTag value
Tag data type. INT is a 16-bit signed integer (-32,768 to 32,767), DINT a 32-bit signed integer (-2,147,483,648 to 2,147,483,647), and REAL a 32-bit float.
Current value, null when the read failed
Read error, null on success
Unknown tag
Request failed validation
Service not initialized
Writes one value to a configured writable tag. A write that reaches the PLC and fails there returns 200 with success: false and error populated.
Tag name to write
Value to write
Write result
Value written, null when the write failed
Tag is configured as not writable
Unknown tag
Request failed validation
Service not initialized
Batch Operations
Reads several tags in one request. Every name is checked before any read runs, so an unknown tag fails the whole request with 404 rather than returning partial results.
Tag names to read
Tag values
Number of tags read
Empty tag list
Unknown tag in the list
Request failed validation
Service not initialized
Writes several tags in one request. The whole batch is validated first: an empty list, a duplicate tag name, an unknown tag, or a tag that is not writable rejects the request before any write happens. Duplicates are rejected rather than collapsed, since silently keeping the last value for a name would drop the earlier writes.
Individual PLC failures after validation are reported per entry in results, with success_count and error_count summarizing the batch.
Per-write results
Empty writes list or duplicate tag name in the batch
A tag in the batch is configured as not writable
Unknown tag in the batch
Request failed validation
Service not initialized
CLI
Environment Variables
Connection Monitoring
Troubleshooting
Last updated
Was this helpful?