Roundup: Round Up - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Flexible NC programming

1.24 ROUNDUP: Round up

Example
N10 DEF INT ERROR
N20 DEF STRING[16] MY_CHECKSUM
N30 DEF INT MY_VAR[4,4]
N40 MY_VAR=...
N50 ERROR=CHECKSUM (CHECKSUM;"MY_VAR", 0, 2)
...
returns in MY_CHECKSUM the value "A6FC3404E534047C"
1.24
ROUNDUP: Round up
1.24
Function
The ROUNDUP function returns for
• positive input values
• negative input values
If the input value is an integer type value (a whole number), the value is returned unmodified.
Programming
ROUNDUP(Variable Real)
Parameters
ROUNDUP
Variable
Real
ROUNDUP in the NC parts program
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])
Examples
ROUNDUP(3.1) produces 4.0
ROUNDUP(3.6) produces 4.0
ROUNDUP(-3.1) produces -3.0
ROUNDUP(-3.6) produces -3.0
ROUNDUP(3.0) produces 3.0
ROUNDUP(3) produces 3.0
1-70
the next larger integer
the next smaller integer
Rounds up to the next larger integer (observing the
sign).
Input value of the type real
Variables type for fractions containing decimal points
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents