Wizards | TwinCAT Module Class Wizard Since the modules behave like ADS clients or ADS servers that communicate with each other via ADS messages, the two modules (Caller=Client and Called=Server) can run in the same or different real-time contexts on the same or different CPU cores. Because ADS can work across networks, the two modules can also run on different machines in the network. See Sample03 [ } 237] , ADS Communication [ } 189] TwinCAT Module Class with cyclic caller Enables the cyclic call of a C++ program which is cut off from the outside world. Not often used, a module class with cyclic caller and cyclic I/O is preferred.
TwinCAT Module Class with cyclic input/output Creates a new TwinCAT module class, which implements the cyclically calling interface and has an input and output data area. The input and output data areas can be linked with other input/output images or with physical I/O terminals. Important: The C++ module has its own logical input/output data storage area. The data areas of the module can be configured with the System Manager. If the module is mapped with a cyclic interface, copies of the input and output data areas exist in both modules (the caller and the called). In this way, the module can run under a different real-time context and even on another CPU core in relation to another module.
TwinCAT will continuously copy the data between the modules. See Quick Start [ } 58] , sample 01 [ } 236] . TwinCAT Module Class with data pointer Just like the TwinCAT Module Class with Cyclic IO, this template also generates a new TwinCAT module class that implements a calling interface with an input and output data area for linking with other logic input/ output images or with physical I/O terminals. In addition, this template provides data pointers that can be used to access data areas from other modules via pointers. Important:
Unlike in the case of the cyclic I/O data area, where the data is copied cyclically between modules, in the case of the use of C++ data pointers there is only a single data area and this belongs to the destination module. When writing from another C++ module to the destination module via the data pointer mechanism, this will immediately affect the data area of the destination module. (Not necessarily towards the end of a cycle). If the module is executed at runtime, the call occurs immediately, blocking the original process (it is a pointer...). Therefore, both modules (the caller and the called one) must be in the same real-time context and on the same CPU core.
The data pointer is configured in the TwinCAT Module Instance Configurator [ } 129] . See sample10 [ } 256] TwinCAT Module Class for real-time context This template creates a module, which can be instantiated in the real-time context. As described in chapter TwinCAT module state machine [ } 44] , the other modules have transitions for startup and shutdown in a non-real-time context. In some cases modules have to be started when a real-time is already running, so that all transitions are executed in the real-time context. This is a corresponding TwinCAT 3 87 Version: 1.19.1