FB_KinLockTrafoParam

FB_KinLockTrafoParam 1:

Once the transformation parameters have been modified with the aid of FB_KinUnlockTrafoParam, the function block FB_KinLockTrafoParam locks the transformation parameters again, so that write access is no longer possible.

VAR_INPUT

VAR_INPUT
    bExecute              : BOOL;
    oidTrafo              : UDINT;
END_VAR

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

oidTrafo: Object-ID of the kinematic transformation object. See example below.

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

SCARA transformation - sample object ID

FB_KinLockTrafoParam 2:
VAR
    bUserExecute         : BOOL;
    fbFB_LockTrafoParam  : FB_KinLockTrafoParam;
    oidTrafo             : UDINT := 16#01010070; (*Trafo object id*)
END_VAR
fbFB_LockTrafoParam(
    bExecute := bUserExecute,
    oidTrafo := oidTrafo,
    bBusy=>,
    bDone=>,
    bError=>,
    nErrorId=> );