Creating An S7 User Program - Siemens SIMATIC 317TF-2 DP Getting Started

Automation system s7-300
Table of Contents

Advertisement

Programming

5.2 Creating an S7 user program

Step
Activity
3
Close the "Technological Objects Management" via the
Technological objects > Exit menu command.
4
Select Station > Save and compile menu command in HW
Config.
5
Download the hardware configuration to the TF-CPU using
the menu command PLC > Download to Module.
6
In the SIMATIC Manager select the block folder of the
station and select the menu command PLC > Download.
5.2
Creating an S7 user program
Procedure
Step
Activity
1
In SIMATIC Manager, open the sample project
"\Examples\PROJECT-CPU317TF". Copy the all blocks and
symbols to your project:
Confirm the message "The object "xy" already exists. Do
you want to overwrite it?" with "Yes".
Important: The sample program does not contain DB 1 to DB 4! Create these technology DBs in STEP 7
(see the step "Creating the technology DBs"), in order to maintain consistency between the user program
and the technology objects.
2
Double-click FB 100 if you want to edit the example
program.
3
Select these settings:
View > LAD,
View > Overviews, and
View > Details.
4
Double-click FB 101 if you want to edit the safety program.
Function block FB 100
The axis is enabled and pending errors are acknowledged in this block. Depending on the
selected Safety Function, you will be able to start and stop the axis motions to positions 1
and 2 at standard speed or reduced speed.
Function block FB 101
This block processes the signals of the emergency stop switch, the key switch and the door
contact switch securely with safety blocks. Signals for activation of the safety functions at the
drive will be written to the I/O area. This block also serves to reintegrate the drive after
passivation.
The function block is protected with the password "safety".
70
Result
The configuration data will be saved and
compiled.
The configuration data will be downloaded to
the TF-CPU.
All blocks will be downloaded to the TF-
CPU.
Result
The sample program is copied to the project.
The LAD/STL/FBD editor opens.
You have now opened an extended and
clear view for editing the STEP 7 user
program.
The LAD/STL/FBD editor opens.
CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions
Getting Started, 07/2010, A5E02982990-01

Advertisement

Table of Contents
loading

Table of Contents