Project Automation

The Project Automation section contains VIs that can be used to create, configure and activate a TwinCAT 3 project. The associated example is particularly suitable if you have no previous knowledge of TwinCAT 3. The folder contains the following blocks:

Project Automation 1:

Init Project

The VI Init Project initializes a TwinCAT 3 Engineering project. If there is no solution file (*.sln) and no TwinCAT 3 project of the same name under the specified path, these are created, otherwise the existing ones are called. Each call of the block opens a new TwinCAT 3 XAE Shell, unless this is prevented via the Suppress UI parameter.

Project Automation 2:

Input/output

Meaning

[0] Solution Path

An absolute path that specifies where the solution file should be stored or from where it should be opened. If the path is empty, the LabVIEW™ Data directory is selected

[1] Suppress UI?

False (default): Open new XAE Shell

True: Prevents the opening of a new XAE Shell

[4] Handle

The handle to the TwinCAT 3 Solution

[5] TwinCAT Route Information

LabVIEW™ cluster consisting of the following elements:

  • Route Identification: Target system designation consisting of host name, IP address or AMS NetId
  • Route Authentification: Route authentication consisting of user name and password

[7] Solution Name

Name of the solution file. If the name does not yet exist in the directory, a new solution is created; if the file already exists, it is used.

[9] Project Name

Name of the new TwinCAT 3 project. If the project already exists, no new one is created.

Create Task

The Create Task block initializes a TwinCAT 3 task with a name. If the task already exists in the project tree, the existing one is used.

Project Automation 3:

Input/output

Meaning

[0][4] Handle

The handle to the TwinCAT 3 Solution

[1] With Image?

True: Create TwinCAT 3 task with image, i.e. the task can contain one or more inputs/outputs that can be linked to real inputs/outputs

[5] Task Name

The name of the task

[7] Cycle Time [ms]

The cycle time of the task in milliseconds

[9] Use Core No.

The number of the CPU core on which the task is executed.

Project Automation 4:

Isolated and split cores

Do one or more isolated cores already exist? These are then preferred over split cores.

Scan IO

The Scan IO block checks the target system for connected I/O devices (EtherCAT master or EtherCAT slave) in the network and adds them to the project tree. The following is taken into account:

Project Automation 5:

Input/output

Meaning

[0][4] Handle

The handle to the TwinCAT 3 Solution

[1] Enable ADS Server?

True: Enables the ADS server for the process image so that all inputs and outputs can be accessed via ADS. This can be used, for example, to read terminal values with the TF3710.

[5] Device Type

LabVIEW™ Enum consisting of two elements:

  • EtherCATMaster: Check new or existing EtherCAT masters and their terminal configuration
  • EtherCATSlave: Check changed terminal configuration of existing masters

[9] SyncMaster TaskName

Name of the task that is responsible for the cyclic execution of the EtherCAT frame.

Create PLC

The block creates a new PLC project within the TwinCAT 3 project. If a PLC with the same name already exists in the directory, it will be used.

Project Automation 6:

Input/output

Meaning

[0][4] Handle

The handle to the TwinCAT 3 Solution

[5] PLC Name

The name of the TwinCAT 3 PLC project

[7] Autostart at Boot?

True: After restarting the computer, the PLC program is started automatically

Activate Solution

The block activates the TwinCAT configuration and switches from Config to Run Mode.

DANGER

Controller is activated

The controller is activated and the program code is executed by the hardware.

Project Automation 7:

Input/output

Meaning

[0][4] Handle

The handle to the TwinCAT 3 Solution

[6] ADS State

LabVIEW™ enum: Describes the current state of the TwinCAT system

Release Project

The block releases the handle to the TwinCAT 3 Solution from the memory.

Project Automation 8:

Input/output

Meaning

[0] Handle

The handle to the TwinCAT 3 Solution

[1] Close Solution?

True: Close the TwinCAT 3 XAE Shell