Académique Documents
Professionnel Documents
Culture Documents
SIMOTION
Example for Beginners
© SIEMENS AG 2009
Automation and Drives
Task
SIMOTION - Basic
Information
Extractor
Program - electric travel
Product feed
Design - eject pneumatically
Package (empty)
Package (full)
Program
Implementation
Palletizer
Carton erector Conveyor belt
Sensor
Program
Design PROFIBUS DP
Carton erector*
Program Feed*
Implementation
ET 200 * Transport
1 FK7
SIMOTION - Basic
Information Run
Call Motion
Background Task Background Task 1 Tasks (se-
Program quential
tasks)
Design
Motion Tasks Motion Task 1 Motion Task 2 Motion Task 20
Program
Implementation Monitor the
Synchronous Tasks IPO - sync Task 1 IPO - sync Task 2
2 emergency
off criteria
Run Stop 3
Shut-down Task
To simplify the understanding, the comparison on a sample task follows: ”Pos “ should move to
Task “Target”; the “Finished“ variable is set to TRUE when the position is reached.
System variables
Task
Technology objects Variable is assigned to a TO (e.g. actual position of an axis)
SIMOTION - Basic
SIMOTION device
Information Variable is assigned to the SIMOTION device
(e.g. system clock)
Program
Design
Global user variables Variable indicates an input/output area
Program I/O variables (e.g. Startpos -> P10.1)
Implementation Variable can be accessed from anywhere on the device
Device global variables
Local user variables Variable can only be used within the declaring program
Program variables
Variable can only be used within the declaring function (FC)
FC variables
Motion Task 2
Task
Start-up
SIMOTION - Basic
Information Motion Task 3
Program Background
Design
Program
Implementation
User Interrupt Start program pEject
Program
Implementation
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Program
Design
Program
Implementation
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Motor with DRIVE-CLiQÆ no further details for the motor type required
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Task
Telegram type 105
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Program
Implementation
SIMOTION - Basic
Information
Program
Design
Program
Implementation
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Sinamics-integrated
object properties
Task
SIMOTION - Basic
Information Activate
Program
Design Select
standard telegram 1
Program
Implementation
Save and
compile
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Mouse click on
interconnection icon:
Æ
Control unit
other interconnections
r722
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Program
Design
Program
Implementation
Program
Design
Virtual axis
Create a real
Task “Conveyorbelt“ slave axis
SIMOTION - Basic
Information Following axis
Program
Design
Program
Implementation Rotary axis
Modulo
Cycle length (product length)
360°
Program
Design
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Add the I/O variables to the Symbol Browser
“I/O“ symbol in the project tree
Definition of the I/O symbols
i_boProtDoor Protective door contact
i_boStartBelt Start conveyor belt
i_boEject Sensor detects bad part
Note: The input in the Symbol Browser is made offline.
Program
Implementation
Function
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation When variables from the “def_init“ source are used in another program, they
must be connected to this program.
Establish connection with the source (unit) ”def_init“, Connections tab
MCC: in the Start node (button)
LAD/FBD: program button
Program
Design
Program
Implementation
bTaskState : Status of
Task MotionTask_1 or
MotionTask_2
SIMOTION - Basic bRetStart : Return value of
Information the “_startTaskID“ function
Program boResult : Result bit of the
Design FBD networks
bResAnd : Result of the
Program Label in NW9 Taskstatus evaluation
Implementation
boGo: Task start bit (TRUE
if MotionTask_1 or
MotionTask_2 must be
restarted)
sTaskSel : Structure that
Network 2: Query protective door contact
can contain TaskIDs (e.g.
No new tasks will be started if the protective MotionTask_1 or
door is open MotionTask_2)
Network 6:
By performing a bitwise logical operation with 16#0022 (corresponds to 2#0000
0000 xx1x xx1x) on the return value. Also refer to “Task States“ ST-documentation.
Program
Implementation
Jump label Network 8:
(label is
created in If the return value matches
NW9) 16#0000, boGo becomes FALSE.
This bypasses restarting the task.
Jump label is “end“ (network 9)
Network 9:
Task
This network becomes active as
SIMOTION - Basic soon as a task needs to be
Information restarted.
This system function is called
Program “_restartTaskID“. The result of the
Design function call is stored in
“bRetStart“.
Program
Network 10:
Implementation
Network 10 is the “end“ jump label
when no task needs to be started.
“Jump label on/off“
Program
Implementation
Homing
Program
Design
Program
Implementation
Task
SIMOTION - Basic
Open the “Homing“ program (SCOUT must be online)
Information
and start monitoring
Program Switch SIMOTION D435 to RUN
Design Both axes perform homing movements
Program
Implementation
Program
Design
Program
Implementation
Task
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Add “Eject“ MCC chart
Synchronize the cam
This motion task is started with
a user interrupt
The cam is processed
acyclically
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
SIMOTION - Basic
Information Recording object variables such as
actual position and actual velocity
Program of an axis using “Trace“
Design
Program
Implementation
Device-global variables
Unit variables
PROFIBUS DP
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation
Task
SIMOTION - Basic
Information
Program
Design
Program
Implementation