Siemens SINUMERIK 840DE sl Commissioning Manual page 1142

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

Advertisement

Programming commands
6.3 Functions
6.3.16
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
156
(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, 12/2017, 6FC5397-1DP40-6BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents