hit counter script

Roundup (Roundup) - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.1 Flexible NC programming
Program code
R11=TRUNC(R1*1000) R12=TRUNC(R2*1000)
R13=TRUNC(R3*1000)
IF ABS(R12-R11) > R13 GOTOF ERROR
M30
ERROR: SETAL(66000)
Example 2: Calculate and evaluate the quotient of both operands
Program code
R1=61.01 R2=61.02 R3=0.01
IF ABS((R2-R1)/R3)-1) > 10EX-5 GOTOF ERROR
M30
ERROR: SETAL(66000)
3.1.3.5

Roundup (ROUNDUP)

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>)
Meaning
ROUNDUP:
<value>:
Note
Input value, type INTEGER (an integer number) is 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)
446
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
Comments
; Accuracy correction
; Jump is no longer executed
; End of program
Comments
;Assignment of initial values
; Jump is not executed
; End of program
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents

Save PDF