Mitsubishi MELSEC Q Series Programming Manual page 666

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

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]
Step
[Operations involved when value designated by X20 to X27 is 13]
X27
1 3
BCD value
*4: The operation result will be under 2
loge 2
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.
7-292
Instruction
Device
Conversion
1
D20
2
X20
b15
b0
to BIN
13
BIN
BIN value
129
= 89.4.
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,
divided by 0.43429.
Inputs the data used for
exponent operation (
Checks the range of the
value for operation. *4
Converts the input data into
a 32-bit floating-point real number (
Executes exponent operation (
Conversion to
D11
D10
floating-point
1 3
FLT
32-bit floating-point
real number
129
if the BCD value of X20 to X27 is less than 89, from the calculation
S
).
1
).
2
).
3
D1
EXP operation
3
4 4 2 4 1 3 . 4
EXP
32-bit floating-point
real number
a common logarithm value
D0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents