Siemens Sinumerik 840D sl Programming Manual page 70

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

Advertisement

Flexible NC programming
1.5 Precision correction on comparison errors (TRUNC)
Examples
Example 1: Precision considerations
Program code
N40 R1=61.01 R2=61.02 R3=0.01
N41 IF ABS(R2-R1) > R3 GOTOF ERROR
N42 M30
N43 ERROR: SETAL(66000)
R1=61.01 R2=61.02 R3=0.01
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)
70
Comments
;
Assignment of initial values
;
Jump would have been executed up
until now
;
End of program
;
;
Assignment of initial values
;
Accuracy correction
;
Jump is no longer executed
;
End of program
;
Comments
;
Assignment of initial values
;
Jump is not executed
;
End of program
;
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents