Siemens SINUMERIK 840D sl Commissioning Manual page 92

Commissioning cnc part 2 (hmi)
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Expanding the Operator Interface (BE1)
3 Syntax
//B(PROG1)
SUB(UP1)
...
REG[0] = 5
...
END_SUB
SUB(UP2)
IF VAR1.val=="Otto"
VAR1.val="Hans"
RETURN
ENDIF
VAR1.val="Otto"
END_SUB
//END
Loading a block (LB)
The LB (LoadBlock) function can be used to load blocks containing subprograms
during operation.
LB should be configured in a LOAD method so that the loaded subprograms can
be called at any time.
LB("Block name"[,"File"])
where:
Block name
File
LOAD
LB("PROG1") ;Block "PROG1" is located in the current configuration file
LB("PROG2","C:\TMP\XY.COM")
END_LOAD
Note
Subprograms can also be defined directly in a screen form so that they do not
have to be loaded.
Indirect subprogram call (CALL)
The CALL function can be used to call a loaded subprogram from any point in a
method.
Subprogram nesting is supported, i.e., you can call a subprogram from another
subprogram.
CALL("Identifier")
where:
Identifier
//M(FORM1)
VAR1 = ...
VAR2 = ...
BE1/3-86
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
;Beginning of block
;Subprogram start
;Assign the value 5 to register 0
;End of subprogram
;Start of the subprogram
;Subprogram end
;Block end
Name of block identifier
Path name of configuration file
Default setting: Current configuration file
;and then loaded
;Block "PROG2" is located in configuration file XY.COM in the
;C:\TMP directory and then loaded
Name of subprogram
© Siemens AG, 2005. All rights reserved
08/2005

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 810dSinumerik 840diSinumerik 840d

Table of Contents