- PLCs connect to AI via a data extraction layer — either an OPC-UA server sitting between the PLC and the data platform, or a direct protocol gateway for PLCs without OPC support.
- The connection is always read-only at the PLC layer — extracting data for AI never modifies control programs or writes to PLC registers.
- Siemens S7, Allen-Bradley Logix, Mitsubishi, and Omron all have established OPC-UA connectivity paths that don't require PLC program changes.
The connection path: PLC → OPC server → data platform → AI
The architecture for connecting PLCs to AI follows a consistent pattern regardless of PLC brand. The PLC runs its control program unchanged. An OPC-UA server (hardware gateway or software layer) reads the PLC’s data table via the PLC’s native protocol. A data platform (FactoLake) subscribes to the OPC-UA server and stores the data stream. AI models run on the stored data.
No step in this chain modifies the PLC program or control logic.
Connection method by PLC brand
Siemens S7-300/400/1200/1500: Native OPC-UA server available in TIA Portal V13+ for S7-1200/1500. For older S7-300/400, an external OPC server (Kepware, Matrikon, Siemens SINEMA) is required. S7 communication protocol for legacy integration without OPC.
Allen-Bradley Logix 5000/CompactLogix: EtherNet/IP is the native protocol. Kepware KEPServerEX or Rockwell’s own FactoryTalk Linx provides OPC-UA capability. Direct EtherNet/IP connectors available in FactoLake for Rockwell environments.
Mitsubishi MELSEC iQ-R/Q/F: SLMP protocol (CC-Link IE compatible). OPC-UA available on newer iQ-R series. For older Q-series, external gateway required.
Omron NJ/NX: Native OPC-UA server built in. Direct connection to FactoLake with minimal configuration.
Schneider Modicon M580/M340: Modbus TCP natively. OPC-UA via Ecostruxure Machine Expert or external gateway.
PLC tag databases often contain thousands of tags, most of which are internal program variables with no operational meaning for AI. Before integration, work with your PLC programmer to identify the 50-200 tags that represent real operational signals (process values, fault codes, cycle counts, set-points vs actuals). Connecting all tags wastes storage and slows model training.
Tag selection: what to extract
Minimum tags for predictive maintenance:
- Motor current (amps) per drive
- Vibration (if sensors exist) or proxy signals (bearing temperature, gearbox temperature)
- Cycle time actual vs setpoint
- Fault code register
- Running/stopped/faulted status bits
Frequently Asked Questions
For PLCs that only support older serial protocols (DF1, DH+, old Modbus RTU), hardware gateways convert these protocols to OPC-UA or modern Ethernet. Moxa, ProSoft, and Hilscher make devices that handle this conversion. This extends PLC connectivity without replacing the PLC.
For predictive maintenance: 1-second intervals for process values (temperature, current, pressure); 100ms for vibration if captured. For OEE and production tracking: once per cycle or once per second for most discrete manufacturing. Higher frequencies generate more data without proportionally more AI value for most applications.
For OPC-UA capable PLCs: yes, with internal engineering knowledge of the PLC tag database. For older PLCs requiring gateway configuration: typically yes, as gateways are configured by the data platform team, not the PLC vendor. Complex multi-network plant floor architectures may require the original integrator’s input on network routing.
Related: AI + PLC · Using OPC-UA for AI Integration · Complete Guide to AI in Legacy Factories