PLCopen motion diagram
The axis state machine and the wiring behind it, with every term explained.
Axis state machine
Disabled
The drive is not enabled. No torque is applied, so the axis can drift if gravity or the process pushes on it. Every motion command is rejected here.
In a real machine: A packaging line at the start of a shift: the servo amplifiers have mains power, but MC_Power.Enable is still FALSE.
Standstill
Powered, holding position and waiting for a command. This is the home base of the diagram; most moves start and end here.
In a real machine: A pick-and-place gripper parked over the infeed, holding its position under servo control.
Homing
MC_Home is running a reference search. Until it finishes, absolute positions mean nothing on an incremental encoder.
In a real machine: A gantry slowly moves toward its home switch, then sets position 0 mm at the switch edge.
Discrete Motion
A move with an end point is running: absolute, relative, additive or superimposed. When it reaches the target, the axis returns to Standstill on its own.
In a real machine: A feeder pushes a carton exactly 350 mm, then stops and waits.
Continuous Motion
A move without an end point: MC_MoveVelocity or a held jog. The axis keeps running until another command takes over.
In a real machine: A conveyor belt running at 0.8 m/s until the line stops.
Synchronized Motion
The axis follows a master through gearing (MC_GearIn) or a cam table (MC_CamIn). Its position is a function of another axis, not of time.
In a real machine: A rotary knife that must meet the web at the same speed on every cut.
Stopping
MC_Stop is in control. The axis ramps to zero and stays locked in Stopping while Execute is TRUE. Other moves are rejected until Stop is released.
In a real machine: An operator opens a guard door; the PLC calls MC_Stop and holds it until the door is closed again.
ErrorStop
Something went wrong: following error, drive fault, limit switch, lost communication. The axis stops and refuses commands until MC_Reset clears the error.
In a real machine: A jammed product makes the following error exceed its window; the drive trips and the axis lands in ErrorStop.
Transitions
- Disabled → Standstill: MC_Power. Enable = TRUE and the drive reports ready.
- Standstill → Disabled: MC_Power. Enable = FALSE removes torque.
- Standstill → Homing: MC_Home. A rising Execute starts the reference search.
- Homing → Standstill: MC_Home. Done = TRUE when the reference is set.
- Standstill → DiscreteMotion: MC_MoveAbsolute / MC_MoveRelative. A rising Execute starts a move with an end point.
- DiscreteMotion → Standstill: Done. Target reached at zero velocity.
- Standstill → ContinuousMotion: MC_MoveVelocity / MC_Jog. Runs until another block takes over.
- ContinuousMotion → DiscreteMotion: MC_MoveAbsolute. A new move aborts the velocity command.
- Standstill → SynchronizedMotion: MC_GearIn / MC_CamIn. Diagram only: not run by the TryPLC simulator.
- any → Stopping: MC_Stop. From any powered motion state. Stays here while Execute is TRUE.
- Stopping → Standstill: MC_Stop. Execute = FALSE after Done.
- any → ErrorStop: Axis error. Any fault, in any state.
- ErrorStop → Standstill: MC_Reset. Clears the error; the drive must still be enabled.
Axis wiring
PLC / motion controller
Runs your PLCopen blocks every cycle. It computes the setpoint (where the axis should be right now) and sends it to the drive. A Beckhoff CX or Siemens S7-1500T is typical.
EtherCAT / PROFINET IRT
A deterministic fieldbus. Every cycle (often 1 to 4 ms) it carries the setpoint out and the actual position back. Jitter here turns straight into rough motion.
Servo drive
Closes the current, velocity and often position loops. It turns a setpoint into motor current. Drive faults, such as overcurrent or overtemperature, push the PLC axis into ErrorStop.
STO safety input
Safe Torque Off cuts the energy path to the motor through a certified safety circuit. It is wired from a safety relay or safety PLC, never from a normal MC_Power output.
Servo motor + brake
Produces torque. A holding brake keeps vertical axes from falling when the drive is disabled; the drive releases it after torque is present.
Encoder feedback
Reports motor position back to the drive. Incremental encoders need homing after power-up; absolute encoders remember position.
Ball screw + carriage
Converts rotation into travel. With a 10 mm pitch screw, one motor turn moves the carriage 10 mm. This ratio is what your axis scaling must match.
Home + limit switches
The home switch gives MC_Home a reference. Hardware limits stop the axis before it hits the end stop; hitting one sends the axis to ErrorStop.
Terms
- AXIS_REF
- The handle that ties a function block to one axis. Every MC block takes it as the Axis input.
- Execute
- Edge-triggered start. A command only begins on the FALSE to TRUE transition; holding it TRUE does not restart the move.
- Enable
- Level-triggered input used by MC_Power and read blocks. The block works as long as Enable stays TRUE.
- Done
- The command finished what it was asked to do. For a move, the axis is at its target and stopped.
- Busy
- The block has accepted the command and has not finished. Busy can be TRUE while the axis is not moving yet.
- Active
- This block is the one currently controlling the axis. With buffered moves, Busy and Active can differ.
- CommandAborted
- Another block took over the axis before this one finished. It is not an error, but your sequence should notice it.
- Error / ErrorID
- The block could not run the command. ErrorID is vendor-specific, so read your library documentation for its meaning.
- BufferMode
- How a new move joins the current one: Aborting (replace now), Buffered (wait), or Blending (merge at a chosen velocity).
- Setpoint
- Where the controller wants the axis to be at this instant, calculated from the profile.
- Actual position
- Where the encoder says the axis is. It lags the setpoint slightly in normal motion.
- Following error
- Setpoint minus actual position. A small, steady value is normal; a growing one means the axis is overloaded or blocked.
- Acceleration / Deceleration
- How fast velocity is allowed to change, in units per second squared. Too high and the motor saturates.
- Jerk
- How fast acceleration changes. Limiting it rounds the corners of the profile and reduces vibration.
- Homing
- Establishing the link between encoder counts and machine coordinates, usually with a home switch or index pulse.
- STO
- Safe Torque Off. A safety function inside the drive that removes torque. It belongs to the safety circuit, not to PLCopen logic.
- Master / Slave
- In gearing and cams, the slave axis follows the position of the master axis rather than time.
- Override
- A live scale factor (MC_SetOverride) applied to velocity, often wired to an operator potentiometer.