Automated PLC Deployment
for TIA Portal Projects
Automate the full deployment lifecycle: compile hardware and software, establish online connections, compare online/offline states, download firmware and programs to the PLC, and control CPU run state - all scripted via REST API.
Full Deployment Lifecycle Automation
Every step from source code to running PLC, scriptable and repeatable
Compilation
Compile hardware configuration and software blocks individually or together. Compilation results include errors and warnings - integrate into CI pipelines to gate deployment on successful builds.
Online Connection
Establish and terminate online connections to PLCs. Supports PLCSim Softbus, PROFINET, and manual path overrides. Auto-detect connection parameters or specify access points explicitly.
Download Scopes
Choose the download scope per deployment: Software only, Hardware only, Hardware and Software combined, or Software-Only-Changes for minimal impact updates. Precise control over what reaches the PLC.
CPU State Management
Start and stop the CPU programmatically. Read current CPU state before and after deployment. Build safe deployment sequences that transition the CPU through STOP, download, and RUN automatically.
Password-Protected PLC Support
Authenticate against password-protected PLCs before going online. Set, update, and clear online authentication credentials via the API to support secure production environments.
Safety Guards
The confirmPhysicalDownload flag prevents accidental downloads to real hardware - only PLCSim targets allow downloads without explicit confirmation. A critical guardrail for CI/CD pipelines targeting physical PLCs.
Standard Deployment Workflow
Five steps from compiled code to a running PLC
Compile
Trigger hardware and software compilation via compile_device or compile_block. Check the result for errors before proceeding. A failed compilation aborts the deployment.
Go Online
Call go_online with the target device. T-IA Connect resolves the access point automatically or accepts a manual path. Verify the connection state with get_online_state before proceeding.
Compare Online / Offline
Run compare_online_offline to check whether the PLC already matches the project. Skip unnecessary downloads if no delta is detected, reducing PLC disruption in production.
Download to PLC
Execute download_to_plc with the chosen scope (Software, Hardware, HardwareAndSoftware, or SoftwareOnlyChanges). Set confirmPhysicalDownload to true only when targeting real hardware intentionally.
Start CPU
Issue start_cpu to transition the PLC from STOP to RUN. Confirm the final state with get_cpu_state. Log the outcome for audit trail and CI reporting.
REST API Deployment Scripting
Integrate PLC deployment into any CI/CD tool using standard HTTP calls
Compile and check result
# Compile the device (hardware + software)
curl -X POST http://localhost:5000/api/compile-device \
-H 'Content-Type: application/json' \
-d {"deviceName": "PLC_1"}Go online and download
# Go online
curl -X POST http://localhost:5000/api/go-online \
-H 'Content-Type: application/json' \
-d {"deviceName": "PLC_1"}\n\n# Download software only
curl -X POST http://localhost:5000/api/download-to-plc \
-H 'Content-Type: application/json' \
-d {"deviceName": "PLC_1", "scope": "Software", "confirmPhysicalDownload": true}Start CPU and verify state
# Start the CPU
curl -X POST http://localhost:5000/api/start-cpu \
-H 'Content-Type: application/json' \
-d {"deviceName": "PLC_1"}\n\n# Read CPU state
curl -X GET 'http://localhost:5000/api/get-cpu-state?deviceName=PLC_1'Available Deployment Tools
All tools are accessible via REST API and MCP protocol