Mitsubishi Electric M800VW Series Programming Manual page 364

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.10 Character String Processing 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 improper data as shown below, which cannot be converted into (S), have been set. (Error code: 34)
- Characters other than "30H" (0) to "39H" (9) exist in the integer part or decimal part.
- Two or more "2EH"(.) exist in the character string.
- Characters other than "45H" (E), "65H" (e), "2BH" (+), and "2DH" (-) exist in the character string.
- Multiple exponents of "45H" (E) and "65H" (e) exist in the character string.
- Three or more numeric value digits are described in the exponent part of the character string.
- Multiple signs exist in the exponent part ("2BH"(+) and "2DH(-)") of the character string.
- Multiple signs ("2BH"(+) and "2DH(-)") exist in the positive number part of the character string in decimal format, or
in the mantissa part of the character string in exponential format.
- The number of characters at (S) or after is 0 or exceeds 24 characters. (Error code: 34)
- The NULL code "00H" does not exist in the relevant device range starting from the device number designated by (S).
(Error code: 82)
- The operation result exceeds the following range. (When an overflow occurs) (Error code: 36)
 Program example
 The following program converts the character string stored in the area starting from R0 to a 32-bit floating-point real num-
ber, and stores the result at D0 and D1 when X20 turns ON.
[Ladder mode]
X20
0
4
b15
R0
20H
31H (.)
R1
R2
32H (2)
R3
34H (4)
R4
32H (2)
R5
-
Ignored
EVALP R0 D0
END
[Operation]
b8b7
(space)
2DH (-)
30H (0)
2EH (.)
33H (3)
35H (5)
00H
31H (1)
.
2 3 4
0 1
5
2 1
This is cut
[List mode]
Steps
Inst.
Device
0
LD
X20
1
EVALP
R0
D0
4
END
b0
D+1
-1.23452
343
D
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents