Learning units
3.4 4. Step: Linking blocks to the user program
First Steps in Commissioning CPU 31xC: Positioning with digital output
16 Getting Started, 08/2011, A5E00105533-03
8. When the CPU is in STOP, select "PLC > Download to module ..." to download the
configuration.
The data are now downloaded from the PG to the CPU.
9. Close HW Config with "Station > Close".
You are returned to SIMATIC Manager.
3.4 4. Step: Linking blocks to the user program
Procedure
1. Open the project "ZDt26_03_TF_____31xC_Pos" in the catalog ...
\Siemens\STEP7\Examples via "File > Open ... > Sample projects" in SIMATIC Manager.
A window, divided into two sections, opens showing the title of the project.
2. Double-click on the S7 program "Digital 1 First Steps".
The "Sources", "Blocks" and "Symbols" folders are displayed in the right-hand window.
3. Double-click on the "Blocks" container.
All blocks of the S7 program are displayed.
4. Copy all blocks from this folder to your project under "SIMATIC 300 Station > CPU 3xx >
S7 Program > Blocks".
Block Name (in the toolbar) Description
OB 1 CYCLE_EXC Cyclic program
OB 100* COMPLETE RESTART Complete restart: Reset the control signals
FC 1 GETST_A Getting Started DIGITAL
SFB 46 DIGITAL System function block POS DIGITAL
DB 6 DI_DIGITAL Instance DB for the SFB DIGITAL
VAT_GETST_A VAT_GETST_A Variable table
* Adjust the values for the switchover and shutdown difference in the block COMPLETE
RESTART (OB 100).
5. In SIMATIC Manager, select "SIMATIC 300 Station > CPU 3xx > S7 Program > Blocks".
All blocks of the S7 program are displayed.
6. Download all of the S7 blocks it contains via "PLC > Download to your CPU" (CPU in
STOP mode).
The program and configuration are downloaded from the PG to the CPU.