Motion Control
Precision in Motion
Control servo drives and steppers with mathematical precision. Master the PLCopen standard instructions for high-performance positioning and velocity control.
Motion Control Technology Objects
Motion Control in TIA Portal is managed through Technology Objects (TO). These objects abstract the hardware (drive, encoder) and provide a standardized interface for your program to interact with the axis.
By using standardized MC (Motion Control) instructions, your code becomes hardware-independent. Whether you use PROFIdrive, Analog, or PTO, the logic for moving the axis remains identical.
Axis Foundation
Activation and Homing
MC_Power — Axis Enable
MC_PowerWhat it does
Enables or disables a motion control axis. It controls the power stage of the drive and manages the software lock for the Technology Object.
When to use it
Must be active before any movement can occur. Used to 'power up' the axis when the safety circuit is healthy and the system is in Auto mode.
Pro Tips
Always monitor the 'Status' output to ensure the axis is truly enabled before triggering a move.
Use the 'StopMode' parameter to define how the axis should decelerate if power is removed.
Do not toggle Enable rapidly; wait for the drive to confirm the ready state to avoid faults.
MC_Home — Axis Referencing
MC_HomeWhat it does
Establishes the relationship between the motor encoder position and the physical machine coordinate system (the 'Zero' point).
When to use it
Essential after power-up for incremental encoders. Required for absolute moves to have a meaningful destination.
Pro Tips
Use 'Passive homing' to calibrate the axis 'on the fly' when it passes a reference switch during normal operation.
For absolute encoders, use 'Mode 7' to permanently store the offset in the PLC memory.
Check the 'Homed' status bit of the Technology Object before allowing automatic Absolute moves.
MC_Halt — Controlled Stop
MC_HaltWhat it does
Aborts the current movement and brings the axis to a standstill using the configured deceleration ramp.
When to use it
Used for normal stops or when a process condition requires the axis to pause without disabling power.
Pro Tips
Unlike MC_Power disable, MC_Halt maintains the axis in a closed-loop 'holding' state at zero speed.
You can override the default deceleration by providing a specific 'Deceleration' value to the instruction.
Use the 'Done' output to trigger the next step in your sequence once the axis has fully stopped.
Dynamic Movement
Positioning and Velocity
MC_MoveAbsolute — Targeted Position
MC_MoveAbsoluteWhat it does
Moves the axis to a specific coordinate relative to the project's zero point.
When to use it
Used for precise positioning in XY tables, pick-and-place robots, or storage retrieval systems.
Pro Tips
The axis must be homed before this instruction can execute successfully.
Use the 'Direction' parameter to specify the path for rotary (modulo) axes (Shortest, Positive, Negative).
You can change the 'Position' or 'Velocity' on the fly while the axis is already moving.
MC_MoveRelative — Distance Travel
MC_MoveRelativeWhat it does
Moves the axis by a specific distance from its current position.
When to use it
Ideal for indexing conveyors, step-by-step feeders, or repeatable incremental gaps.
Pro Tips
Does not require the axis to be homed (referenced) to work, as it only cares about the offset.
Be careful with cumulative errors if using Relative moves for positioning without periodic homing.
Triggering the instruction again while moving will add the new distance to the remaining distance.
MC_MoveVelocity — Constant Speed
MC_MoveVelocityWhat it does
Moves the axis at a constant velocity indefinitely until stopped or overridden.
When to use it
Used for belts, fans, pumps, or any continuous process where the final position doesn't matter.
Pro Tips
Set 'Velocity' to 0 to stop the axis with a ramp, or use MC_Halt for a more explicit stop.
Use the 'InVelocity' output bit to confirm the axis has reached the requested speed.
Monitor torque or current if the axis is used for tension control or winding applications.
Absolute vs Relative Positioning
Choosing the right coordinate logic for your motion
| Feature | Absolute | Relative |
|---|---|---|
| Destination | Fixed Coordinate (e.g. 500mm) | Distance Delta (e.g. +50mm) |
| Reference | Machine Zero Point | Current Position |
| Homing Required | Yes (Mandatory) | No (Optional) |
| Typical Use | Multi-station Table | Indexing Conveyor |
| Programming | Easy for fixed locations | Easy for repeated steps |
| Error Behavior | Non-cumulative | Risk of cumulative offset |
Frequently Asked Questions
What is PROFIdrive and why is it used?
PROFIdrive is the standard profile for drive technology on PROFINET/PROFIBUS. It allows the PLC to communicate with drives from different manufacturers using a standardized telegram, ensuring compatibility and high-speed synchronization.
What is the main difference between Servo and Stepper control in TIA?
Servos usually provide encoder feedback to the PLC (Closed Loop), allowing for high-speed precision and torque monitoring. Steppers are often used in Open Loop (PTO - Pulse Train Output) where the PLC sends pulses but doesn't necessarily 'know' if the motor missed a step.
What is the purpose of a Virtual Axis?
A Virtual Axis exists only in software. It is used to simulate machine behavior or to act as a 'Master' axis for multiple 'Slave' axes to follow (Synchronization), ensuring all real axes move in perfect harmony.
How does synchronization work in S7-1500?
S7-1500 supports basic synchronization via MC_GearIn (fixed ratio) and advanced synchronization via MC_CamIn (electronic cams). These allow one axis to follow the position or velocity of another axis with microsecond precision.