Mitsubishi MELSEC-Q/L Programming Manual page 538

Table of Contents

Advertisement

LOGD, LOGDP
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 not within the following range:
-1022
4140
0, 2
| Specified device value | < 2
The specified device value is -0.
The operation result exceeds the following range (when an overflow
occurs):
4141
1024
2
| Operation result |
Program Example
(1) The following program seeks the natural logarithm of the value "10" set by D50, and stores the result at D30 to D33.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operation]
D50
1
b15
10
10
MOV
BIN value
536
Error details
is negative.
S
is 0.
S
1024
Sets data used for natural logarithm
operation (
Converts the operation data into a 64-bit
floating-point real number (
Executes natural logarithm operation (
Device
2
Conversion to
D43 D42
b0
floating-point
FLTD
64-bit floating-point
real number
Q00J/
Q00/
QnH
Q01
––
––
––
––
––
––
).
1
).
2
D41
D40
D33 D32
LOG operation
3
10
LOGD
64-bit floating-point
real number
QnPH QnPRH
QnU
––
––
––
––
––
––
).
3
D31
D30
2.302585
LCPU

Advertisement

Table of Contents
loading

Table of Contents