Modules | The TwinCAT Component Object Model (TcCOM) concept 6 Modules | Modules The TwinCAT module concept is one of the core elements for the modularization of modern machines. This chapter describes the modular concept and working with modules. The modular concept applies to all TwinCAT modules, not just C++ modules, although most details only relate to the engineering of C++ modules. 6.1 The TwinCAT Component Object Model (TcCOM) concept | The TwinCAT Component Object Model (TcCOM) concept The TwinCAT Component Object Model defines the characteristics and the behavior of the modules.
The model derived from the "Component Object Model" COM from Microsoft Windows describes the way in which various independently developed and compiled software components can co-operate with one another. To make that possible, a precisely defined mode of behavior and the observation of interfaces of the module must be defined, so that they can interact. Such an interface is also ideal for facilitating interaction between modules from different manufacturers, for example. To some degree TcCOM is based on COM (Component Object Model of the Microsoft Windows world), although only a subset of COM is used.
In comparison with COM, however, TcCOM contains additional definitions that go beyond COM, for example the state machine module. Overview and application of TcCOM modules This introductory overview is intended to make the individual topics easier to understand. One or several TcCOM modules are consolidated in a driver. This driver is created by TwinCAT Engineering using the MSVC compiler. The modules and interfaces are described in a TMC (TwinCAT Module Class) file. The drivers and their TMC file can now be exchanged and combined between the engineering systems. Instances of these modules are now created using the engineering facility. They are associated with a TMI file.
The instances can be parameterized and linked with each other and with other modules to form the I/O. A corresponding configuration is transferred to the target system, where it is executed. Corresponding modules are started, which register with the TwinCAT ObjectServer. The TwinCAT XAR also provides the process images. Modules can query the TwinCAT ObjectServer for a reference to another object with regard to a particular interface. If such a reference is available, the interface methods can be called on the module instance. The following sections substantiate the individual topics.
ID Management Different types of ID are used for the interaction of the modules with each other and also within the modules. TcCOM uses GUIDs (128-bit) and 32-bit long integers. TwinCAT 3 35 Version: 1.19.1