AxisIsCoupled

AxisIsCoupled 1:

AxisIsCoupled evaluates the coupling state of the cyclic axis interface between the NC and the PLC. AxisIsCoupled returns TRUE if nCoupleState > 1. This means that the axis is coupled to a master axis as a slave axis.

FUNCTION AxisIsCoupled: BOOL

VAR_INPUT
    nCoupleState : DWORD;
END_VAR

nStateDWord : Status word from the cyclic axis interface from the NC to the PLC

Example

PROGRAM MAIN
VAR
    PlcToNc1 AT %QB1000 : PLCTONC_AXLESTRUCT;
    NcToPlc1 AT %IB1000 : NCTOPLC_AXLESTRUCT;
    Coupled : BOOL;
END_VAR
Coupled := AxisIsCoupled( NcToPlc1.nCoupleState );

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.7.0

PC (i386)

TcNcUtilities.Lib

TwinCAT v2.8.0

PC (i386)

TcNC.Lib