Environment: CODESYS V3.5 SP17 | SoftMotion Win 64 | Windows + PowerShell 5.1
The previous post, CODESYS AI Practice — Project Sync, solved “project ⇄ text ⇄ AI”, but the program still only lived in the project.
This post continues: let AI download the program to a soft PLC, start and stop it, and read and write variables.
Goal
One sentence: give AI an online channel into the controller.
Architecture
The path is: AI → Script Engine → soft PLC.
The AI plans actions. The script engine (IronPython inside CODESYS) executes them against the runtime. The soft PLC runs the application.
Capabilities
| Step | What it does |
|---|---|
| Connect | Open an online session |
| Download | Load the compiled application |
| Start / Stop | Control run state |
| Read / Write | Access live variables |
Notes
- Download is a separate step from run
- Variable paths follow the controller’s naming (GVL / program scope)
- Simulation mode works without physical hardware
This is the online closed loop for the host/controller series.


Top comments (0)