Linking variables

Once the PLC project was successfully added in the System Manager, you can link the newly created input and output variables from the PLC project with the inputs and outputs of your devices.

Prerequisites for this step:

  • An added PLC project in the System Manager.

Link the variables as follows:

1. Double-click on the input or output variables in the tree view under PLC - Configuration.
The Attach Variable window appears and shows which inputs or outputs can be linked with variables.
Linking variables 1:
2. Double-click on the inputs or outputs in the Attach Variable window.
The input variables are linked with the inputs of your hardware, and the output variables with the outputs.
Linking variables 2:

Variables that are already linked are indicated with a small arrow icon in TwinCAT.
3. In the toolbar click on Activate Configuration.
Linking variables 3:
4. Confirm the request whether TwinCAT is to start in Free Run mode with Yes.
  • You have successfully linked variables with the hardware. Use Activate Configuration to save and activate the current configuration.

    The configuration can now be loaded on the CX, in order to automatically start TwinCAT in Run mode, followed by the PLC project.