The pulse-type driver can be quickly tested using ZDevelop software, and mainly includes the following four parts: hardware wiring, connecting the controller to ZDevelop, configuring axis parameters, and sending motion commands to check if the motor rotates. If it fails to run, refer to the troubleshooting section for solutions.
01. Pulse Axis Driver Trial Run Procedure
I. Hardware Wiring
Taking the ZMC432 bus motion controller as an example, it supports communication interfaces such as EtherCAT, EtherNET, RS232, RS485, CAN, and USB flash drive. Observe the hardware interfaces on the controller. The controller reference architecture is shown in the figure below.
The trial run can be completed by connecting to the ZDevelop software via Ethernet port or RS232 serial port.
1. Pulse Interface
Most controllers for positive motion technology use DB26 female connectors on the front panel as their pulse control interface, such as the AXIS connector of the ZMC432 shown in the figure below, which has an onboard interface for 6 pulse axes.
The AIXS terminal block mainly includes terminals for pulse output, encoder feedback, driver enable and alarm signals, 5V power output, and a common terminal, as shown in the table below.
Refer to the diagram below to complete the pulse control wiring between the controller and the driver. A differential connection is used. The pulse output includes four terminals: PUL+, PUL-, DIR+, and DIR-. Connect each terminal to the corresponding terminal of the driver. For drivers with encoder feedback, the differential wiring method involves connecting EA+, EA-, EB+, EB-, EZ+, and EZ- to the encoder. Then, connect pin 3 to the enable terminal of the driver for the controller to send an enable signal to the driver. Refer to the diagram above.
The enable signal in the AXIS 0-axis interface terminal is OUT12;
The enable signal in the AXIS 1-axis interface terminal is OUT13;
And so on.
Enable operations: OP(12,ON), OP(13,ON), etc.
The driver alarm signal is transmitted to the controller through pin 2, as shown in the figure above.
The alarm signal in the AXIS 0-axis interface terminal is IN24;
The alarm signal in the AXIS 1-axis interface terminal is IN25;
And so on.
The driver alarm input signal needs to be configured using the ALM_IN instruction: ALM_IN(0)=24, ALM_IN(1)=25, etc.
The single-ended connection method of the pulse is shown in the figure below. The figure below uses the common anode connection method, connecting the common terminal of the driver to the +5V terminal provided by DB26.
The single-ended wiring diagram of the encoder is as follows: Connect the encoder's A and B (for models without Z signal, only connect the AB phases) to the controller's positive terminals EA+ and EB+ one by one. Leave the controller's negative terminal floating. Connect the encoder's 0V or ground terminal to the GND terminal inside the controller's shaft interface. Then connect the power supply according to the encoder's power supply requirements.
2. I/O Interface
As shown in the figure below, the ZMC432 supports 6-channel pulse axis control. The I/O ports are divided into ordinary I/O ports and high-speed I/O ports. The response frequency of the ordinary I/O ports is 10KHz, and the response frequency of the high-speed I/O ports is 500KHz. In addition to faster response, some of the high-speed I/O ports of the ZMC432 also integrate special functions, as described below.
(1) Output port
The internal circuit of the output port is shown in the figure below. Output ports 0-1 support PWM pulse width modulation output and also support high-speed hardware comparator output (PSO function).
PSO function: PSO (position synchronized output) is essentially a position synchronization output that compares the real-time encoder feedback position (pulse position that can be output when there is no encoder) with the position set in the comparison mode to control the OP to output a high-speed synchronous signal. The PSO diagram is shown below.
PSO typically synchronizes the output signal with the laser (or dispensing valve, etc.) and triggers the output switch at constant spatial (or constant time) intervals throughout all stages of the motion trajectory, including acceleration, deceleration, and constant speed phases, thereby ensuring that the pulse energy is applied evenly to the workpiece.
The characteristic of PSO function is that it can output signals at high speed and stably. Because the output accuracy is high enough, it can trigger the output signal at a fixed distance throughout the entire motion trajectory without considering the overall speed. That is, it can move at a high speed in the straight part and decelerate in the rounded part while ensuring that the output spacing is constant.
The rounded corner machining part usually occupies a relatively small portion of the entire machining process, which maximizes production capacity while ensuring machining quality.
The PSO function is implemented by the HW_PSWITCH2 instruction. This instruction has multiple modes, supporting equidistant output, fixed-period output, and custom position output, etc. It has high precision and fast response. For specific application methods, please refer to previous articles.
PWM function: Enable PWM function for OUT that supports PWM. The frequency and duty cycle of PWM need to be set. It is used for flow rate control of dispensing valves, power control of lasers, and other applications.
(2) Input port
The internal circuit of the input port is shown in the figure below. Input port IN0-1 supports latching function.
Latching: The input port quickly responds to and latches the encoder's current position information by receiving a signal from the sensor, supporting both single latching and continuous latching.
II. ZDevelop Connectivity Controller
Using the ZDevelop software for positive motion, the equipment can be quickly put into trial operation. The controller is generally connected to ZDevelop via the network port. Select the IP address to connect. The default factory IP is 192.168.0.11. Note that the controller and the PC must be on the same network segment.
You can also connect to the controller via a serial port. The default parameters for the serial port are a baud rate of 38400, 8 data bits, and no parity. The default parameters will be restored after power failure.
III. Configuring Pulse Axis Parameters
After connecting the controller, first enable the driver. According to the enable signal OUT number in the axis interface described in the hardware manual, send OP(ionum,ON) to turn on the enable. For example, ZMC432 sends OP(12,ON) to enable the driver on AXIS 0.
Online command sending or viewing the "output port" operation OP is not required for stepper drives that are powered on immediately.
The following axis parameters can be quickly configured in the "View" - "Manual Motion" or "Axis Parameters" window, or by creating a new project, writing command statements, and downloading them to the controller. 1. BASE
BASE selects the axis number to connect to the pulse axis. The axis number connected to the DB head is the AXIS number marked on the panel.
2. ATYPE: ATYPE sets the axis type. For pulse axes without feedback, ATYPE = 1/7; for axes with encoder feedback, ATYPE = 4/5; for encoders connected alone, ATYPE = 3/6.
3. UNITS
UNITS sets the pulse equivalent, configured according to the number of pulses per revolution of the driver. It serves as the basic unit of the controller and can be set to the number of pulses required for the motor to rotate 1°. If the driver requires 10,000 pulses to complete one revolution, it can be set to UNITS=10000/360.
Conversion relationship: If UNITS=10000, the linear command MOVE(5) means sending 50000 pulses; the running speed SPEED=10 means sending 100000 pulses per second.
4. Speed
The SPEED command sets the basic speed parameters such as running speed, ACCEL acceleration, and DECEL deceleration; the SRAMP command sets the S-curve to extend the acceleration time, making the speed change smoother and reducing jitter; the VP_MODE command sets the SS-curve to make the acceleration transition smoother, resulting in a smoother trajectory and less impact.
5. Confirm pulse pattern
The controller's default pulse mode is pulse + direction. The pulse mode needs to be matched for it to operate, so you need to confirm the driver's pulse mode.
The controller supports three pulse modes: pulse + direction, dual pulse, and quadrature pulse (supported by series 4 and above). Both positive and negative logic can be configured.
The pulse mode is modified using the INVERT_STEP instruction, with an initial value of INVERT_STEP=0, which is the pulse + direction mode.
Syntax INVERT_STEP = mode
mode: Mode selection, default 0, the lower 8 bits (bits 0-7) represent the mode value as follows:
The corresponding voltage levels for each mode are as follows: If the polarities are reversed, the reference motion direction is opposite to the original.
The high 8 bits (bit 8-bit 15) represent the direction change protection time, in microseconds: 0-255. Setting method: INVERT_STEP(axis number) = 256*100+6, dual pulse mode 6, protection time 100 microseconds.
6. Exercise
Debugging can be performed using the manual motion window in the view menu or by sending MOVE linear motion commands via online commands. The axis motion can be obtained through DPOS target position (or MPOS feedback position), or the motion waveform can be sampled in real time using the "oscilloscope" view window in ZDevelop software. The motor motion direction is related to the motor polarity setting and the INVERT_STEP positive/negative logic setting.
7. Parameter Viewing
Once the axis parameters are configured, they can be viewed in the "Axis Parameters" window. The axis parameters are automatically refreshed and displayed in real time, and double-clicking is supported to directly modify the configuration parameters.
Axis Selection: Used to select the axis number information to be displayed.
Parameter selection: Used to customize the parameters of the axis of interest for display.
8. Abnormal alarm
When an abnormal alarm occurs, the "Command and Output" window of the ZDevelop software will print an error message or generate an AXISSTATUS alarm.
AXISSTATUS is an axis status parameter used to determine whether an abnormality has occurred on the axis. It displays abnormal information bit by bit, and multiple abnormal information can be superimposed. You can check the table below to confirm. For example, if AXISSTATUS displays 20h, it means that a negative hard limit has been encountered, which will cause the axis to stop immediately.
If AXISSTATUS displays 1000h, it means that the pulse frequency is too fast. This problem usually only occurs on high-resolution devices. This alarm can be resolved by increasing MAX_SPEED.
Before trial operation, ensure that the hard limit switch is configured successfully as a safety protection for the machine and to prevent overshoot.
After the machine is confirmed to be operational, configure the zero-return mode using the DATUM command and configure the origin sensor to be mapped to the input port using the DATUM_IN command. For instructions on zero-return, please refer to previous articles.
Hard limit switches limit the maximum "allowable travel range" of an axis. A hard limit switch is a physical switching element installed on the axis's travel distance, typically a sensor. The hard limit switch is mapped from a command to a corresponding input switch signal. Whether the signal needs to be toggled depends on whether it is normally open or normally closed. Once set, when the axis encounters a hard limit switch, it immediately stops moving with a deceleration of FASTDEC. Soft limit switches limit the axis's "working range." The limit position is directly set by a command. After the axis reaches the set DPOS coordinate position, it immediately stops moving with a deceleration of FASTDEC. Soft limits are configured according to actual requirements.
9. Configuration Syntax
FWD_IN = Input port number for positive hard limit access, -1 cancels mapping;
REV_IN = Input port number for negative hard limit access, -1 cancels mapping;
FS_LIMIT = Forward motion travel limit; uncheck and set a larger value.
RS_LIMIT = Negative motion travel limit; uncheck by setting a larger value.
For example, the status bar at the bottom of the ZDevelop software displays a red alarm error for axis0. Checking the AXISSTATUS parameter of axis0 in the axis parameters, it shows 30h. Referring to the AXISSTATUS instruction description, it is found that a positive or negative limit alarm has occurred. Check the limit configuration, that is, the configuration of IN0 and IN1 corresponding to FWD_IN(0)=0 and REV_IN(0)=1, and whether the related input INVERT_IN has reversed the level state.
IV. Quick Manual Movement Adjustment
Close all software except ZDevelop. Connect the controller using ZDevelop, download the empty program, and manually set the axis number to be debugged, axis type ATYPE, pulse equivalent UNITS, acceleration ACCEL, deceleration DECEL, and speed SPEED as described above. Then open "View" - "Manual Motion" and manually operate the motor for trial operation.
Operating Instructions: Press and hold the "Left" or "Right" button to keep the motor moving; release to stop. The "Command Position" displays the current pulse DPOS (unit: UNITS). Enter the "Distance" parameter, click "Move," and when "Absolute" is checked, the motor will move to the distance parameter position; when "Absolute" is not checked, the motor will continue moving according to the distance parameter.
If the motor fails to move after following the steps above, please refer to the next section for troubleshooting.
02. Troubleshooting Motor Not Working
I. Pulse Axis Troubleshooting Steps
II. Error Message
Check if the driver is displaying any alarms. If an alarm is generated, refer to the driver manual for the alarm error code to resolve the issue and then restart the system.
Check if an alarm is generated on the controller side. Based on the error message, error code, or AXISSTATUS axis status prompt printed by ZDevelop alarms, clear the error and restart.
III. Improper parameter settings
Check if the following parameters are set correctly:
1. To check if the motor is successfully enabled, the motor shaft cannot be moved by hand.
2. The axis number for the motion command must be selected correctly; otherwise, the motion command cannot be sent to the driver.
3. The axis type must be filled in correctly according to the ATYPE instruction table. If the type is incorrect, the controller will report an error, causing it to be unable to move.
4. The UNITS value is set incorrectly; if the pulse transmission speed is too low, the motor movement will be weak, and it will be impossible to distinguish whether there is movement with the naked eye.
5. After issuing a motion command, check if the DPOS of the axis changes in the axis parameter window. If it does not change, it means that the pulse was not issued. Check if there is any prompt in the AXISSTATUS axis status and whether the current axis interface is damaged.
IV. Incorrect movements
1. The motor can only move in one direction. Possible reasons include:
(1) The motor is in limit position. Check AXISSTATUS to confirm.
(2) The motor control mode is incorrect. Set INVERT_STEP to the corresponding pulse mode (double pulse or pulse + direction).
(3) Motor wiring problem, confirm the wiring.
2. If the polarities of DPOS and MPOS are reversed, or the motor rotation direction is opposite to the expected direction, the solution is to modify the motor polarity using the INVERT_STEP command or the driver software. Precautions for wiring errors:
Check that the pulse wiring and power supply lines are correct.
⊙Check that each module is powered on correctly.
⊙When checking single-ended wiring, confirm that the IO is powered on successfully. This concludes our sharing on the quick debugging and diagnosis of the pulse interface in the EtherCAT motion controller from Zheng Motion Technology.
For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion's technical sales engineer: 400-089-8936.
This article is original content from Zheng Motion Technology. We welcome everyone to reprint it for mutual learning and to jointly improve China's intelligent manufacturing level. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.