Attribut 'TcNcAxis'

Das Pragma kann angewendet werden, um NC-Achsen außerhalb des Quellcodes, Variablen des Typs Axis_Ref zuzuordnen.

Syntax: {attribute 'TcNcAxis' := '<AxisName>'}

Der in einfache Hochkommata eingeschlossene Platzhalter <AxisName> muss durch den Namen der Achse, wie im Teil NC beschrieben, ersetzt werden.

Einfügeort: Zeile oberhalb der Deklarationszeile einer Variablen

Beispiele:

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