Prepartions for creating a TwinCAT Simulation Manager project

Up from Version 2.1 of the TwinCAT Simulation Manager it is not necessary anymore that the involved TwinCAT devices run the necessary PLC programs and the necessary TwinCAT System Manager configuration before the project is created. System Manager configurations and PlcControl programs can now be imported and deployed to CPU Resources. Further information on this topic can be read in chapter Deployment.

The following hints for preparation of target systems, configurations and PLC-Programs should be understood as guideline. The TwinCAT Simulation Manager does not rely on these preparations, but they can simplify the workflow dependent of the use case.

PLC Programs and System Manager Configurations

All PLC Programs should reference the PLC Simulation Library "TcSystem.lib". Besides the essential base building blocks for simulation this library instantiates the status information for indicating the current simulation state within the PLC - simply by referencing the library.

Furthermore, it is helpful for the handling of the TwinCAT Simulation Manager tool to activate all included PLC projects as bootprojects (Figure 1). This enables a smooth switching process between 'Original' and 'Simulation'-Profiles. PLC programs will then restart automatically after every TwinCAT restart.

A selection of the "Remind to update boot project on change' feature within the PlcControl project options (Figure 2) will be helpful to remember that the bootprojects are staying consistent to the running PLC programs on the target.

Including the Symbol descriptions for the different PLC projects within the Simulation project is helpful. There exist two different procedures to make the symbol descriptions available in the TwinCAT Simulation Manager project:

  1. If the *.pro and the corresponding *.tpy file is available on the development system (the system where the TwinCAT Simulation manager runs) then these files are copied to the project.
  2. The symbol information was copied to the target system during Project download from the PLC control. To enable this feature the Option "Download Symbol description" must be activated in the PlcControl options (Figure 2) and the compiled project must be available on the target system.

To generate a Simulation PLC Framework project automatically from the original PLC template it is necessary to make the symbolic information available with procedure 1 or 2. If the Simulation PLC program will be coded manually, no access to the symbolic information is necessary.

Prepartions for creating a TwinCAT Simulation Manager project 1:
Figure 1: Bootproject activation for PLCs (TwinCAT System Manager configuration).
Prepartions for creating a TwinCAT Simulation Manager project 2:
Figure 2: Activation of the Symbol description download and the update boot project reminder (TwinCAT PlcControl options)

Target Systems

The TwinCAT System Manager offers the option to store the activated configuration on the target system (Option "Auto Save to target" Figure 3). This option can be helpful because it actualizes the configuration during every activation on the target. If the configuration is available on the target, there is no need to import the configuration to the simulation project.

During selection of the target system within the "Add System ..." dialog (Figure 4) of the TwinCAT Simulation Manager there is the option to upload the target-site stored configuration (Checkbox "Load configuration from target system"). The (nonrecurring) upload takes place if the Dialog is confirmed and a copy of the configuration will be created within the simulation project.

Prepartions for creating a TwinCAT Simulation Manager project 3:
Figure 3: Automatic storing of the current configuration on the target system (System manager option).
Prepartions for creating a TwinCAT Simulation Manager project 4:
Figure 4: Selection of the CheckBox 'Download Configuration from target' to download target site stored System Manager configurations (Simulation Manager Dialog)