EasyManuals Logo
Home>Siemens>Control Unit>SINUMERIK

Siemens SINUMERIK Commissioning Manual

Siemens SINUMERIK
736 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #422 background imageLoading...
Page #422 background image
Programming
2.7 Functions
Expanding the user interface
2-72 Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
2.7.2 Define block (//B)
Description
In the program file, subprograms are identified by the block identifier //B and terminated with
//END. Several subprograms can be defined under each block identifier.
Note
The variables used in the subprogram must be defined in the dialog in which the subprogram
is called.
Programming
A block is structured in the following way:
Syntax: //B(
Block name
)
SUB
(Identifier)
END_SUB
[SUB(
Identifier
)
...
END_SUB]
...
//END
Description: Defines a subprogram
Parameters: Block name Name of block identifier
Identifier Name of subprogram
Example
//B(PROG1) ; Block start
SUB(UP1) ; Start of subprogram
...
REG[0] = 5 ; Assign value 5 to register 0
...
END_SUB ; End of subprogram
SUB(UP2) ; Start of subprogram
IF VAR1.val=="Otto"
VAR1.val="Hans"
RETURN
ENDIF

Table of Contents

Other manuals for Siemens SINUMERIK

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK and is the answer not in the manual?

Siemens SINUMERIK Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK
CategoryControl Unit
LanguageEnglish

Related product manuals