Round-Down: Fix - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Round-down: FIX

Format
FIX(S)
Setting data
■Usable data
: Usable
Setting
Usable Data
data
Bit
device
(S)
■Description, data type of result
Setting data
(S)
Processing details
• The largest integer not greater than the data specified with (S) is found.
• If the (S) value is positive, the absolute value will be smaller, and if it is negative, the absolute value will be greater.
• If (S) is an integer type, its value is returned unchanged, with no conversion processing performed.
Operation error
An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
Program example
■Program which finds the rounded-down fractional portion value of D0F and substitutes the
result to #0F
#0F = FIX(D0F)
#3
#2
#0F
■Program which finds the rounded-down fractional portion value of D4F and substitutes the
result to #0F (when D4F is a negative number)
#0F = FIX(D4F)
#3
#2
#0F
4 OPERATION CONTROL PROGRAMS
156
4.7 Standard Functions
Number of basic steps
4
Word device
16-bit
32-bit
64-bit
integer
integer
floating
type
type (L)
point
type (F)
Description
Data whose fractional portion will be rounded down
#1
#0
33.0
#1
#0
-34.0
Usable steps
F/FS
Constant
16-bit
32-bit
64-bit
integer
integer
floating
type
type
point
(K/H)
(K/H, L)
type (K)
D3
D2
D0F
33.54
D7
D6
D4F
-33.54
G
Calculation
Bit
expression
conditional
expression
Data type of result
Data type of (S)
D1
D0
D5
D4
Comparison
conditional
expression

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents