Mitsubishi MELSEC-Q/L Programming Manual page 536

Table of Contents

Advertisement

LOG, LOGP
7.12.23 LOG, LOGP
Natural logarithm operation on floating-point data
(Single precision)
7.12.23
LOG, LOGP
LOG
LOGP
: Data of which the natural logarithm is obtained or head number of the devices where the data is stored (real number)
S
: Head number of the devices where the operation result will be stored (real number)
D
Internal Devices
Setting
Data
Bit
Word
––
S
––
D
*1:
Applicable for the Universal model QCPU, LCPU.
Function
(1) Returns the natural logarithm of the value designated by
designated by
.
D
(2) Only positive values can be designated by
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Error
code
The value specified in
4100
The value specified in
The specified device value is -0.
The specified device value is not within the following range:
-126
0, 2
| Specified device value | < 2
4140
The specified device value is -0, unnormalized number, nonnumeric,
and ±
.
The operation result exceeds the following range (when an overflow
occurs):
4141
128
2
| Operation result |
*2:
There are CPU modules that will not result in an operation error if -0 is specified.
For details, refer to Page 88, Section 3.2.4.
534
Command
Command
J
\
R, ZR
Bit
––
––
S
+1
S
log
(
32-bit floating-point
real number
. (Operation cannot be performed on negative numbers.)
S
Error details
is negative.
S
is 0.
S
*2
128
Ver.
High
Basic
performance
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
S
LOG
S
LOGP
U
\G
Word
taking (e) as base, and stores operation results at device
S
D
+1
D
)
32-bit floating-point
real number
Q00J/
Q00/
QnH
Q01
––
––
––
––
Process
LCPU
Redundant Universal
D
D
Constants
Zn
Other
E
*1
––
*1
––
––
QnPH QnPRH
QnU
LCPU
––
––
––
––
––
––
––

Advertisement

Table of Contents
loading

Table of Contents