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. Torque Control Command
MC_TorqueControl (torque setting command)
① Function Description
This command controls the axis to operate in torque mode and changes the axis torque value in real time. The maximum speed of the servo axis in torque mode depends on the minimum speed of the 16#6080 or 16#607F servo.
② Pin Description
Command Test
Project settings
MC_TorqueControl function block test
a. Set servo SDO parameter 16#6080 to 600 to enable the axis and trigger the MC_TorqueControl function block.
Result: The servo entered torque mode, the axis rotated at a speed of 10 (600 rpm), and the AxState online value changed from 1 (Standstill - stopped state) to 14 (torque state).
b. Change the value of MC_TorqueControlWithVelocity0_Torque to 20.
Result: The set torque was less than the torque required for the shaft to operate, and the shaft stopped running.
c. Disable the MC_TorqueControl function block
Result: The shaft exits torque mode and enters CSP mode. The shaft stops running, and the online AxState value changes from 14 (torque state) to 1 (Standstill state).
[Note] In torque mode, the maximum speed of the servo axis depends on the minimum speed of either 16#6080 or 16#607F.
MC_TorqueControlWithVelocity (torque control command with speed limit)
① Function Description
This command is used to control the shaft to operate in torque mode, change the shaft's torque value in real time, and limit the shaft's speed.
② Pin Description
Command Test
Project settings
Testing the MC_TorqueControlWithVelocity function block (the following are the sequential steps)
a. Enable the axis and trigger the MC_TorqueControlWithVelocity function block.
Result: The servo entered torque mode and operated forward at a speed of 10 strokes/second. The AxState online value changed from 1 (Standstill - stopped state) to 14 (torque state).
b. Change the value of MC_TorqueControlWithVelocity0_Torque to 20.
Result: The set torque was less than the torque required for the shaft to operate, and the shaft stopped running.
c. Change the value of MC_TorqueControlWithVelocity0_Velocity to 15, and then change the value of MC_TorqueControlWithVelocity0_Torque back to 100.
Result: The servo is operating forward at a speed of 15 strokes/second.
d. Disable the MC_TorqueControlWithVelocity function block
Result: The shaft exits torque mode and enters CSP mode. The shaft stops running, and the online AxState value changes from 14 (torque state) to 1 (Standstill state).
[Note] The differences between the MC_TorqueControl and MC_TorqueControlWithVelocity instructions are as follows: The MC_TorqueControl instruction cannot limit the maximum speed of the axis. When using the MC_TorqueControl instruction, the maximum speed of the axis is determined by the minimum speed of 16#6080 or 16#607F. The MC_TorqueControlWithVelocity instruction can limit the maximum speed of the axis through a function block (achieved by associating 16#6080/16#607F).
✦Control Technology Product Line✦