Arithmetic instructions
77
Part II IEC Instructions
ATAN2_YX
Returns the angle of the Cartesian coordinates (x,y)
Each position P of the two-dimensional coordinates can be defined by Cartesian coordinates P(x,y)
or by polar coordinates P(r,) (r = radius, = angle).
X
P
r
Y
0°
90°
180°
270°
φ
Define ATAN2_YX as follows:
ATAN2_YX(y,x)
x y
x > 0
y
0
x < 0
y < 0
y > 0
y < 0
0
x = 0
y = 0
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
PLC types
Availability of ATAN2_YX (see page 1318)
Description
ATAN2_YX returns the angle of the Cartesian coordinates (x,y) within the range of -to.