Siemens SINUMERIK Commissioning Manual page 422

Sinumerik 840di sl/840d sl/840dbase software and hmi advanced
Hide thumbs Also See for SINUMERIK:
Table of Contents

Advertisement

Programming
2.7 Functions
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:
Description:
Parameters:
Example
//B(PROG1)
SUB(UP1)
...
REG[0] = 5
...
END_SUB
SUB(UP2)
IF VAR1.val=="Otto"
ENDIF
2-72
Block name
//B(
(Identifier)
SUB
END_SUB
Identifier
[SUB(
...
END_SUB]
...
//END
Defines a subprogram
Block name
Identifier
VAR1.val="Hans"
RETURN
)
)
Name of block identifier
Name of subprogram
;
Block start
;
Start of subprogram
;
Assign value 5 to register 0
;
End of subprogram
;
Start of subprogram
Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
Expanding the user interface

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents