ShiftByXY
Displace the components of this position.
Syntax
Definition:
METHOD ShiftByXY
VAR_INPUT
dx : LREAL;
dy : LREAL;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
dx |
LREAL |
Shift of the x-component of this position. |
dy |
LREAL |
Shift of the y-component of this position. |
Example: PositionXY.ShiftByXY
PLC declaration
VAR
position : PositionXY;
dx : LREAL := 2.0;
dy : LREAL := 0.0;
END_VAR
PLC implementation
position.SetValuesXY(0, 1);
position.ShiftByXY(dx, dy);
Expected result
position.x = 2
position.y = 1