VAL_ShiftPoint
FUNCTION_BLOCK VAL_ShiftPoint
This function block computes a new cartesian position by applying a geometrical transformation.The geometrical transformation specified by ‘Offsets’ parameter can be applied relative to different coordinate systems :
- User frames ( Equivalent to native compose() function)
- Tool ( Equivalent to native appro() function )
Syntax
Definition:
FUNCTION_BLOCK VAL_ShiftPoint
VAR_INPUT
Execute : BOOL := FALSE;
CoordSystem : INT := -1;
Position : T_CartesianPos;
ShiftInFrame : BOOL := FALSE;
FrameIdx : INT := -1;
Offsets : T_Trsf := STRUCT(X := 0, Y := 0, Z := 0, RX := 0, RY := 0, RZ := 0);
END_VAR
VAR_OUTPUT
Busy : BOOL := FALSE;
Done : BOOL := FALSE;
Error : BOOL := FALSE;
ErrorID : UDINT := 0;
relativePosition : T_CartesianPos;
END_VAR
VAR_IN_OUT
AxesGroup : T_StaeubliRobot;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
Execute | BOOL | Rising edge triggers function execution |
CoordSystem | INT | Index of the user frame (starting with 0) |
Position | Absolute end positions for each dimension in the specified coordinate system. | |
ShiftInFrame | BOOL | True=Position will be shifted in specified user frame. False=shift in according to orientation of the Position parameter |
FrameIdx | INT | Index of the user frame in which Position will be shifted - Applicable only if ShiftInFrame is true |
Offsets | Offsets in all directions to apply to the Position |
Outputs
Name | Type | Description |
---|---|---|
Busy | BOOL | Set when function block is executing. Reset when Done or Error is set |
Done | BOOL | This output is set when function block has terminated with success |
Error | BOOL | This output is set when function block has terminated with error |
ErrorID | UDINT | Error code |
relativePosition | New Position after the offets have been applied |