Technical data

Basics of Creating Logic Blocks
10.4 General Notes on Entering Statements and Comments
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 253
10.4.5 Entering Block Comments and Network Comments
1. Activate the comments with the menu command View > Display with > Comments (a check
mark is visible in front of the menu command).
2. Position the cursor in the gray field below the block name or below the network name by
clicking with the mouse. The gray comment field appears white and has a border.
3. Enter your comment in the open text box. You are allowed 64 Kbytes per block for block
comments and network comments.
4. Exit the text box by clicking with the mouse outside the text box, by pressing the TAB key, or
using the key combination SHIFT+TAB.
5. If you select the menu command View > Display with > Comments again, you can switch off
the comments again (the check mark disappears).
10.4.6 Working with Network Templates
When programming blocks, if you would like to use networks multiple times, you can store these
networks in a library as network templates, complete with wildcards, if appropriate (for example, for
addresses). The library must be available before you create the network template.
Creating a Network Template
Create a new library in the SIMATIC Manager if necessary. Select the menu command Insert >
Program > S7 Program to insert a program into the library.
1. Open the block that contains the network(s) from which you want to create a network template.
2. In the opened block, replace the title, comment, or addresses with wildcards as required. You
can use the strings %00 to %99 as wildcards. Wildcards for addresses are displayed in red.
This is not a problem here because you will not be saving the block after you create the
network template. You can replace the wildcards later with appropriate addresses when you
insert the network template into a block.
3. Select "Network <No.>" of the network(s) you want to include in the network template.
4. Select the menu command Edit > Create Network Template.
5. Enter a meaningful comment for each wildcard used in the dialog box displayed.
6. Click the "OK" button.
7. Select the source file folder of the S7 program in your network template library in the browser
that appears and enter a name for the network template.
8. Confirm your entry by clicking the "OK" button. The network template is stored in the selected
library.
9. Close the block without saving it.