Variable Minimum, Maximum And Range (Minval, Maxval And Bound) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Flexible NC programming

1.6 Variable minimum, maximum and range (MINVAL, MAXVAL and BOUND)

Synchronized actions
The response described for the comparison commands also applies to synchronized actions.
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)
1.6
Variable minimum, maximum and range (MINVAL, MAXVAL and
BOUND)
Function
The
smaller value (in the case of
delivered as a result.
The
defined range of values.
Syntax
<smaller value>=MINVAL(<variable1>,<variable2>)
<larger value>=MAXVAL(<variable1>,<variable2>)
<return value>=<BOUND>(<minimum>,<maximum>,<test variable>)
74
and
commands can be used to compare the values of two variables. The
MINVAL
MAXVAL
command can be used to test whether the value of a test variable falls within a
BOUND
) or the larger value (in the case of
MINVAL
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
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
;
MAXVAL
) respectively is
Job Planning

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents