Welcome to the Smart Configuration Utility! This PyQt5-based tool helps you discover OPC UA, S7, and Modbus nodes and quickly build PLC4X configuration files for use with Kafka or in a local environment.
Build during an internship at MTU AeroEngines in Digilab.
- Node Discovery
Identify nodes by IP for:- OPC UA (including security protocols, credentials, client/server certificates)
- S7
- Modbus
- PLC4X Configuration Generation
Create config files automatically for easy integration with PLC4X.
-
Navigate to
source/pyqt5/
and locatemain.py
. -
(Optional) Create a conda environment (suggested for cleanliness):
conda create -f environment.yml
-
Activate it:
conda activate plc4x_config_tool
-
Run the tool:
python main.py
Inside source/pyqt5/dist/
, you’ll find standalone executables. Choose the one for your operating system and launch it directly.
-
Load or Start Fresh After opening the tool, you can Load config if you already have a configuration file, or begin from scratch.
-
Global Configurations
Provide:
- Source name: the Kafka connector name
- Bootstrap server: the Kafka server’s IP address
- Topic: the existing or new Kafka topic
- Connection Setup
Pick between:
- Production Connection
Used in Kafka. If certificates are required (for OPC UA security, for example), specify the production-relevant paths here (not your local paths).
- Scrape Connection
Used locally. Include local paths for certificates if security is enabled for OPC UA. Adjust protocols (OPC UA, S7, Modbus), IPs, ports, security settings, and intervals. For OPC UA with security, you may need to enter username, password, and certificate details in the format supported by PLC4X.
- Test the Connection
Click “Test” to verify settings. A successful test begins the node discovery phase.
- Create a Job
Once nodes are discovered, add a new job (usually one job is enough). Give it a name and you’ll see available nodes on the left. Double-click to add them as tags, which are recognized by PLC4X.
- Generate the Config File
When all tags are set, generate a JSON file that you can immediately use with Kafka. Enjoy!
- main.py
Controls the main user interface, orchestrating the different modules.
- connection_string_builder.py
Pops up to build connection strings for each protocol (OPC UA, S7, Modbus), whether in production or locally.
-
OPC UA Modules
- opcua_client.py: Connects to the target IP with or without security settings.
- opcua_worker.py: Handles asynchronous discovery tasks.
-
S7 Modules
- s7_client.py: Fetches nodes securely or non-securely.
- s7_worker.py: Performs asynchronous node discovery.
-
Modbus Modules
- modbus_client.py: Connects and retrieves nodes using specified security settings.
- modbus_worker.py: Runs node discovery asynchronously.