Siemens SINUMERIK 840D sl Programming Manual page 786

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

Advertisement

Additional functions
14.5 Function call ISVAR and read machine data array index
Only if all these checks have a positive result will TRUE be returned. If a check has a
negative result or if a syntax error has occurred, it will return FALSE. Axial variables are
accepted as an index for the axis names but not checked.
Extension: Read machine data and setting data array without index.
If there is no index for general and channel-specific machine data, alarm 12400 "channel %
1 block % 2 array % 3 element not present" is no longer output.
At least the axis index must still be programmed for axis-specific machine data. Otherwise
alarm 12400 will be issued.
Example: Function call ISVAR
Program code
DEF INT VAR1
DEF BOOL IS_VAR=FALSE
N10 IS_VAR=ISVAR("VAR1")
DEF REAL VARARRAY[10,10]
DEF BOOL IS_VAR=FALSE
N20 IS_VAR=ISVAR("VARARRAY[,]")
N30 IS_VAR=ISVAR("VARARRAY")
N40 IS_VAR=ISVAR("VARARRAY[8,11]")
N50 IS_VAR=ISVAR("VARARRAY[8,8")
N60 IS_VAR=ISVAR("VARARRAY[,8]")
N70 IS_VAR=ISVAR("VARARRAY[8,]")
DEF BOOL IS_VAR=FALSE
N100 IS_VAR=ISVAR("$MC_GCODE_RESET_VALUES[1]"
DEF BOOL IS_VAR=FALSE
N10 IS_VAR=ISVAR("$P_EP")
N10 IS_VAR=ISVAR("$P_EP[X]")
786
Comments
; Transfer parameter is a general variable
; IS_VAR is in this case, TRUE
; Various syntax versions
; IS_VAR is TRUE with a
two-dimensional array
; IS_VAR is TRUE, variable exists
; IS_VAR is FALSE, array index is not
permitted
; IS_VAR is FALSE, syntax error for
missing "]"
; IS_VAR is TRUE, array index is permitted
; IS_VAR is TRUE
; Transfer parameter is a machine data
; IS_VAR is TRUE
; Transfer parameter is a system variable
; IS_VAR is in this case TRUE
; IS_VAR is in this case TRUE
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Job Planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents