EasyManua.ls Logo

Mitsubishi Electric Q172CPU - Page 288

Mitsubishi Electric Q172CPU
634 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 - 27
7 MOTION PROGRAMS FOR POSITIONING CONTROL
(c) How to handle variable as 64-bit double precision real number
By handling a variable as a 64-bit double precision real number, arithmetic
operation spanning multiple blocks can be performed without reduction in
precision.
Describe a capital letter ":F" after a #n variable.
#nF : Four variables of #n to #n+3 are used and handled as a 64-bit double
precision real number.
63
31
Bit 0
#n+3
#n
#n+1
#n+2
The data format of a 64-bit double precision real number conforms to the
binary floating-point type double precision (64 bits) of IEEE Standard.
63
51
31 Bit 0
Bit 63: Sign part
Bits 52 to 62: Exponent part
Bits 0 to 51: Significant digit part
[Example]
#@10:F=#@20:L/#@22:L;
The division result of 32-bit integers, [#@21, #@20] and [#@23,
#@22], is stored to a 64-bit real number, [#@13, #@12, #@11,
#@10].
#@10:F=#@20:L;
A 32-bit integer, [#@21, #@20], is expanded in sign to a 64-bit
real number, [#@13, #@12, #@11, #@10].
#@40:L=#@30:F;
A 64-bit integer, [#@33, #@32, #@31, #@30], is expanded in
sign to a 32-bit integer, [#@41, #@40].
<Restrictions>
64-bit double precision real numbers cannot be used in the function INT
and FTL.
(5) Assignment of variable
When a decimal point is added for assignment of a value to a variable, the value
is assigned as shown below.
#@10:L=1.;
¨10000 enters in #@10, #@11.
#@10:F=1.;
¨10000 (64-bit double precision real number) enters in #@10,
#@11, #@12, #@13.
"1." is converted into a value of four decimal places.
(Converted to a value of four decimal places regardless of the unit (mm,
inch, degree).)

Table of Contents

Other manuals for Mitsubishi Electric Q172CPU

Related product manuals