Mitsubishi MELSEC Q Series Programming Manual page 670

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

Advertisement

LOG(P)
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.
• The value designated by
• The value designated by
• The contents of the designated device or the result of the addition are not "0", or not within
the following range(For the Universal model QCPU, LCPU):
• The value of the specified device is
(For the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant
CPU)
*3: There are CPU modules that will not result in an operation error if
• The result exceeds the following range (Operation results in an overflow)
(For the Universal model QCPU, LCPU)
• The value of the specified device is
(For the Universal model QCPU, LCPU)
Program Example
(1) The following program seeks the natural logarithm of the value "10" set by D50, and stores
the result at D30 and D31.
[Ladder Mode]
[List Mode]
Step
[Operation]
10
7-296
S
S
-126
0, 2
| Contents of designated device | < 2
128
2
| Operation result |
Instruction
Device
D50
Conversion to
b15
b0
2
1
floating-point
10
MOV
BIN value
FLT
is negative.
is 0.
128
3
0. *
0, unnormalized number, nonnumeric, and ±
Sets data used for natural
logarithm operation (
Converts the operation data
into a 32-bit floating-point real number (
Executes natural logarithm operation (
D41
D40
1 0
32-bit floating-point
real number
(Error code: 4100)
(Error code: 4100)
(Error code: 4140)
(Error code: 4100)
0 is specified. For details, refer to 3.2.4.
(Error code: 4141)
(Error code: 4140)
)
1
)
2
)
3
D31
D30
LOG operation
3
2 . 3 0 2 5 8 5
LOG
32-bit floating-point
real number
.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents