FB_KinExtendedRotationRange

FB_KinExtendedRotationRange 1:
FB_KinExtendedRotationRange 2:

Extended rotation range

  • For a unique solution the standard rotation range is limited to:
  1. Rotation1: -180 to 180 degrees,
  2. Rotation2: -90 to 90 degrees,
  3. Rotation3: -180 to 180 degrees.
  • In some 6-axis applications it is desirable to be able to rotate beyond this rotation range.
    The function blocks FB_KinExtendedRotationRange and FB_KinPresetRotation enable the rotational state to be extended, saved and restored beyond the default values.

The function block FB_KinExtendedRotationRange saves and restores the rotational state of the kinematic group.

If the function block is executed with bActivate:=TRUE, the rotational state is saved until the kinematic group is resolved. If the kinematic group is subsequently built or reset, the saved rotational state is restored. If the rotation deviates significantly (>10.0 degrees per axis), the saved rotational state is not restored and FB_KinConfigGroup or FB_KinResetGroup fail with error 0x815D.

If the function block is executed with bActivate:=FALSE, the rotational state is not saved or restored (default behavior).

VAR_INPUT

VAR_INPUT
    bExecute       : BOOL;
    oidTrafo       : UDINT;
    bActivate      : Bool;
END_VAR

bExecute: The command is executed with a rising edge.

oidTrafo: Object ID (OTCID) of the kinematic transformation object.

bActivate: If set to TRUE, the extended rotation range is activated.

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).

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.7

Advanced Motion Pack V3.1.10.1

PC or CX (x86 or x64)

Tc2_KinematicTransformation (V3.2.7.3 or later)