Mitsubishi Electric Melsec Q Series Programming Manual page 230

Motion controller (sv13/sv22)
Hide thumbs Also See for Melsec Q Series:
Table of Contents

Advertisement

5 OPERATION CONTROL PROGRAMS
(5) Internal operation data types
For internal operations, when (S1) and (S2) differ in data type, the data of the
smaller type is converted into that of the greater type before operation is
performed. If the operation result is over the range of processed number in each
type, an overflow will occur. However, an operation error will not occur. By
converting the set data with the type converting instruction, an overflow may be
able to be prevented.
(S1) Operator (S2)
The data type combinations, and internal operation data types for binary
operations are shown below.
(S1) data type
16-bit integer type
16-bit integer type
32-bit integer type
64-bit floating-point type
16-bit integer type
32-bit integer type
32-bit integer type
64-bit floating-point type
16-bit integer type
64-bit floating-point
32-bit integer type
type
64-bit floating-point type
(a) Program example
1) Program which substitutes the result of multiplying #0 by #10 to W0L
W0L = #0 #10
W1
W0
W0L
-18698
Since both of set data are the 16-bit integer type, the multiplier result is
processed by the 16-bit integer type.
An overflow occurs, and the least 16-bit of the multiplier result is the
operation result.
The operators are "+, -, *, /, %"
(S2) data type
(Note-1)
(Note-1)
(Note-1)
(HB6F6)
(H7FB6F6)
5 - 7
Internal operation data type
16-bit integer type
32-bit integer type
(Note-1)
64-bit floating-point type
32-bit integer type
(Note-1)
64-bit floating-point type
(Note-1)
64-bit floating-point type
(Note-1): Except the operator "%"
#0
12345
(
)
H3039
*
#10
678
(H02A6)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents