Siemens SINUMERIK 840D sl Commissioning Manual page 718

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Programming commands
6.3 Functions
6.3.10
Evaluate (EVAL)
Description
The EVAL function evaluates a transferred expression and then executes it. With this
function, expressions can be programmed during runtime. This can be useful, for example,
for indexed access operations to variables.
Programming
Syntax:
Description:
Parameters:
Example
VAR1=(S)
VAR2=(S)
VAR3=(S)
VAR4=(S)
CHANGE()
REG[7] = EVAL("VAR"<<REG[5])
IF REG[5] == 1
ELSE
ENDIF
END_CHANGE
100
(exp)
EVAL
Evaluates an expression
exp
REG[7] = VAR1
IF REG[5] == 2
REG[7] = VAR2
ELSE
IF REG[5] == 3
REG[7] = VAR3
ELSE
IF REG[5] == 4
REG[7] = VAR4
ENDIF
ENDIF
ENDIF
Logic expression
; The expression in parentheses produces VAR3 if
the value of REG[5] is equal to 3. The value of
VAR3 is, therefore, assigned to REG[7].
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 03/2013, 6FC5397-1DP40-3BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents