Siemens SINUMERIK 828D Programming Manual page 679

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

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]")
Example: Read machine data array with and without index.
The first element will be read for
R1=$MC_EXTERN_GCODE_RESET_VALUES
as previous, this corresponds to
R1=$MC_EXTERN_GCODE_RESET_VALUES[0]
or the first element will be read
R1=$MA_POSTCTRL_GAIN[X1]
The corresponds to as before
R1=$MA_POSTCTRL_GAIN[0, X1]
The first element in synchronized actions is also read for
WHEN TRUE DO $R1 = $MC_EXTERN_GCODE_RESET_VALUES
The corresponds to as before
WHEN TRUE DO $R1 = $MC_EXTERN_GCODE_RESET_VALUES[0]
and would previously not be read with alarm 12400.
The alarm 12400 will still be issued for
R1=$MA_POSTCTRL_GAIN
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
14.6 Function call ISVAR and read machine data array index
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
Additional functions
679

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents