VAL_DefineCartesianPos

VAL_DefineCartesianPos 1:

FUNCTION VAL_DefineCartesianPos : T_CartesianPos

This function might be used to initialize a cartesian position.
It provides a way to have a more compact code. The following code below

myPoint := VAL_DefineCartesianPos(10,-13.125,115.10,45.5,25.3,-90.25,2,2,2);

is equivalent to

myPoint.X := 10;
myPoint.Y := -13.125;
myPoint.Z := 115.10;
myPoint.RX := 45.5;
myPoint.RY := 25.3;
myPoint.RZ := -90.25;
myPoint.CS := 2;
myPoint.CE := 2;
myPoint.CW := 2;

Syntax

Definition:

FUNCTION VAL_DefineCartesianPos : T_CartesianPos
VAR_INPUT
    X   : REAL := 0;
    Y   : REAL := 0;
    Z   : REAL := 0;
    RX  : REAL := 0;
    RY  : REAL := 0;
    RZ  : REAL := 0;
    CS  : UINT := 2;
    CE  : UINT := 2;
    CW  : UINT := 2;
END_VAR

VAL_DefineCartesianPos 2: Inputs

Name

Type

Description

X

REAL

Value for X coordinate

Y

REAL

Value for Y coordinate

Z

REAL

Value for Z coordinate

RX

REAL

Value for RX coordinate

RY

REAL

Value for RY coordinate

RZ

REAL

Value for RZ coordinate

CS

UINT

Value for shoulder configuration (1=> sfree; 2=> ssame; 3=> righty; 4=> lefty)

CE

UINT

Value for elbow configuration (1=> sfree; 2=> ssame; 3=> righty; 4=> lefty)

CW

UINT

Value for wrist configuration (1=> sfree; 2=> ssame; 3=> righty; 4=> lefty)

VAL_DefineCartesianPos 3: Return value

Name

Type

Description

VAL_DefineCartesianPos

T_CartesianPos