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:

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. Add / modify / delete data areas and variables 1:
3. In order to obtain the properties of the data area, double-click on the table or on the node.
Add / modify / delete data areas and variables 2:
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.
Add / modify / delete data areas and variables 3:

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. Add / modify / delete data areas and variables 4:
The new variable "bEnableJob" is created in the data area "Input".

Note Remember to run the TMC Code Generator again.

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.
Add / modify / delete data areas and variables 5:
2. Run the TMC Code Generator again.