7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
635
7
• 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.
*3 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 M1 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, (S) a common logarithm value divided by 0.43429.
[Ladder Mode]
[List Mode]
[Operations involved when value designated by X20 to X27 is 13]
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.
*3
1
2
3
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
44241
3
.
4
1
2
3