Mitsubishi Electronics FXCPU Welding System User Manual


 
5.3 Standard Arithmetic Functions
147
FXCPU Structured Programming Manual
(Application Functions)
1
Outline
2
Function List
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
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);