A plug-and-play automation solution for configuring the Windows environment, installing TwinCAT packages, and deploying application code. Built with a modular, extensible architecture that automatically discovers and executes deployment scripts. Simply prepare your USB drive, connect to the target system, and run the deployment script.
- Clone this repository to a USB drive
- Populate the
files/directories with your TwinCAT components (seefiles/README.mdfor details) - Verify all required files are present
- Connect USB drive to target Windows device
- Run as Administrator:
.\twincat-deploy.ps1 - Automated deployment: Script handles complete installation process
- System restart: Automatically reboots to activate configurations
- TwinCAT starts automatically in run mode
- HMI interface accessible via web browser
- Real-time Ethernet ready for fieldbus operations
- UI Client launches with system startup
Comprehensive PowerShell automation tool with modular, extensible architecture:
- 🔍 Dynamic Discovery: Automatically finds and executes deployment scripts
- 📁 Phase-Based Execution: Runs scripts in numbered phases (01-, 02-, 03-...)
- 🔧 Plug-and-Play: Add new scripts without modifying main script
- ⚙️ Configurable: Control deployment behavior through file presence
Current Deployment Phases:
- 01-PackageManagement: Install TwinCAT runtime components
- 02-SystemConfiguration: CPU isolation, network setup, real-time drivers
- 03-TwinCATConfiguration: Boot setup, HMI deployment
- 04-UIClientSetup: Configuration and auto-launch
- 99-SystemRestart: Optional system reboot (remove folder to skip)
Features robust error handling, comprehensive logging, and automatic privilege elevation.
# Deploy TwinCAT system (run as Administrator)
.\twincat-deploy.ps1📁 For detailed setup instructions and file organization, see files/README.md
🔧 For extending the deployment with custom scripts, see files/POWERSHELL SCRIPTS/README.md
This repository provides a starting point for building automated TwinCAT deployments in offline/air-gapped environments. It is not intended to be the "end all, be all" solution for every deployment scenario.
For remote deployments or larger-scale operations, consider enterprise automation tools that may better suit your needs:
- TcPkg Remote: Native TwinCAT package management with remote capabilities
- WinRM: Windows Remote Management for PowerShell-based automation
- Ansible: Cross-platform automation framework with Windows support
- Chef: Infrastructure automation platform
- Puppet: Configuration management and deployment automation
Contact your local Beckhoff team to discuss deployment options that best fit your specific environment, scale, and operational requirements.
All sample code provided by Beckhoff Automation LLC are for illustrative purposes only and are provided "as is" and without any warranties, express or implied. Actual implementations in applications will vary significantly. Beckhoff Automation LLC shall have no liability for, and does not waive any rights in relation to, any code samples that it provides or the use of such code samples for any purpose.