Skip to content

Beckhoff-USA-Community/AAG_Windows-TwinCAT-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows TwinCAT Deploy

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.

How It Works

1. Prepare USB Installation Package

  1. Clone this repository to a USB drive
  2. Populate the files/ directories with your TwinCAT components (see files/README.md for details)
  3. Verify all required files are present

2. Deploy to Target System

  1. Connect USB drive to target Windows device
  2. Run as Administrator: .\twincat-deploy.ps1
  3. Automated deployment: Script handles complete installation process
  4. System restart: Automatically reboots to activate configurations

3. Production Ready

  • 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

The twincat-deploy.ps1 Script

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.

Quick Start

# 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


📋 Important Note: Getting Started Solution

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.

Alternative Deployment Options

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

Need Guidance?

Contact your local Beckhoff team to discuss deployment options that best fit your specific environment, scale, and operational requirements.


⚠️ Disclaimer

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.

About

Configure a complete 4026 system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors