Share this

M-Series Tutorial (Basic Course) | Introduction to Stop Commands

2026-04-06 04:51:33 · · #1

Let's embark on a new chapter in M-series controller programming education, starting with a foundational lesson: an introduction to stop instructions!

01. Preliminary Preparations

Software: Sysctrl Studio (PLC programming software)

Hardware: M-series controller (taking M511S as an example)

Servo (taking HN-Y7FB040A-S as an example)

02. Communication Connection

This tutorial uses the M controller HCM511S-32MT4-D and the servo HN-Y7FB040A-S, and the connection method is shown in the figure below.

03. Sysctrl Studio Project Configuration

Basic settings

Step 1: Add slave station

Double-click to open Sysctrl Studio software and create a new project. Click on [Network Settings] >> [EtherCAT] >> [Add Slave] >> Select the servo slave to add >> [Add]

Step 2: Add servo axes

Open [Motion Control] >> [Axis Settings] >> Right-click in the blank area and select [Add Servo Axis]

Step 3: Connecting Devices

Click on "Associate with device...", select the servo you want to associate, and click "OK".

Step 4: Mechanism Parameter Configuration

[1] Number of pulses per revolution of the motor

Determined by the motor encoder resolution

[2] Work mileage per revolution

For example, if the lead screw pitch is 10mm, then the mechanism lead is 10mm, and "unit" means mm. In motion commands, the unit for position parameters is mm, and the unit for velocity parameters is mm/s.

[3] Gearbox output speed, [4] Gearbox input speed

For example: if the speed ratio of the reducer is 10:1, then the output speed is set to 1 and the input speed is set to 10.

The parameter configuration completion interface is as follows:

MC_Halt (Stop command)

(1) Instruction Description

① Function Description

The control axis decelerates and stops at a set deceleration rate, which is set by the command input variables.

② Pin Description

(2) Instruction Test

① Open the default POU and insert the MC_Power function block.

② Insert the MC_ReadStatus function block to monitor axis status.

③ Insert the MC_MoveVelocity function block

④ Add a network and insert the MC_Halt function block.

After setting up, download the project to the controller.

⑤ Perform MC_Halt function block testing (the following are consecutive steps)

a. Trigger axis monitoring command MC_ReadStatus function block

Result: The axis is in a Disabled state.

b. Enable the MC_Power function block for the trigger axis.

Result: The axis changes to a Standstill state.

c. Trigger the MC_MoveVelocity function block

Result: The axis rotates forward at a speed of 10, and the axis state changes to ContinuousMotion.

d. Trigger the MC_Halt function block

Result: The axis immediately stopped rotating, and the axis state first changed to DiscreteMotion (positioning action) state, and then changed to Standstill (stopped) state.

e. Trigger the MC_MoveVelocity function block again.

Result: The axis rotates forward at a speed of 10, and the axis state changes to ContinuousMotion.

[Note] As you can see, there is no need to reset the Execute pin of the MC_Halt instruction; other motion control instructions can be executed to continue controlling the axis.

MC_Stop (Stop and lock command)

(1) Instruction Description

① Function Description

The control axis decelerates and stops at a set deceleration rate, and the axis status is locked in the stopped state after stopping.

② Pin Description

(2) Instruction Test

① Insert the MC_Stop function block

After setting up, download the project to the controller.

② Perform MC_Stop function block testing (the following are consecutive steps)

a. First, trigger the axis monitoring command MC_ReadStatus function block.

Result: The axis is in a Disabled state.

b. Enable the MC_Power function block for the trigger axis.

Result: The axis changes to a Standstill state.

c. Trigger the MC_MoveVelocity function block

Result: The axis rotates forward at a speed of 10, and the axis enters Continuous Motion mode.

d. Trigger the MC_Stop function block

Result: The shaft immediately stopped rotating, and its state changed to Stopping (deceleration and stop).

e. Trigger the MC_MoveVelocity function block again.

Result: The axis is still in the Stopping (deceleration and stop) state, and the MC_MoveVelocity function block will report an error with error code 5377 (indicating that the state machine is restricted from executing this function and the instruction state machine execution rules should be referred to).

f. Set the Execute function of the MC_Stop block to FALSE.

Result: The axis remains stationary; the axis status changes to Standstill.

g. Trigger the MC_MoveVelocity function block again.

Result: The axis rotates forward at a speed of 10, and the axis state changes to ContinuousMotion.

[Note] The MC_Stop function block will lock the axis during execution, preventing the execution of other instructions. Only by setting the Execute trigger pin of the MC_Stop function block to FALSE will the axis be released from the lock and return to the stop state.

MC_StopAtPhase (Specified phase stop command)

(1) Instruction Description

① Function Description

The control axis stops at the specified phase.

② Execution process

Step 1: The command is triggered by the rising edge of the input parameter Execute and the axis is controlled to move at the set speed (speed control).

Step 2: During the execution of the command, the stop action is triggered by the rising edge of Stop, and the axis will eventually stop at the specified phase.

③ Pin Description

(2) Instruction Test

① Insert the MC_StopAtPhase function block

② Insert the MC_ReadActualPosition function block

③ Set mechanism parameters

a. Select "Loop Mode"

b. Select "Disc" as the organization type.

c. When using this command, RoundPhase and "Working distance per revolution" in the software are generally set to the same value.

After setting up, download the project to the controller.

④ Perform MC_StopAtPhase function block testing (the following are consecutive steps)

a. Trigger the MC_ReadStatus and MC_ReadActualPosition function blocks.

Result: The axis is in a Disabled state.

b. Enable the MC_Power function block for the trigger axis.

Result: The axis changes to a Standstill state.

c. Trigger the MC_MoveVelocity function block (Velocity=3600)

Result: The axis rotates forward at a speed of 3600, and the axis state changes to ContinuousMotion.

d. Trigger the MC_StopAtPhase function block Execute (Velocity=1800)

Result: The axis rotates forward at a speed of 1800, and the axis status remains in ContinuousMotion state.

e. Trigger the MC_StopAtPhase function block Stop

Result: The axis rotates forward at a speed of 1800 until it reaches the specified phase of 180. The axis state first changes to DiscreteMotion (positioning action) state, and then changes to Standstill (stopped) state.

f. To better reflect the MC_StopAtPhase command controlling the axis to stop at the specified phase, the StopPhase value of the MC_StopAtPhase function block is modified to 300, triggering the MC_MoveVelocity function block (Velocity=3600).

Result: The axis rotates forward at a speed of 3600, and the axis state changes to ContinuousMotion.

g. Trigger the MC_StopAtPhase function block Execute (Velocity=1800)

Result: The axis rotates forward at a speed of 1800, and the axis status remains in ContinuousMotion state.

h. Trigger the MC_StopAtPhase function block Stop.

Result: The axis rotates forward at a speed of 1800 until it reaches the specified phase of 300. The axis state first changes to DiscreteMotion (positioning action) state, and then changes to Standstill (stopped) state.

[Explanation] This instruction can control the stop angle of the axis by setting the stop phase value of the function block.


Read next

Questions about the principle of thyristor phase-shifting soft starter

Abstract : Thyristor phase-shifting AC voltage regulation circuits cannot be applied to the starting and running of asyn...

Articles 2026-02-22