Add / modify / delete data areas and variables
The properties and functionalities of a TwinCAT class can be added, edited and deleted with the aid of the TwinCAT Module Class (TMC) Editor.
This article describes:
- Creation of a new data area in the TMC file.
- Creating new variables in a data area.
- For example, edit the name or data type of variables existing in the TMC file.
- Delete existing variables from the TMC file.
Creating a new data area
- 1. After starting the TMC Editor, select the Data Areas node of the module.
- 2. Click on the + button, thus creating a new data area.
- 3. In order to obtain the properties of the data area, double-click on the table or on the node.
- 4. Rename the data area.
Creating a new variable
- 1. Select the sub-node Symbols of the data area.
- 2. Extend this data area by a new variable by clicking on the + button. A new entry "Symbol4" is then listed.
Editing the name or data type of existing variables
- 1. Select the sub-node Symbol4 or double-click on the row. The variable properties are shown.
- 2. Enter a new name, e.g. "bEnableJob" and change the type to BOOL.
- The new variable "bEnableJob" is created in the data area "Input".
Deleting existing variables
- 1. To delete existing variables from the data area, select the variable and then click on the delete icon:
in this sample, select "MachineStatus1" and click on the Delete icon.
- 2. Run the TMC Code Generator again.