EasyManuals Logo

Siemens MCP 398C Programming Manual

Siemens MCP 398C
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 #425 background imageLoading...
Page #425 background image
Note
MINVAL, MAXVAL, and BOUND can also be programmed in synchronized actions.
Note
Behavior if values are equal
If the values are equal, MINVAL/MAXVAL are set to this equal value. In the case of BOUND the
value of the variable to be tested is returned again.
Example
Program code Comment
DEF REAL rVar1=10.5, rVar2=33.7, rVar3, rVar4, rVar5, rValMin, rValMax, rRetVar
rValMin=MINVAL(rVar1,rVar2) ; rValMin is set to value 10.5.
rValMax=MAXVAL(rVar1,rVar2) ; rValMax is set to value 33.7.
rVar3=19.7
rRetVar=BOUND(rVar1,rVar2,rVar3) ; rVar3 is within the limits, rRetVar is set to 19.7.
rVar3=1.8
rRetVar=BOUND(rVar1,rVar2,rVar3) ; rVar3 is below the minimum limit, rRetVar is set to
10.5.
rVar3=45.2
rRetVar=BOUND(rVar1,rVar2,rVar3) ; rVar3 is above the maximum limit, rRetVar is set to
33.7.
3.1.1.15 Check availability of a variable (ISVAR)
The predefined ISVAR function can be used to check whether a system/user variable (e.g.
machine data, setting data, system variable, general variables such as GUD) is known in the
NC.
Variable
The variables to be queried have the following structure:
Dimensionless variable: <Variable>
One-dimensional variable without array index: <Variable>[ ]
One-dimensional variable with array index n: <Variable>[<n>]
Two-dimensional variable without array index: <Variable>[ , ]
Two-dimensional variable with array indices n
and m:
<Variable>[<n>,<m>]
Syntax
<Result>=ISVAR(<Variable>[<n>,<m>])
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 425

Table of Contents

Other manuals for Siemens MCP 398C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens MCP 398C and is the answer not in the manual?

Siemens MCP 398C Specifications

General IconGeneral
BrandSiemens
ModelMCP 398C
CategoryControl Systems
LanguageEnglish

Related product manuals