Creating variables

In TwinCAT the PDOs are filled with variables, which can later be linked with the PLC program. A maximum of 8 bytes of data can be created under the corresponding PDOs. It is also allowed to use different variable types, only the limit of 8 bytes per PDO must be observed.

If it is not configured differently in the master, the data is sent automatically with every change. At the planning stage please ensure that the data in a PDO "only" change at a moderate rate (e.g. not with ms frequency). Failure to adhere to this can lead to CAN overload. If this is not observed, the CAN can be overloaded, which can happen quickly, especially at low baud rates.

Requirements for this step:

Create the variables as follows:

1. In the tree view click on a TxPDO or RxPDO to show more information.
2. Right-click on Outputs or Inputs, depending on whether a TxPDO or RxPDO is selected.
Creating variables 1:
3. Click Add New Item in the context menu.
The Insert Variable window appears.
4. Click on the appropriate variable and click OK.
Creating variables 2:
You have successfully created a variable. The new variable is shown in the tree view on the left. In this way you can add further variables for the CANopen slave. In the next step you can specify the transmission type, thereby specifying how the process data objects are transferred.