Command: Link Via Variable
Symbol:
Shortcut: Ctrl + Shift + L
Function: The command opens the Insert Link Variable dialog to declare a variable which is inserted at the selected outputs and inputs.
Call: Ladder menu; context menu
Requirements: An output and an input element in the same network are selected. To select the two elements, hold down the Ctrl key while clicking them.
This function allows you to link output and input elements which cannot be connected by a direct line. For example, a connection between a branched variable and a second function block input can also be programmed:

In the Insert Link Variable dialog, specify the name and data type for the link variable. CODESYS tries to find a suitable pre-assignment for the current selection. If you select an input or output which is already assigned a variable, then this variable is applied in the dialog. Otherwise, the default values are Connect
and BOOL
or the last value used. The details can then be adapted in the dialog.