Program Organization Using The The Programming Tool - Siemens SINUMERIK 828D Function Manual

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

Advertisement

14.3.1.3

Program organization using the the Programming Tool

The Programming Tool PLC828 organizes your program in the Program Editor in individual tabs per POU. As
standard, when creating a new project, the main program MAIN and a subprogram SBR_0 are created. MAIN is
always in the first tab, all subprograms and interrupt programs that you have generated then follow.
MAIN
MAIN cannot be renamed and is permanently assigned to the "Manufacturer" data class.
Subprograms
Subprograms are useful if you wish to execute a function a multiple number of times. In order that you do not
have to include the logic in the main program at each location where you wish to execute the function, you write
the logic once in a subprogram and you then call this subprogram as often as required while executing the main
program. Meaningful names can be assigned to subprograms; these are also assigned to the "Manufacturer"
data class.
Advantages:
The functional sequence in the main program is very transparent.
Subprograms are easy to port. You can easily demarcate a function and without many resources, call it from
other programs with other parameter values.
Note
The use of global variables restrict the portability of subprograms as the assignment of
addresses in the variable memory of a program can always be in conflict with the
assignment of addresses in another program. Subprograms, which access local variables
for all address assignments, are on the other hand extremely easy to port, because there
is no danger of conflicting addresses.
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
P4: PLC for SINUMERIK 828D
14.3 Programming
1097

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents