TwinCAT Module Class Editor (TMC)
The TwinCAT Module Class editor (TMC editor) is used for defining the class information for a module. It includes data type definitions and their application, provided and implemented interfaces, and data areas and data pointers.
To put it briefly: everything that is visible from outside must be defined with this editor.
The basic idea is:
- The TMC Editor can be used to modify the module description file (TMC file). This contains all information that is accessible in the TwinCAT system itself. These are for example symbols, implemented interfaces and parameters.
- The TwinCAT Code Generator, which can also be called from the TMC Editor, is used to generate all the required C++ code, i.e. header and cpp files.
Start the TMC editor
Open the editor by double-clicking on the TMC file of a module. The graphical editor opens:
Functionalities of the TMC editor:
- Create/delete/edit symbols in the data areas, e.g. the logical input or output process images of a module.
- Create/delete/edit user-defined data type definitions.
- Create/delete/edit symbols in the parameter list of a module.
User Help
The TMC editor offers user support for the definition of data types and C++ modules.
For example, in the event of problems (alignment, invalid standard definitions, ...) within the TMC, the user is guided to the relevant location via red flags within the TMC tree:
The user can nevertheless edit the TMCs directly, since they are XML files and can therefore be created and edited by the user.
Tools
The upper section of the TMC editor contains symbols for the required operations.
- Reloading of the TMC file and the types from the type system.
- Updating of the higher-level data types.
- Switching the User Help on/off.
- Start the TwinCAT TMC Code Generator:
The editor will store the entered information in the TMC file. The TwinCAT TMC Code Generator converts this TMC description to source code, which is also available in the context menu of the TwinCAT C++ project.