7 / 16 · Machine programming

Stopping, pausing and restarting

Release the Stop lock deliberately and understand why Halt can be interrupted.

Production pause or command lock?

A feeder is moving toward the next index. The process asks for a pause because the downstream station is occupied. Another situation asks the application to stop and reject further travel until an operator deliberately releases the stop condition. Those requirements are different.

MC_Halt decelerates an axis through an ordinary motion operation that can be overwritten by a permitted later command. MC_Stop decelerates and holds the axis in Stopping under its locking lifecycle. A new move should not bypass that lock. Neither block is a certified emergency-stop function.

Done can coexist with a lock

After MC_Stop reaches zero velocity, Done can indicate the stop's deceleration has finished while Execute remains TRUE and the axis remains held. The exact Busy and Active behavior depends on the library. Beckhoff documents Done coexisting with Busy and Active while Stop holds the lock. Release Execute and continue calling the instance until its documented release conditions finish.

TryPLC retains the axis lock while Stop Execute is high, but its Busy output clears at zero velocity. This is a known teaching-runtime difference. Use the displayed axis state and the release sequence here; use the target vendor's full output contract when writing production code.

OperationDuring brakingAt zero velocityLater move
MC_HaltCan be overwritten under allowed rulesOrdinary completionCan proceed if permitted
MC_Stop with Execute heldHolds stopping ownershipRemains lockedRefused until released
Safety stop functionDetermined by assessed safety designDetermined by safety designRestart under validated safety conditions

Removing drive enable is not a substitute for selecting the appropriate stop behavior. A vertical load may fall when torque disappears. Mechanical brakes, drive safety functions and isolation requirements need their own engineering and validation.

Restart in explicit steps

Record the reason for stopping. Finish the commanded deceleration. Clear or release the operational stop request only when the application's restart policy permits it. Call Stop with Execute FALSE and wait for readiness. Then accept a separate travel request.

Do not reuse a still-high move request without considering its edge history. An operator holding a start button while the machine is locked should not accidentally create delayed movement as the lock disappears. The arbiter should discard or explicitly revalidate pending requests.

Bench investigation

Start travel to 300 mm at 100 mm/s. Raise Halt Execute while moving. While braking, release Move Execute for one scan, change the target and raise Move Execute again. A permitted replacement can interrupt the Halt; observe its CommandAborted status.

Reset and repeat with Stop Execute. A replacement move is refused while the lock remains. After the carriage reaches zero velocity, leave Stop Execute high and try again. Zero speed alone does not make the axis available. Release Stop, advance scans, lower Move Execute for a scan and then retry it.

Lowering a slider is not a valid real-machine stopping strategy. The bench exposes parameters for learning; a machine needs bounded, tested dynamics and a defined response to communication loss or unavailable power.

A sequence that fails intermittently

A programmer enters Pause when the downstream station is occupied and calls Halt there. Another routine issues a new automatic move whenever a product sensor is active. That second routine can overwrite the Halt, so the pause sometimes appears ignored. Fix command ownership and request arbitration before replacing blocks at random.

Conversely, a machine that stays stuck after a successful Stop may simply keep Execute TRUE. In TryPLC, MC_Reset does not release the Stop lock. Beckhoff documents that MC_Reset can cancel the axis lock, but resetting the axis does not clear the application's Stop request. Follow the installed library's release procedure.

Exercises

Write a timing trace for request, deceleration, Done, release and next-move acceptance. Include one attempt made while Stop is held. Decide whether it should be discarded, queued or reported to the operator. Then define separate handling for a production pause and a safety-system stop without treating their signals as interchangeable.

References

Beckhoff MC_Stop, Beckhoff general rules and CODESYS MC_Stop document the release lifecycle and vendor differences.

Check your reasoning

MC_Stop.Done is TRUE, Execute is still TRUE. Can you assume it is unlocked?

  • No
  • Yes
  • Only above 100 mm/s
Worked answer

No. Release Execute and wait for the runtime’s documented unlock/readiness conditions.

A new move interrupts MC_Halt during braking. The Halt normally reports:

  • Successful full Halt completion
  • A safety certification
  • CommandAborted
Worked answer

CommandAborted. An overwritten command was interrupted. This is different from Done.