Programming
5.2 Controlling the axis with the STEP 7 user program using a sample project
Step
Activity
2
Create the technology DBs listed below by clicking "Create":
Axis_1
•
Axis_2 (if this exists)
•
Trace
•
MCDevice
•
3
Close the "Technology Objects Management" by selecting
the Technological objects > Exit menu command.
5.2
Controlling the axis with the STEP 7 user program using a sample
project
The sample project "PROJECT-CPU317T" is used to describe the procedure. The sample
project is included in the S7 Technology installation package.
Procedure
Step
Activity
1
In SIMATIC Manager, open the sample project "PROJECT-
CPU317T". Copy the blocks listed below to your project:
OB1
•
FB 100 (SimplePositioning)
•
FB401 (MC_Power)
•
FB402 (MC_Power)
•
FB405 (MC_Halt)
•
FB410 (MC_MoveAbsolute)
•
DB 100 (IDB_SimplePositioning)
•
AxisData (variable table for axis control)
•
Confirm the message "The object 'OB1' already exists. Do
you want to overwrite it?" with "Yes".
Also copy the inputs (I), outputs (O) and flags (F) from the
example symbol table to the project, so that the symbols are
displayed completely in the variable table.
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 the FB 100 if you want to edit the program
example.
66
Result
The system generates the technology data
blocks DB 1 to DB 3, or DB 4.
Result
The sample program is copied to the project.
The LAD/STL/FBD editor opens.
CPU 317T-3PN/DP: Controlling a SINAMICS S120
Getting Started, 10/2013, A5E00480391-06