AxisIsMoving

AxisIsMoving 1:

AxisIsMoving returns TRUE if one of the corresponding signals, AxisIsMovingForward or AxisIsMovingBackwards, from the cyclic axis interface from the NC to the PLC is set.

FUNCTION AxisIsMoving: BOOL

VAR_INPUT
    nStateDWord : 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;
    Moving : BOOL;
END_VAR
Moving := AxisIsMoving( NcToPlc1.nStateDWord );

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