Siemens SINUMERIK 840D sl Programming Manual page 75

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

Advertisement

Meaning
MINVAL
<smaller value>
MAXVAL
<larger value>
BOUND
<minimum>
<maximum>
<return value>
Note
MINVAL
Note
Behavior if values are equal
If the values are equal
value of the variable to be tested is returned again.
Example
Program code
DEF REAL rVar1=10.5, rVar2=33.7, rVar3, rVar4, rVar5, rValMin, rValMax, rRetVar
rValMin=MINVAL(rVar1,rVar2)
rValMax=MAXVAL(rVar1,rVar2)
rVar3=19.7
rRetVar=BOUND(rVar1,rVar2,rVar3)
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
1.6 Variable minimum, maximum and range (MINVAL, MAXVAL and BOUND)
:
Obtains the smaller value of two variables (
<variable2>
:
Result variable for the
Set to the smaller variable value.
:
Obtains the larger value of two variables (
<variable2>
:
Result variable for the
Set to the larger variable value.
:
Tests whether a variable (
of values.
:
Variable which defines the minimum value of the range of values.
:
Variable which defines the maximum value of the range of values.
:
Result variable for the
If the value of the test variable is within the defined range of
values, the result variable is set to the value of the test variable.
If the value of the test variable is greater than the maximum value,
the result variable is set to the maximum value of the definition
range.
If the value of the test variable is less than the minimum value, the
result variable is set to the minimum value of the definition range.
,
, and
can also be programmed in synchronized actions.
MAXVAL
BOUND
MINVAL/MAXVAL
)
MINVAL
)
MAXVAL
<test variable
BOUND
are set to this equal value. In the case of
Comment
; rValMin is set to value 10.5.
; rValMax is set to value 33.7.
; rVar3 is within the limits, rRetVar is set to 19.7.
Flexible NC programming
<variable1>
command
<variable1>
command
) is within a defined range
command
,
,
the
BOUND
75

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents