7-293
EXP(P)
1
2
3
4
6
6
7
8
7.12 Special function instructions
7.12.21 Exponent operation on floating-point data (Single precision) (EXP(P))
Program Example
(1) The following program performs an exponent operation on the value set by the 2 BCD digits
at X20 to X27, and stores the results as a 32-bit floating decimal point real number at D0 and
D1.
[Ladder Mode]
[List Mode]
[Operations involved when value designated by X20 to X27 is 13]
*4: The operation result will be under 2
129
if the BCD value of X20 to X27 is less than 89, from the calculation
loge 2
129
= 89.4.
Because setting a value of over 90 will return an operation error, turn M0 ON if a value of over 90 has been
set to avoid the error.
Conversion from natural logarithm to common logarithm
In the CPU module, calculation is made using a natural logarithm.
To obtain a common logarithm value, enter in, a common logarithm value
divided by 0.43429.
Inputs the data used for
exponent operation ( ).
Converts the input data into
a 32-bit floating-point real number ( ).
Executes exponent operation ( ).
Checks the range of the
value for operation. *4
1
2
3
Step Instruction Device
BCD value
D20
13
X20
Conversion
to BIN
BIN
b15 b0
BIN value
13
Conversion to
floating-point
FLT
EXP operation
D11 D10
EXP
D1 D0
X27
32-bit floating-point
real number
32-bit floating-point
real number
1
3
442 4 1
3
.
4
1
2
3
S