Share this

M-Series Tutorial (Basic Course) | Introduction to Axis Management Function Commands

2026-04-06 04:55:09 · · #1

Let's embark on a new chapter in M-series controller programming education, starting with a foundational course—an introduction to axis management function commands!

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 Basic 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:

04. Axis Management Function Commands

MC_Reset (Axis Abnormal Reset Command)

① Function Description

Reset the axis in ErrorStop state, including resetting the axis status and resetting the alarm status of the corresponding servo drive (refer to the alarm description in the servo manual).

② Pin Description

MC_ReadStatus (Read axis status command)

① Function Description

Used to periodically read the status information of the configured axes within the controller.

② Pin Description

MC_ReadAxisError (Axis read error)

① Function Description

Get the current error status of the axis.

② Pin Description

Command Test

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

② Insert the MC_Jog function block

③ Insert the MC_Reset function block

④ Insert the MC_ReadStatus function block

⑤ Insert the MC_ReadAxisError function block

After setting up, download the project to the controller.

⑥ Perform tests on the MC_Reset, MC_ReadStatus, and MC_ReadAxisError function blocks (the following are consecutive steps).

First scenario: Energizer interrupted during shaft movement.

a. Trigger the MC_ReadStatus and MC_ReadAxisError function blocks.

Result: The axis is in the Disabled state.

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

Result: The axis changes to the Standstill state.

c. Trigger the MC_Jog function block

Result: The axis state changes to ContinuousMotion state.

d. Directly disable the enable function by setting the Enable pin of MC_Power to False.

Result: The axis reported an error, the axis status changed to ErrorStop, the MC_ReadAxisError function block pin AxisErrorID reported error code 65286 (meaning that the driver was de-enabled during operation), and the MC_Jog function block reported error code 5380 (meaning that the axis was abnormally de-enabled).

e. Trigger the MC_Reset function block

Result: The axis state changes to Disabled, and the MC_ReadAxisError function block does not report an error.

The second scenario: Setting a software position deviation warning value.

Operation: Modify the position follow monitoring warning value: Click [Axis Settings] >> [Operation Settings] >> Change the [Warning Value] to 0.1

a. Trigger the MC_ReadStatus and MC_ReadAxisError function blocks.

Result: The axis is in the Disabled state.

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

Result: The axis changes to the Standstill state.

c. Trigger the MC_Jog function block

Result: The axis reported an error, the axis status changed to ErrorStop, the MC_ReadAxisError function block pin AxisErrorID reported error code 65281 (meaning that the difference between the axis command position and the feedback position exceeds the allowed setting value), and the MC_Jog function block reported error code 5638 (meaning that the position follow detection exceeded the limit).

d. Trigger the MC_Reset function block

Result: The axis state changes to Standstill, and the MC_ReadAxisError function block does not report an error.

[Note] When an axis reports an error, it can be reset using the MC_Reset command.

MC_ReadMotionState (Axis motion state read)

① Function Description

Get the current motion state of the axis.

② Pin Description

Command Test

① Insert the MC_ReadMotionState function block

After setting up, download the project to the controller.

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

Swipe up to read

a. Trigger the MC_ReadMotionState function block

Result: The axis is in the Disabled state.

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

Result: The axis changes to the Standstill state.

c. Triggering the JogForward pin of the MC_Jog function block

Result: The Accelerating pin of the MC_ReadMotionState function block is briefly TRUE, then becomes FALSE, the ConstantVelocity pin becomes TRUE, and the DirectionPositive pin becomes TRUE.

d. Set the JogForward pin of the MC_Jog function block to FALSE.

Result: The Decelerating pin of the MC_ReadMotionState function block was briefly TRUE and then became FALSE; the DirectionPositive pin became FALSE.

e. The JogBackward pin that triggers the MC_Jog function block

Result: The Accelerating pin of the MC_ReadMotionState function block is briefly TRUE, then becomes FALSE, the ConstantVelocity pin becomes TRUE, and the DirectionNegative pin becomes TRUE.

f. Set the JogBackward pin of the MC_Jog function block to FALSE.

Result: The Decelerating pin of the MC_ReadMotionState function block was briefly TRUE and then became FALSE; the DirectionNegative pin became FALSE.

【illustrate】

①ConstantVelocity, Acceleration, and Deceleration are determined by the controller based on the axis command speed and acceleration. This can only be determined when the axis is in running state; it cannot be determined when the axis is not in running state.

②DirectionPositive (forward rotation) and DirectionNegative (reverse rotation) are determined by the controller through axis command speed. This can only be determined when the axis is in running state; it cannot be determined when the axis is not in running state.

More information

For a more detailed description of the instructions, please download and view the "M Series Controller_Motion Control Instruction Manual" from the official website.

✦Control Technology Product Line✦

M Series Tutorial 14

M Series Tutorials - Table of Contents

#M Series Tutorials

The previous article discussed the release of Sysctrl Studio V2.3.0, the programming software for M-series controllers!

Read next

CATDOLL 123CM Chu TPE

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22