SetValuesRP
Set the components of this position in polar coordinates.
Syntax
Definition:
METHOD SetValuesRP
VAR_INPUT
radius : LREAL;
phi : LREAL;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
radius |
LREAL |
Distance from the origin. |
phi |
LREAL |
Polar angle of this position in degrees [°]. |
Beispiel: PositionXY.SetValuesRP
PLC Deklaration
VAR
position : PositionXY;
r : LREAL := 1;
p : LREAL := 15;
END_VAR
PLC Implementierung
position.x := 0;
position.y := 0;
position.SetValuesRP(r, p);
Erwartetes Ergebnis
position.x = 0.966
position.y = 0.259