FB_KinCheckActualStatus

FB_KinCheckActualStatus 1:
FB_KinCheckActualStatus 2:

Outdated version

The sole purpose of the function block is to ensure compatibility with existing projects. For new projects, please use F_KinGetChnOperationState. This function block needs more than one PLC cycle to read the status of the kinematic channel. To obtain it for each cycle, use F_KinGetChnOperationState.

The function block FB_KinCheckActualStatus returns the status of the kinematic channel.

FB_KinCheckActualStatus 3: Inputs

VAR_INPUT
    bExecute              : BOOL;
END_VAR

Name

Type

Description

bExecute

BOOL

The command is triggered by a rising edge at this input.

FB_KinCheckActualStatus 4: Inputs/outputs

VAR_IN_OUT
    stAxesList            : ST_KinAxes;
    stKinRefIn            : NCTOPLC_NCICHANNEL_REF;
END_VAR

Name

Type

Description

stAxesList

ST_KinAxes

Determines the ACS and MCS axes included in the configuration. See ST_KinAxes.

stKinRefIn

NCTOPLC_NCICHANNEL_REF

Determines the kinematic group of the configuration.

FB_KinCheckActualStatus 5: Outputs

VAR_OUTPUT
    eKinStatus            : E_KINSTATUS;
    bBusy                 : BOOL;
    bDone                 : BOOL;
    bError                : BOOL;
    nErrorId              : UDINT;
END_VAR

Name

Type

Description

eKinStatus

E_KINSTATUS

Returns the status of the kinematic channel. See E_KINSTATUS.

bBusy

BOOL

The output becomes TRUE when the command is started with bExecute and remains TRUE as long as the function block executes the command. While bBusy is TRUE, no new command is accepted at the inputs. If bBusy becomes FALSE again, the function block is ready for a new command. At the same time one of the outputs bDone or bError is set.

bDone

BOOL

The output becomes TRUE when the command was executed successfully.

bError

BOOL

The output bError is set to TRUE, if an error occurred during the command execution.

nErrorId

UDINT

Contains the command-specific error code of the most recently executed command. Details of the error code can be found in the ADS error documentation or in the NC error documentation (error codes from 0x4000).

Sample

VAR
    fbFB_KinCheckActualStatus  : FB_KinCheckActualStatus;
    in_stKinToPlc AT %I*       : NCTOPLC_NCICHANNEL_REF;
    stAxesConfig               : ST_KinAxes;
    eKinStatus                 : E_KINSTATUS;
END_VAR
fbFB_KinCheckActualStatus(
    bExecute            := TRUE,
    stAxesListReference := stAxesConfig,
    stKinRefIn          := in_stKinToPlc,
    eKinStatus          => eKinStatus      );

State of the kinematic group

FB_KinCheckActualStatus 6: