Automatic mapping

The inputs and outputs of the Simulink® model are automatically mapped to digital inputs and outputs in the following. This means that after instantiation of the TcCOM in a TwinCAT project, the mappings are created automatically. Manual linking is no longer necessary.

Navigate to the parameter Link to TwinCAT XAE tree item identifier in the Block Parameters of the Tc Module In or Tc Module Out under Advanced. You can either enter the Tree Item Identifier and the data type manually, or select them from Simulink® via a browser.

By selecting the Link button a new dialog opens. You can now load an existing TwinCAT project (Select Project) and browse the existing inputs or outputs or you can create a new project (New Project) and automatically scan the EtherCAT fieldbus in the new project to link it with the detected I/Os.

Create a new project and display and select inputs and outputs of the target:
1. Create a new project.
2. For this purpose, select a memory path of the new TwinCAT project to be created.
3. Select the target to which you want to download the project.
4. Automatically scan the I/O tree of the target.
All inputs and outputs of the target are displayed and can be selected.
Automatic mapping 1:

By selecting the input or output you want to link, the tree item identifier is automatically set and the appropriate data type is automatically entered in Simulink®.

If the Simulink® model described above is compiled into a TcCOM and integrated in a TwinCAT 3 Solution, a mapping to the inputs and outputs selected in Simulink® is automatically created.
Coloring of the symbols for differentiation:
the automatically generated mappings are provided with a blue symbol, while manual mapping symbols are displayed white.

Automatic mapping 2: