Panasonic FP Series Programming Manual page 79

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Arithmetic instructions
Data types
Data type
REAL
REAL
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
Example
The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
ST
When programming with structured text, enter the following:
(* Angle value of point in quadrant 2 *)
rPhi1Rad:=ATAN2_YX(y
rPhi1Degree
(* Angle value of point in quadrant 4 *)
rPhi2Rad:=ATAN2_YX(y
rPhi2Degree
78
I/O
Function
y
Cartesian y coordinate
x
Cartesian x coordinate
:= 10.0,
:=
rPhi1Rad
* DEGR_OF_RAD;
:= -5.0,
:=
rPhi2Rad
* DEGR_OF_RAD;
x
:= -10.0);
(* Result: 2.3561947 *)
(* Result: 135.00002 *)
x
:=
5.0);
(* Result: -0.78539819 *)
(* Result: -45.0 *)

Advertisement

Table of Contents
loading

Table of Contents