Category Deployment
The category Deployment is used to set up commands that are to be executed during the installation and startup of an application.

The following events are available, after which the commands listed in the list can be called:
Activate Configuration | The required command is called up after the configuration has been enabled. |
Plc Download | The required command is called up after the PLC application has been downloaded to the target system. |
Plc Online Change | The required command is called after a successful online change. |
Plc After Compile | The required command is called after a compilation of the PLC application. |
The following commands can be executed:
Copy | Copies files from parameter 1 (source path) to a location specified in parameter 2 (target path). |
Execute | Executes the application or script listed under parameter 1. |
Source and target paths can contain virtual environment variables, which TwinCAT resolves accordingly.
The following environment variables are supported:
Virtual environment variable | Registry value | Default value |
---|---|---|
%TC_INSTALLPATH% | InstallDir | C:\TwinCAT\3.x \ |
%TC_TARGETPATH% | TargetDir | C:\TwinCAT\3.x \Target\ |
%TC_BOOTPRJPATH% | BootDir | C:\TwinCAT\3.x \Boot\ |
%TC_RESOURCEPATH% | ResourceDir | C:\TwinCAT\3.x \Target\Resource\ |
%SOLUTIONPATH% | - | Location of the solution file |
Registry values are stored in the registry under the following key: \HKLM\Software\Beckhoff\TwinCAT3.
Example:
In the following example, the file SampleFile.xml file is copied from the Config project subfolder of the solution to the folder C:\plc\config on the target system.