This project demonstrates a real-world industrial Client–Server SCADA architecture where a Python-based HMI communicates with a remote PLC through Kepware OPC UA over LAN.
The system is built across two separate physical machines to replicate an actual factory environment where the control room and machine network operate independently.
This is not a simulation-only UI — it performs real-time read/write communication with PLC logic through industrial protocols.
| Machine | IP Address | Role | Software |
|---|---|---|---|
| PC 1 (Server) | 192.168.0.20 |
PLC + OPC UA Server | CODESYS SoftPLC + Kepware |
| PC 2 (Client) | 192.168.0.10 |
SCADA/HMI | Python (PySide6) |
Python HMI → OPC UA (TCP/IP) → Kepware → PLC
PLC → Kepware → Python HMI (Feedback)
Operator commands and setpoints are written to the PLC via OPC UA, and live machine data is read back into the HMI for monitoring and visualization.
- Start / Stop / Reset motor from remote HMI
- Setpoint writing to PLC (PV update)
- Bi-directional OPC UA communication
- Process value & count monitoring
- Motor status & limit indicators
- PLC online/offline detection
- Real-time trend chart (CV tracking)
- Dynamic alarm/status messages
- Industrial UI design (PySide6)
- Two-PC industrial setup
- OPC UA over LAN
- Firewall & port configuration (Port 49320)
- Remote PLC control from separate machine
- CODESYS SoftPLC running
- Kepware OPC UA configured
- OPC UA port open (default: 49320)
Install dependencies:
pip install PySide6 opcua qt-materialgraph TD
PLC["PLC / Controller"] -->|"OPC UA / Modbus TCP"| OPC["Kepware OPC UA Server"]
OPC -->|"TCP/IP"| HMI["Python HMI (PySide6)"]
HMI -->|"Write Commands"| OPC
HMI -->|"Read Live Data"| OPC
HMI -->|"Log Production Data"| DB[("SQLite Database")]
HMI -->|"Visualize"| UI["Operator Dashboard"]
HMI -->|"Generate Reports"| RPT["PDF & Excel Reports"]
DB -->|"Dataset for Future"| AI["AI / Analytics Layer"]
HMI -->|"MQTT (Future)"| CLOUD["Cloud / Remote Monitoring"]
graph TD
subgraph Server_PC ["🖥️ PC 1 (Server Room)"]
IP1[("IP: 192.168.0.20")]
PLC["CODESYS SoftPLC"]
KEP["Kepware Server"]
PLC <-->|"Internal Memory"| KEP
end
subgraph Client_PC ["💻 PC 2 (Control Room)"]
IP2[("IP: 192.168.0.10")]
HMI["Python HMI (PySide6)"]
end
KEP <==>|"OPC UA / TCP (Port 49320)"| HMI

