VAL_ComputeFrame
FUNCTION_BLOCK VAL_ComputeFrame
This functions blocks computes the coordinates of a the user frame associated to a bank of cartesian point in the plc database.
A user frame is computed with 3 cartesian positions that shall be taught as shown below.
To achieve maximal accuracy, it is recommend to teach Ox vector along the longest side of the object for which a user frame will be defined.
Syntax
Definition:
FUNCTION_BLOCK VAL_ComputeFrame
VAR_INPUT
Execute : BOOL := FALSE;
CoordSystem : INT := -1;
Origin : T_CartesianPos;
Xdirection : T_CartesianPos;
Ydirection : T_CartesianPos;
END_VAR
VAR_OUTPUT
Busy : BOOL := FALSE;
Done : BOOL := FALSE;
Error : BOOL := FALSE;
ErrorID : UDINT := 0;
UframeData : T_Trsf;
END_VAR
VAR_IN_OUT
AxesGroup : T_StaeubliRobot;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
Execute | BOOL | Rising edge triggers function execution |
CoordSystem | INT | Number of the user frame to compute. The user frame is stored in the plc database located on robot side. |
Origin | Coordinates of the origin of the user frame | |
Xdirection | Coordinates of the point defining Ox direction | |
Ydirection | Coordinates of the point defining Oxy plane of the user frame. |
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 |
UframeData | Coordinates of the computed user frame |