Industrial integration guide
PLC to Database Integration
Move selected controller data into a database for history, reporting and analytics without placing database logic in the PLC or maintaining a custom copy script.
Architecture.
Sync Connect separates acquisition from storage. Providers read controller data; a database connector owns the destination session and route. The PLC remains independent of database availability and schema details.
PLC via OPC UA, S7 or Modbus
Sync Connect integration layer
Industrial database
When this route fits.
Build a time-series history for process values and machine states.
Supply analytics or reporting without querying controllers directly.
Consolidate several PLC sources into an operational data layer.
Configuration pattern.
This OPC UA-to-InfluxDB pattern shows the separation between acquisition and storage. Confirm connector version, authentication and destination schema for the selected database.
resources:
production-values:
temperature: ns=4;i=1
cycleCount: ns=4;i=8
providers:
line-opc:
driver: opcua
config:
endpoint: opc.tcp://192.168.10.20:4840
connectors:
plant-history:
driver: influxdb
config:
endpoint: http://192.168.20.25:8086
routes:
line-1/production:
mode: read
provider: line-opc
resource: production-valuesDatabase, bucket/collection/table, retention and credentials depend on the selected connector and version. Final configuration follows the approved destination schema.
Technical fit.
- PLC sources
- OPC UA, Siemens S7comm, Modbus TCP or KNX
- Database targets
- InfluxDB, MongoDB or ClickHouse
- Primary use
- Operational history, reporting and analytics
- Schema
- Defined with timestamp, quality, unit and asset identity
Security and network.
- Keep database credentials on the gateway; never store them in the PLC.
- Permit the gateway to reach only the required database endpoint and database scope.
- Use source timestamps where reliable and document the fallback when only gateway time is available.
- Set retention, backup and storage growth rules before enabling production volume.
Failure and recovery behaviour.
Database unavailable
Define the maximum buffered duration, retry policy and the alert that tells operations when the recovery window is at risk.
Duplicate delivery
Choose an idempotency key or duplicate policy before replay. Database recovery must not silently double counters or events.
Schema change
Version changes to field names, types and units. Test consumers before modifying a production route.
Limitations and better alternatives.
- Direct database integration is not a replacement for MES transaction logic, order state or master-data validation.
- Unlimited raw sampling creates cost without useful information; update rates and retention must match the question being answered.
- Store-and-forward capacity is finite and must be sized from the actual payload and outage requirement.
Design the PLC-to-database contract
Share the controller interfaces, target database, required history and reporting questions. We will define the route, schema and outage acceptance test.
Check technical fit