Create TwinCAT 3 C++ Module instance

An instance of the module must be created in order to execute it. Several instances of a module can exist.

After creating a TwinCAT C++ module, open the C++ node and follow these steps to create an instance.

1. Right-click on the C++ module (in this case "Untitled1") and select Add New Item....
Create TwinCAT 3 C++ Module instance 1:
All existing C++ modules are listed.
2. Select a C++ module. You can use the default name or alternatively enter a new instance name and confirm with OK (in this sample the default name was selected).
Create TwinCAT 3 C++ Module instance 2:
The new instance "Untitled1_Obj2 (CModule1)" becomes part of the TwinCAT 3 Solution: the new node can be found exactly under the TwinCAT 3 C++ source "Untitled1 Project".

The module already provides a simple I/O interface with 3 variables in each case:

The description of these interfaces corresponds in two places: