Technical data
Creating STL Source Files
13.6 Saving and Compiling STL Source Files and Executing a Consistency Check
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 297
To find the location of an error in a source file, position the cursor on the "Error" tab of the message
window. The faulty element is automatically highlighted in the code section and an error message
is output at the status bar.
13.6.4 Compiling STL Source Files
Requirements
In order to be able to compile the program you created in a source file into blocks, the following
requirements must be fulfilled:
• Only source files which are stored in the "Source Files" folder beneath an S7 program can be
compiled.
• As well as the "Source Files" folder, a "Blocks" folder must also lie beneath the S7 program in
which the blocks created during compilation can be stored. The blocks programmed in the
source file are only created if the source file was compiled without error. If there are a number
of blocks programmed in a source file, only those which contain no errors are created. You can
then open these blocks, edit them, download them to the CPU, and debug them individually.
Procedure in the Editor
1. Open the source file you want to compile. The source file must be in the source file folder of the
S7 program in whose S7 user program the compiled blocks are to be stored.
2. Select the menu command File > Compile.
3. The "Compiler Report" dialog box is displayed showing the number of lines compiled and
syntax errors found.
The blocks specified for the file are only created once the source file has been compiled without
errors. If there are a number of blocks programmed in a source file, only those which contain no
errors are created. Warnings of errors do not prevent blocks being created.
Any syntax errors detected during compilation are shown in the lower part of the working window
and must be corrected before the respective blocks can be created.
Procedure in the SIMATIC Manager
1. Open the appropriate "Source Files" folder by double-clicking on it.
2. Select one or more source files that you want to compile. You cannot start a compilation run for
a closed source file folder to compile all the source files in it.
3. Select the menu command File > Compile to start compilation. The correct compiler is called
for the source file you selected. The successfully compiled blocks are then stored in the block
folder beneath the S7 program.
Any syntax errors detected during compilation are displayed in a dialog box and must be
corrected so that the blocks where the errors were found can be created as well.