Real Constant (E); Setting Range For Real Numbers; Processing When Operation Is In Progress; Character String Constant - Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

25.3

Real Constant (E)

Use this type of constants when specifying a real number in a program. There are two types of real numbers: single-precision
real number and double-precision real number. Specify it using Echaracter. (e.g. E1.234).

Setting range for real numbers

The setting ranges are different between the single-precision real number and double-precision real number.
Specification range for single-precision real numbers
The following is the specification range for single-precision real numbers.
128
-126
< device  -2
-2
(E-3.40282347+38 to E-1.17549435-38, 0, E1.17549435-38 to E3.40282347+38)
Specification range for double-precision real number
The following is the specification range for single-precision real numbers.
1024
-1022
< device  -2
-2
(E-1.7976931348623157+308 to E-2.2250738585072014-308, 0, E2.2250738585072014-308 to
E1.7976931348623157+308)
For the number of significant digits and input range of real number data input by the engineering tool, refer to
the following.
 MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks)

Processing when operation is in progress

This section describes the processing when operation is in progress.
When overflow and/or underflow occurs:
If an overflow and/or underflow occurs when the operation is in progress, the following process is performed:
• When overflow occurs: An error is returned.
• When underflow occurs: 0 is returned (no error occurs).
When a special value is input:
When a special value
operation is in progress, it is handled as "+0," and therefore "-0" is not returned as an operation result.
*1 The special values include -0, denormalized number, nonnumeric number, and .
25.4

Character String Constant

The character string can be specified by enclosing it with single quotation marks (' ') or double quotation marks (" "). (Example:
"ABCDE") Note that the NULL character (00H) becomes the termination character.
For details on character string data, refer to the following.
 MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks)
25 CONSTANTS
402
25.3 Real Constant (E)
-126
128
 device < 2
, 0, 2
-1022
1024
 device < 2
, 0, 2
*1
is used for the input data operation, an error is returned. Note that when "-0" is generated during the

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents