FB_KinResetGroup

FB_KinResetGroup 1:

The function block FB_KinResetGroup resets the kinematic group. All ACS and MCS axes are reset. In addition, the input nItpChannelId can be used for specifying the corresponding interpolation channel. The channel is reset, if the nItpChannelId is not 0.

When all axes are enabled and the group was in cartesian mode, the group returns to state KinStatus_Ready. If the group was not in cartesian mode, the group returns to state KinStatus_Empty. If the axes are not enabled, the group remains in state KinStatus_Empty.

VAR_INPUT

VAR_INPUT
    bExecute      : BOOL;
    nItpChannelId : UDINT;
END_VAR

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

nItpChannelId: ID of the corresponding interpolation channel. If the input us not 0, the corresponding interpolation channel is reset.

VAR_IN_OUT

VAR_IN_OUT
    stAxesList            : ST_KinAxes;
    stKinRefIn            : NCTOPLC_NCICHANNEL_REF;
END_VAR

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

stKinRefIn: Determines the kinematic group of the configuration.

VAR_OUTPUT

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

bBusy: 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: The output becomes TRUE when the command was executed successfully.

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

nErrorId: 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_ResetKinGroup   : FB_KinResetGroup;
    stAxesConfig         : stAxesConfig;
    in_stKinToPlc AT %I* : NCTOPLC_NCICHANNEL_REF;
END_VAR
fbFB_ResetKinGroup(
    bExecute := TRUE,
    nItpChannelId := 3,
    stKinRefIn := in_stKinToPlc,
    stAxesList := stAxesConfig,
    bBusy=> ,
    bDone=> ,
    bError=> ,
    nErrorId=> );

State of the kinematic group

FB_KinResetGroup 2: