M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.11 Special Function Instructions
EXPD, EXPDP: Exponent operation on floating-point data (double precision)
Setting
Bit devices
data
X
Y
M
L
F
S
D
[Instruction symbol] [Execution condition]
EXPD
EXPDP
Setting data
Setting data
Data for which the exponential value is obtained or the first number of the device
S
where data is stored.
D
The first number of the device to store the operation result.
Functions
EXPD
Returns the exponent of the value designated by (S) and stores the operation result in the device designated by (D).
S+3
S+2
S+1 S
e
(
64-bit floating-point real
number
Exponent operations are calculated with the base (e) as "2.71828".
When the operation results in "-0" or an underflow occurs, the operation result is processed as "0".
When setting input values from programming tools, rounding errors may occur.
For precautions when setting input values from programming tools, refer to "6.3.4 Single/Double-Precision Real Number
Data".
Operation errors
In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- The designated device value is not within the following range. (Error code: 35)
-1022
0, 2
≤ | Designated device value | < 2
- The designated device value is "-0", unnormalized number, nonnumeric, or ± ∞ . (Error code: 35)
- The operation result exceeds the following range. (When an overflow occurs) (Error code: 36)
| Operation result | < 2
IB-1501667-B
Usable devices
B SB
T SM V
T
C
○
○
○
○
Command
Command
Meaning
D+3
D+2
D+1
)
64-bit floating-point real
number
1024
1024
Word devices
D
R/ZR W SW SD
Z
○
○
○
○
○
○
○
○
○
○
D
398
Digit
Con-
Pointer
designa-
Index
stant
tion
E
P
○
indicates the sign "EXPD".
S
D
P
S
D
Data type
Real number
○