5.3 Standard Arithmetic Functions
147
FXCPU Structured Programming Manual
(Application Functions)
1
O
utlin
e
2
Function Li
st
3
Functi
on
Cons
tructi
on
4
Ho
w t
o R
ea
d
Explanati
on of
Func
tions
5
Appl
ie
d
Functions
6
Stan
dard
Functi
on
Blocks
A
Correspondence
be
tw
een Dev
ice
s
an
d A
ddres
ses
Error
An operation error occurs in the following cases. The error flag M8067 turns ON, and D8067 stores the error
code.
1) When the value stored in a device specified in
is negative
(Error code: K6706)
2) When the value stored in a device specified in
is "0"
(Error code: K6706)
3) When the operation result is outside the following range:
(Error code: K6706)
2
-126
≤⏐
Operation result
⏐<
2
128
Program example
In this program, the value stored in a device specified in
is raised to the power of the value stored in a
device specified in
, and the operation result is output to a device specified in
using the data type of
data stored in a device specified in
.
1) Function without EN/ENO(EXPT)
2) Function with EN/ENO(EXPT_E)
[Structured ladder]
[ST]
[Structured ladder]
[ST]
s1
s1
s1
s2
d
s1
EXPT
g_real1
g_int1
In1
In2
g_real2
g_real2:=EXPT(g_real1,g_int1);
EXPT_E
EN
ENO
g_real2
g_bool1
g_real1
g_int1
In1
In2
g_bool3
g_bool3:=EXPT_E(g_bool1,g_real1,g_int1,g_real2);
Содержание 09R927
Страница 2: ......
Страница 234: ...232 FXCPU Structured Programming Manual Application Functions Revision History MEMO ...