Round-Off : Rnd - Mitsubishi Electric Melsec Q Series Programming Manual

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

Advertisement

5 OPERATION CONTROL PROGRAMS

5.6.11 Round-off : RND

Format
[Usable data]
Setting
16-bit
data
Bit device
integer
type
(S)
[Setting data]
Setting data
[Functions]
[Errors]
[Program examples]
RND(S)
Word device
64-bit
32-bit
floating
integer
point
type (L)
type (F)
(S)
Data whose fractional portion will be rounded off
(1) The rounded-off fractional portion value of the data specified with (S) is found.
(2) If (S) is a negative number, the absolute value of (S) is found and its fractional
portion is rounded off and signed.
(3) If (S) is an integer type, its value is returned unchanged, with no conversion
processing performed.
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
(1) Program which finds the rounded-off fractional portion value of D0F and
substitutes the result to #0F
#0F = RND(D0F)
#3
#2
#0F
(2) Program which finds the rounded-off fractional portion value of D4F and
substitutes the result to #0F (when D4F is a negative number)
#0F = RND(D4F)
#3
#2
#0F
-33.0
Usable Data
Constant
16-bit
32-bit
Coasting
integer
integer type
timer
type (K/H)
(K/H, L)
Description
#1
#0
34.0
#1
#0
5 - 37
F/FS
Number of basic steps
64-bit
Calculation
conditional
floating
expression
expression
point
type (K)
Data type of result
Data type of (S)
D3
D2
D0F
33.54
D7
D6
D0F
-33.44
G
2
Bit
Comparison
conditional
expression
: Usable
D1
D0
D5
D4

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents