Flexible NC programming
1.24 Roundup (ROUNDUP)
1.24
Roundup (ROUNDUP)
1.24
Function
Input values, type REAL (fractions with decimal point) can be rounded up to the next higher
integer number using the ROUNDUP" function.
Syntax
ROUNDUP(<value>)
Significance
ROUNDUP:
<value>:
Note
Input value, type INTEGER (an integer number) are returned unchanged.
Examples
Example 1: Various input values and their rounding up results
Example
ROUNDUP(3.1)
ROUNDUP(3.6)
ROUNDUP(-3.1)
ROUNDUP(-3.6)
ROUNDUP(3.0)
ROUNDUP(3)
Example 2: ROUNDUP in the NC program
Program code
N10 X=ROUNDUP(3.5) Y=ROUNDUP(R2+2)
N15 R2=ROUNDUP($AA_IM[Y])
N20 WHEN X=100 DO Y=ROUNDUP($AA_IM[X])
...
164
Command to roundup an input value
Input value, type REAL
Rounding up result
4.0
4.0
-3.0
-3.0
3.0
3.0
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Job Planning