Share this

How to flexibly adjust axis parameters online

2026-04-06 05:16:00 · · #1

The SC2-C series PLC has 16 inputs and 16 outputs.

16 outputs, DC5~24V, supports NPN type; all 16 outputs are high-speed outputs, frequency 200K, and can be multiplexed as 8-axis "single-ended AB phase" pulse output or 8-axis "single-ended single phase" pulse output. The 16 output ports are allocated to 2 common terminals.

The SC2-C series PLC pulse axis allows some parameters to be configured via software interface or modified in the program, enabling flexible application according to on-site processes.

The SC2-C series PLC supports up to 8-axis pulse output. The supported output modes are shown in the table below:

The following is an example of how to modify the axis parameters in a program for the PLC's main pulse axis.

01. Hardware Wiring

In this test, because the zero-return method of the pulse axis was modified to 35 in the program, that is, the current position is set as the origin, there is no need to connect an external origin sensor. Only a 24V power supply needs to be provided to the PLC.

02. Introduction to Axis Configuration Parameter Commands

Function block MC_SetAxisConfigPara: Axis configuration parameter command

This function block is used to modify specific parameters of a specified axis in the program. Modification is allowed when the axis is in the Disabled state. After modification, the current position of the axis may change abruptly, and the user should be aware of this.

The function block MC_SetAxisConfigPara is shown in the following figure:

The parameters of the function block MC_SetAxisConfigPara are defined in the table below:

The parameterlndex specifies the range of axis parameters to be modified, and the allowed values ​​are as follows:

• Parameter number -1: Updates all parameters. Modification is allowed in the Disabled state. After modification, the current position may change drastically. Users should be aware of this.

• Parameter number 0: Do not update at all;

• Parameter number 100: Only modifies the gear ratio. Modification is allowed in the Disabled state. After modification, the current position may change abruptly, requiring a re-execution of the original operation.

Influencing variables:

Description of instruction error code MC_AXIS_ERROR_ID (partial)

Note: For more information about the error code MC_AXIS_ERROR_ID, please refer to the "LeadStudio Motion Command Manual".

03. Operating Procedures

The PC's IP address is 192.168.1.132 (it should be on the same network segment as the PLC).

The IP address of SC2-C is 192.168.1.3.

01. New Construction Project

1) Open Lead Studio software and create a new project named "Example_SC2C_AxisConfigPara", as shown in the following figure:

02. Local Pulse Axis Settings

1) Right-click on the [Motion Control Axis] in the device tree on the left, select [Add Axis], create a new axis [Axis_0], and click OK, as shown in the following figure:

2) Double-click the axis [Axis_0] in the device tree on the left, select [Basic Configuration], change the axis type to [Pulse Axis], and the output device to [OUT0/OUT1], as shown in the figure below:

3) Double-click the axis [Axis_0] in the device tree on the left, select [Unit Conversion Settings], and set the pulse equivalent of the pulse axis, as shown in the figure below:

4) Double-click the axis [Axis_0] in the device tree on the left, select [Mode/Parameter Settings], and set the relevant parameters for the pulse axis as shown in the following figure:

【Mode Setting】Linear Mode, 【Axis Speed ​​Setting】Maximum Speed: 200, 【Output Signal Setting】Output Mode: Pulse Direction, Output Terminals: OUT0-Pulse, OUT1-Direction.

5) Double-click the axis [Axis_0] in the device tree on the left, select [Origin Return Settings], and set the pulse axis return parameters as shown in the following figure:

[Original Point Return Mode] Zero Return Mode 17

03 Modifying the pulse axis homing parameter program

1) The variable definitions are shown in the following figure:

2) Write the program as shown in the figure below:

04. Modify the pulse axis zero-return parameter program for testing.

1) Open Lead Studio software, open the project "Example_SC2C_AxisConfigPara", compile it without errors, download the project to SC2-C, and click run, as shown in the following figure:

2) Double-click to open the demo program for modifying axis parameters [AxisConfigPara_Demo], set the value of "iState" to 1, and start executing the "Demo program for modifying axis parameters". After modifying the pulse axis zero-return parameter, the pulse axis will start returning to zero, as shown in the figure below:

3) Wait for the program to finish executing. The monitoring shows that the "iState" value is 4, indicating that the pulse axis zero-return parameter has been successfully modified and the pulse axis has completed zero-return using method 35, as shown in the figure below:

Note: This example briefly introduces how to modify the zero-return parameter of a PLC's local pulse axis in the program. In practical applications, other parameters such as gear ratio and software limit can also be modified in the program. For details, please refer to the "MC_SetAxisConfigPara" instruction description.

-END-

Read next

CATDOLL 115CM Alice TPE

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22