EasyManuals Logo

Siemens SINUMERIK ONE MCP 2400.4c Programming Manual

Siemens SINUMERIK ONE MCP 2400.4c
1334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #446 background imageLoading...
Page #446 background image
Program code Comments
R11=TRUNC(R1*1000) R12=TRUNC(R2*1000)
R13=TRUNC(R3*1000)
; Accuracy correction
IF ABS(R12-R11) > R13 GOTOF ERROR ; Jump is no longer executed
M30 ; End of program
ERROR: SETAL(66000)
Example 2: Calculate and evaluate the quotient of both operands
Program code Comments
R1=61.01 R2=61.02 R3=0.01 ;Assignment of initial values
IF ABS((R2-R1)/R3)-1) > 10EX-5 GOTOF ERROR ; Jump is not executed
M30 ; End of program
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: Command to roundup an input value
<value>: Input value, type REAL
Note
Input value, type INTEGER (an integer number) is returned unchanged.
Examples
Example 1: Various input values and their rounding up results
Example Rounding up result
ROUNDUP(3.1) 4.0
ROUNDUP(3.6) 4.0
ROUNDUP(-3.1) -3.0
ROUNDUP(-3.6) -3.0
ROUNDUP(3.0) 3.0
ROUNDUP(3) 3.0
Work preparation
3.1 Flexible NC programming
NC programming
446 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0

Table of Contents

Other manuals for Siemens SINUMERIK ONE MCP 2400.4c

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK ONE MCP 2400.4c and is the answer not in the manual?

Siemens SINUMERIK ONE MCP 2400.4c Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK ONE MCP 2400.4c
CategoryControl Systems
LanguageEnglish

Related product manuals