Profiles supported by the TwinCAT Simulation Manager

Two different configuration profiles are supported by the TwinCAT Simulation Manager (see Table 1).

Profile

Description

Original

All Devices and Hardware enabled (original configuration)

Remote

System is set to simulation mode. Not used or existant hardware is disconnected from the system and optionally replaced by simulation functionality.

Table 1: Profiles

The original profile is handled implicitly as the TwinCAT Systems configuration imported to the TwinCAT Simulation Manager. The Simulation profile is stored as a delta of Simulation actions referring to the Original profile.

The original <--> simulation mode switchover affects various components of the TwinCAT configuration:

Mappings of I/Os

Mappings of I/Os

The TwinCAT Simulation Manager follows the concept that non-available physical devices are substituted by one or more simulation PLCs. Device Signals that are transferred via IO-Hardware usually source or end up in PLC Symbols. In TwinCAT the binding between IO Hardware and PLC are realized by so called IO-Mappings.

Via its Simulation profile the TwinCAT Simulation Manager is capable to break up or probe the connections to this IO-Hardware and redirect them to a dedicated Simulation PLC. These simulation PLCs can run locally (Local-Simulation) or remotly (Remote-Simulation). The TwinCAT Simulation Manager internally chooses transparently from the user the appropriate data exchange protocol for symbol value mappings between the 'Original'- and 'Simulation-PLCs'. The data exchange occurs in realtime, so that the simulation is capable to emulate the machine characteristics (specifically the signal timing) to the highest degree possible.

Simulation Type

Description

Local

The Data-Transfer protocol is realized as TwinCAT internal IO-Mappings because they have the least overhead. The data exchange in this scenario is realized as IO-Driver synchronized Process-Image memory copy operations. The Realtime characteristics are directly derived from the Realtime characteristics of the TwinCAT Realtime system.

Remote

The data exchange is realized with EtherCAT Network variables (Master-Master communciation). Because the Ethernet-Network is involved, the overhead is higher. The Realtime characteristics are derived from the capabilites of the EtherCAT Master-Master communication.

Table 2: Simulation types

Various kinds of mappings are possible:

Type of mapping

Description

Observing

Observation of an I/O in simulation mode.

A device input or output is observed. That is the device inputs or outputs are available at a simulation input and are available there for further processing.

In original mode, the mapping to stimulation PLC does not exist.

Simulating

Simulation of an I/O, the mapping and the device are removed in simulation mode.

The mapping between device input and the original PLC input (or device output and original PLC output) is separated and "simulated" by the simulation PLC. This means that for inputs the simulation PLC delivers the values for the original PLCs or for outputs the original PLC values are fed into the simulation PLC.

In original mode, this "diversion" is inactive.

Original

No change in simulation mode. Communication between original PLC and device remains active (if device is not "deactivated", see Deactivating device

 

Table 3: Types of data mappings

Original mode

Figure 1 shows a TwinCAT system configuration in non-simulated (original) mode. The active mappings indicated with red and yellow run between the I/O devices and the original PLCs. The mappings indicated in grey to/from the simulation PLC are inactive.

This means that the original PLCs communicate with the I/O devices, which must be present and active. The simulation PLC is inactive and does not participate in the communication (original mode)

Profiles supported by the TwinCAT Simulation Manager 1:
Figure 1: TwinCAT System in original mode

The links / mappings from / to the Simulation PLC can represent local or remote connections, dependant of the location of the Simulation PLC.

Simulation mode

In simulation mode (see Figure 2), the simulation PLC is added. All mappings between original PLCs and I/O devices are distorted in such a way that devices to be simulated no longer participate in communication. All functions of the switched off devices that should be available in simulation mode, must be taken over by the simulation PLC.

The decoupled I/O devices are now no longer required for the (simulation) mode.

Simulated mappings break the mappings to the device and take over the original function. Observer mappings only feed process values into the simulation PLC (the original mapping is not broken).

Profiles supported by the TwinCAT Simulation Manager 2:
Figure 2: TwinCAT system in simulation mode

The links / mappings from / to the Simulation PLC can represent local or remote connections, dependant of the location of the Simulation PLC.

Simulated (virtual) axes

Axes designated as 'simulated' are replaced in simulation mode. This means technically that the encoder of the axis will be replaced by a simulation encoder that is free running (setpoint equals currentPoint). The TwinCAT Simulation Manager persists the settings of the Original-Axis within the Original profile, so that all parameters can be restored when switching back to Original-Mode.

Deactivated devices

Devices designated as 'simulated' are deactivated in the simulation profile and don't necessarily to be physically present. The function of the device, insofar as required for the simulation, is taken over by the simulation PLC.