FB_ResetKinGroup
The Function Block FB_ResetKinGroup resets the Kinematic group. All ACS and MCS axes will be reset. Moreover, the input nItpChannelId can be used to specify the associated interpolation channel. The channel will be reset if the nItpChannelId is not 0.
If all axes are enabled and the group was in Cartesian Mode the group will return to KinStatus_Ready. If the group was not in Cartesian Mode the group will return to KinStatus_Empty. If the axes are not enabled the group will remain in 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 associated interpolation channel. If the input is not 0, the associated interpolation channel is reset.
VAR_IN_OUT
VAR_IN_OUT
stAxesList : ST_KinAxes;
stKinRefIn : NciChannelToPlc;
END_VAR
stAxesList: Determines the ACS and MCS axes included in the configuration. See ST_KinAxes.
stKinRefIn: Determines the kinematic group of the configuration. See NciChannelToPlc.
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 as long as the function block is executing the command. While bBusy is TRUE, no new instructions will be accepted at the inputs. When 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 if the command succeeded.
bError: The output bError becomes true if an error occurs as the command is executed.
nErrorId: Contains the command-specific error code of the most recently executed command. The error code can be found in the ADS error documentation or in the NC error documentation (error codes above 0x4000).
Example
VAR
fbFB_ResetKinGroup : FB_ResetKinGroup;
stAxesConfig : stAxesConfig;
in_stKinToPlc AT %I* : NciChannelToPlc;
END_VAR
fbFB_ResetKinGroup(
bExecute := TRUE,
nItpChannelId := 3,
stKinRefIn := in_stKinToPlc,
stAxesList := stAxesConfig,
bBusy=> ,
bDone=> ,
bError=> ,
nErrorId=> );
Kinematic Group State
