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:

Dialog: Insert Link Variable
In the Insert Link Variable dialog, you define the name and data type for the link variable.
CODESYS attempts to find a suitable default for the current selection. If you select an input or output which is already assigned a variable, then this variable is entered in the dialog first. Otherwise, the default is Connect and BOOL, or the last value used. You can then adjust the entries in the dialog.