Attribute 'TcNcAxis'
The pragma can be used to associate NC axes outside the source code with variables of type Axis_Ref.
Syntax: {attribute 'TcNcAxis' := '<AxisName>'}
The placeholder <AxisName> in inverted commas must be replaced by the name of the axis, as described in the NC section.
Insertion location: Line above the declaration line of a variable
Examples:
PROGRAM MAIN
VAR
{attribute 'TcNcAxis' := 'Axis1'}
// Using the axis in the same POU of type Program.
axis1 : AXIS_REF;
{attribute 'TcNcAxis' := '.axis1:=Axis2;.axis2:=Axis3'}
// Use of the axis in POU fbSample of type Function block.
// The internal axis names (axis1 and axis2) of the POU fbSample must be assigned to the NC axes used by the function block instance (axis 2 and axis 3).
fbSample : FB_Sample;
{attribute 'TcNcAxis' := '[0]:=Axis4;[1]:=Axis5;[2]:=Axis6'}
// Using an axis in an array.
aAxis : ARRAY [0..2] OF AXIS_REF;
END_VAR