Share this

M Series Tutorial (Basic Tutorial) | Return to Original Command

2026-04-06 02:14:49 · · #1

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

Add Slave Station >> Add Servo Axis >> Associate Device >> Mechanism Parameter Settings

04. Return to origin command

MC_Home (Return to Homepage Command)

① Function Description

This command controls the axis to return to its origin position according to the set mode. After returning to the origin position, the axis position becomes the value specified by Position. It is important to note that this command triggers the driver's own homing function; the corresponding signal must be connected to the driver according to its homing function requirements. The homing mode and homing speed can be set in the axis configuration section of the software. Specific parameter settings and statuses can be found in the table below.

② Pin Description

Command Test

Project settings

MC_Home Function Block Test

a. Select mode 19 for servo axis parameter return mode, set the origin return start speed to 838860 pulses per second, and the origin return approach speed to 83886 pulses per second, enable the axis, and trigger the MC_Home function block.

Result: The servo enters the home return mode, and the axis searches for the home signal in the forward direction at a speed of 36 (0.1 rpm). After encountering the home signal, it decelerates and stops, and then runs in the reverse direction at a low speed. After detecting the falling edge of the home signal, it stops and sets the home point.

b. After triggering the MC_Home function block, read PDO16#6061

Result: The control mode of drive 16#6061 is displayed as 6.

【Note】The MC_Home command triggers the servo drive's internal home return function.

MC_HomeWithParm(specified parameter returns to the origin)

① Function Description

This command controls the axis to return to its origin position according to the mode set in HomeMode. After returning to the origin position, the axis position changes to the value specified by Position. This command triggers the driver's own homing function; the corresponding signal must be connected to the driver according to its homing function requirements. After the command is executed, the homing mode, homing speed, and acceleration in the servo are modified. Specific parameter settings and statuses can be found in the table below.

② Pin Description

Command Test

Project settings

Testing the MC_HomeWithParm function block (the following are the sequential steps)

a. The function block input parameters return to the origin mode, selecting mode 19. The origin return start speed is set to 200,000 pulses per second, and the origin return approach speed is set to 20,000 pulses per second. The axis is enabled, triggering the MC_HomeWithParm function block.

Result: The servo enters the home return mode and searches for the home signal in the forward direction at a speed of 8.58 (0.02 rpm). After encountering the home signal, it decelerates and stops, then runs in the reverse direction at a low speed. It stops after detecting the falling edge of the home signal and sets the home point.

b. After triggering the MC_HomeWithParm function block, read PDO16#6061

Result: The control mode of drive 16#6061 is displayed as 6.

[Note] The MC_HomeWithParm command performs essentially the same action as the MC_Home command; the difference lies in how the home return parameters are set. The MC_HomeWithParm command is more flexible in use, allowing users to modify parameters such as the home return method and speed on touchscreen devices.

MC_HomeByPLCIO (Controller returns to origin)

① Function Description

This command controls the axis to return to its origin position according to the HomeMode setting. After returning to the origin position, the axis position changes to the value specified by Position. There are 15 HomeMode return-to-origin modes for this command: modes 17 to 30, and mode 35. It is important to note that this command is for the controller's return-to-origin function; the corresponding signals must be connected to the controller according to its return-to-origin function requirements. Specific parameter settings and statuses can be found in the table below.

② Pin Description

Command Test

Project settings

MC_HomeByPLCIO function block test (the following are the sequential steps)

a. In the function block input parameter return mode, select mode 19, set the origin return start speed to 50 user units per second, the origin return approach speed to 5 user units per second, enable the axis, and trigger the MC_HomeByPLCIO function block.

Result: The servo motor starts searching for the origin, moving forward at a speed of 50 (0.14 rpm) to find the origin signal. After encountering the origin signal, it decelerates and stops, then moves in the reverse direction at a low speed. It stops after detecting the falling edge of the origin signal and sets the origin.

b. After triggering the MC_HomeByPLCIO function block, read PDO16#6061 multiple times.

Result: During the process of the servo motor finding the origin after the command is triggered, the value of 16#6061 is 8, and after finding the origin position, the value of 16#6061 is 6.

【Explanation】The MC_HomeByPLCIO instruction performs the same actions as the previous two instructions, but the origin and limit signals are connected to the controller. The servo motor’s homing action is controlled by the controller. Only after the origin position is found will the servo’s homing mode 35 (with the current position as the origin) be triggered.

MC_SetPosition (Sets the axis position)

① Function Description

This command sets the axis position to a specified value. Its characteristics are: 1. It only modifies the axis position, not the driver position; 2. It does not affect the currently executing motion, but it does affect commands that begin execution after the current motion has finished; 3. The axis will not actually move during command execution. Specific parameter settings and statuses can be found in the table below.

② Pin Description

Command Test

Project settings

Testing the MC_SetPosition function block (the following are the sequential steps)

a. Before executing the MC_SetPosition command, check the command position and actual position in the axis status.

Result: The command position and the actual position are not 0.

b. Read the position feedback value of PDO16#6064 before executing the MC_SetPosition instruction.

Result: The feedback value at position 16#6064 is also not 0.

c. After executing the MC_SetPosition command, check the command position and actual position in the axis status.

Result: The command position and the actual position are both 0.

d. Read the position feedback value of PDO16#6064 after executing the MC_SetPosition instruction.

Result: The feedback value at position 16#6064 is still not 0.

e. After executing the MC_HomeByPLCIO instruction again, read the position feedback value of PDO16#6064.

Result: The feedback value for position 16#6064 is 0.

【Note】The MC_SetPosition instruction only modifies the command position and actual position on the controller side, and will not affect the PDO feedback value of the driver.

✦Control Technology Product Line✦

Read next

CATDOLL 133CM Ingrid Shota Doll

Height: 133cm Male Weight: 28kg Shoulder Width: 31cm Bust/Waist/Hip: 64/59/73cm Oral Depth: 3-5cm Vaginal Depth: N/A An...

Articles 2026-02-22