Mitsubishi Electric M800VW Series Programming Manual page 424

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.11 Special Function Instructions
 Operation errors
 In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- The value designated by (S) is a negative number. (Error code: 34)
- The value designated by (S) is "0". (Error code: 34)
- The designated device value is not within the following range. (Error code: 35)
-1022
0, 2
≤ | Designated device value | < 2
- The designated device value is "-0", unnormalized number, nonnumeric, or ± ∞ . (Error code: 35)
- The operation result exceeds the following range. (When an overflow occurs) (Error code: 36)
| Operation result | < 2
 Program example
 The following program seeks the natural logarithm of the value "10" set by D50, and stores the result at D30 to D33.
SM400
0
9
64-bit floating-point real
number
1024
1024
[Ladder mode]
Inputs the data used for natural
MOV K10 D50
logarithm operation (1).
Converts the operation data
into a 64-bit floating-point real
FLTD D50 D40
number (2).
LOGD D40 D30
Executes natural logarithm
operation (3).
END
(1)
10
MOV
(3)LOG
operation
D43
D42
D41
D40
10
[Operation]
D50
b15
b0
10
BIN value
(2)Conversion to floating-point
real number
FLTD
D33
D32
D31
D30
2.302585
LOGD
64-bit floating-point real
number
403
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
MOV
K10
D50
3
FLTD
D50
D40
6
LOGD
D40
D30
9
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents