Let's embark on a new chapter in M-series controller programming education, starting with the fundamental lesson: (pulse axis) How to make a servo motor move!
01. Preliminary Preparations
Software: Sysctrl Studio (PLC programming software)
Hardware: M-series controller (taking M511S as an example)
Servo (taking HN-Y7FA040A-S as an example)
02. Introduction to Pulse Wiring
This tutorial uses the M controller HCM511S-32MT4-D and the servo HN-Y7FA040A-S.
(1) Y7S pulse servo
[Internal Enable Wiring] Servo Enable Parameter Settings (taking DI1 terminal as an example): DI function code 1 is the servo enable function code. Configure function code 1 for DI1. Pn50A.1 is set to 7, indicating that the servo ON (/S-ON) is always fixed as "enabled", that is, the servo is enabled when powered on.
[External Enable Wiring] Servo Enable Parameter Settings (taking DI1 terminal as an example): DI function code 1 is the servo enable function code. Configure DI1 with function code 1. The DI common terminal is pin 47, connected to 24V. Pn50A.1 is set to the parameter of the corresponding pin (taking 0 as an example here), indicating that the pin is given a signal, and the servo is enabled.
(2) X5EA servo
[Internal Enable Wiring] Servo Enable Parameter Settings (Taking DI1 Terminal as an Example): DI function code 1 is the servo enable function code. Configure function code 1 for DI1. Set P04.11 to 1, indicating that the servo is enabled upon power-up.
[External Enable Wiring] Servo Enable Parameter Settings (taking DI1 terminal as an example): DI function code 1 is the servo enable function code. Configure DI1 with function code 1. The common terminal of DI is pin 11, connected to 24V. P04.11 is set to 0, indicating that the DI1 terminal has received a signal and the servo is enabled.
(3) X2EA Server
[Internal Enable Wiring] Servo Enable Parameter Settings (Taking DI1 Terminal as an Example): DI function code 1 is the servo enable function code. Configure function code 1 for DI1. Set P04.11 to 1, indicating that the servo is enabled upon power-up.
[External Enable Wiring] Servo Enable Parameter Settings (taking DI1 terminal as an example): DI function code 1 is the servo enable function code. Configure function code 1 for DI1. The common terminal of DI is pin 11, connected to 24V. P04.11 is set to 0, indicating that the DI1 terminal has received a signal and the servo is enabled.
03. Sysctrl Studio Project Configuration
Basic settings
Step 1: Hardware Setup
Double-click to open the software Sysctrl Studio and create a new project. Click on [Hardware Settings] >> [High-Speed Pulse Output] >> [High-Speed Output Channel 1]
Step 2: Add a pulse axis
Open [Motion Control] >> [Axis Settings] >> Right-click in a blank area and select [Add Pulse Axis]
Step 3: Connecting Devices
[Pulse Output Channel] Select High-Speed Output Channel 1
Step 4: Mechanism Parameter Configuration
[1] Number of pulses per revolution of the motor
For example: Set the corresponding parameter (the number of command pulses required for each revolution of the motor) to 10000.
①Y7S Pulse Servo
With the electronic gear ratio set, the Y7EA, equipped with a 23-bit motor, rotates once every 10,000 pulses. The relevant parameter settings are as follows:
Pn20E (electronic gear ratio - numerator) is set to 8388608, and Pn210 (electronic gear ratio - denominator) is set to 10000.
②X5EA Servo
Set the number of command pulses required for one revolution of the motor. 10,000 pulses are needed for one revolution. The relevant parameter settings are as follows:
P00.08 is set to 10000
③X2EA Server
Set the number of command pulses required for one revolution of the motor. 10,000 pulses are needed for one revolution. The relevant parameter settings are as follows:
P00.08 is set to 10000
[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 10.
The parameter configuration completion interface is as follows:
Programmable motor operation control
Note: The pulse axis cannot be enabled or deenabled in the jog debugging interface. Servo enable is required before attempting to test in the jog debugging interface.
(1) Click on [Jig] and enter the appropriate jig speed, acceleration and deceleration in the jig window.
(2) Enter monitoring mode. Click on [Forward] or [Reverse], and the current axis status information will be displayed in the axis status window.
Programmable control of motor operation
(1) A new project will have a default POU, with the task type set to event-triggered by default and the event selection set to motion event by default. The motion control function block needs to be called within the motion event type to function properly. Without a motion event task, the inching control of the motor's rotation part cannot be used normally.
(2) Set enable variables
(3) Add network
(4) Insert the MC_Jog function block
(5) Configure the input pins of the MC_Jog function block
Right-click the function block and select Create Input Variable
Set initial values for some variables in a function block
(6) Download the project to the controller, enter the monitoring state, and conduct the test.
✦Control Technology Product Line✦