Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

How To Fast Debug & Diagnosis Pulse Interface of EtherCAT Motion Controller

ZDevelop software can be used to rapidly check running situation of pulse-drives, mainly including 4 parts here, hardware wiring, connection between ZDevelop and controller, axis parameters configuration and command sending. If it cannot run normally, please refer to problem checking on next technical article.



1. Process of Pulse-axis Drive Running

(1) Hardware Wiring

Here, we take ZMC432 bus motion controller as example, it supports many communication interfaces, mainly including EtherCAT, EtherNET, RS232, RS485, CAN, U disk, etc. Please observe hardware interfaces on the ZMC432 controller, its reference structure is shown as below.

It can be connected to ZDevelop software through EtherNET or RS232 serial port to complete test run.

IMAGE1.png

A. Pulse Interface

Pulse control interfaces of most of Zmotion motion controllers are DB26 female head terminal provided by panel. For example, ZMC432 motion controller, there are 6 pulse axes on board, that is, there are 6 AXIS terminals on controller.

IMAGE2.png

In AXIS terminals, they include wiring terminals of pulse output and encoder feedback, enable and alarm signals of drive, 5V power output signal and public end. For details, please see below form.

IMAGE3.png

Now, we know those terminals clearly.

Then, please refer to below graphic to complete pulse control wiring between controller and driver, using differential wiring method. It can be seen 4 terminals are contained for pulse output, PUL+, PUL-, DIR+ and DIR-. They are connected correspondingly (one to one).

However, for drive devices that are with encoder feedback, connect EA+, EA-, EB+, EB-, EZ+ and EZ- to encoder respectively.

Next, connect PIN3 to enable terminal of driver for controller to enable the driver.

--enable signal of AXIS 0 is OUT12--

--enable signal of AXIS 1 is OUT13--

And so on.

Enable operation: OP(12,ON), OP(13,ON), etc.

And alarm signals of drive are transferred into controller through PIN2.

--alarm signal of AXIS 0 is IN24--

--alarm signal of AXIS 1 is IN25--

And so on.

The alarm input signal needs to be configued through ALM_IN command, therefore, they are ALM_IN(0) = 24, ALM_IN(1) = 25.

IMAGE4.png

Below graphic shows single-ended connection of pulse, it uses common-anode wiring, which means connect public end of driver to 5V terminal provided by DB26.

IMAGE5.png

It can be seen from the above, A and B of encoder (phase A and B are only connected when there is no signal Z) and controller positive terminal EA+ and EB+ are connected correspondingly. For controller negative terminals, they are spare. But for encoder 0V or grounding terminal, it only needs to connect them to GND terminals of controller, then connect the power supply according to encoder power requirements.

 

B. IO Interfaces

As mentioned before, ZMC432 controller has 6 pulse axes. Here, let's see its IO interfaces. There are ordinary IO and high-speed IO. They are different from respond efficiency, ordinary IOs are with 10KHz respond efficiency, high-speed are with 500KHz. In addition, special functions are integrated in them.

IMAGE6.png

Output

Output inner circuit is shown below, OUT0-1 support PWM (Pulse Width Modulation), and they support high-speed hardware comparison output (PSO) function.

IMAGE7.png

PSO Function:

PSO means position synchronization output. The essence is to control the OP high-speed synchronous output signal by collecting the real-time encoder feedback position (the output pulse position can be used when there is no encoder) and comparing it with the position set in the comparison mode. The PSO schematic diagram is as follows.

IMAGE8.png

PSO is generally phase-synchronized with the synchronous output signal of the laser (or dispensing jet-valve, etc.), and it triggers the output switch at constant space (or constant time) in all stages of the motion trajectory, including acceleration, deceleration and constant speed segments, then the pulse energy can act uniformly on the processed object.

The feature of the PSO function is the high-speed and stable signal output. Because the output accuracy is high enough, the output signal can be triggered at a fixed distance in the entire motion track without considering the overall speed, that is, it moves at a fast speed in the straight line. While decelerating at the rounded corners, it can also ensure a constant output pitch.

Usually, the fillet processing part occupies a relatively small part in the entire processing process, so that the production capacity can be maximized while ensuring the processing effect.  

IMAGE9.png

But how to achieve PSO function?

Through HW_PSWITCH2 command. This instruction has many kinds of modes, and it supports equidistant output, fixed cycle output, custom position output, etc., with high precision and fast response. For specific application methods, please refer to former technical articles.

 

PWM Function:

To turn on the PWM function for the OUT that supports PWM, it needs to set the frequency and duty cycle of the PWM, which is used for the flow rate control of the dispensing valve and the power control of the laser, etc.  

IMAGE10.png

 

Input

Input inner circuit is shown below, and IN0-1 support latch function.

IMAGE11.png

 

Latch:

The input port responds quickly and latches the current position information of the encoder through the input signal of the sensor, it can select single latch or continuous latch.

IMAGE12.png





2. Connection between ZDevelop & Controller


Zmotion ZDevelop software can rapidly complete test run of equipment. There are two ways to build the connection.

(1) Ethernet

Use Ethernet to connect to ZDevelop, select relative IP address, please note 192.168.0.11 is the factory IP, and this IP and controller IP should be in the same network segment.

IMAGE13.png

 

(2) Serial port

Use serial port to connect, default parameters are Baud rate 38400, data bit 8, no parity, and it will resume default parameters when power-off.








3. Pulse Axis Parameters Configuration

After connected to controller, enable the drive firstly. Specifically, send OP (ionum, ON) command to open enable according to enable signal OUT No. described in axis interface of hardware manual. For example, for ZMC432 controller, we need to send OP(12, ON) to enable the driver on AXIS 0.

Send it directly on "command" or operate it through "View"-"OP". For those stepper drives that can enable directly when power-on, no need to operate this.

IMAGE14.png

 

(1) Basic Parameters

Following parameters can be quickly configured from "View"--"Manual"/"Axis Parameter", or new build the project and write the command into controller.  

A. BASE

BASE is used to select the axis No. to be connected for pulse axis. Axis No. connected on DB head is AXIS No. marked on controller panel.

 

B. ATYPE

ATYPE is used to set axis type. When ATYPE=1/7, it is pulse axis without feedback, when ATYPE=4/5, it is encoder axis with feedback. If encoder is needed to connect independently, set ATYPE=3/6.

IMAGE15.png

 

C. UNITS

UNITS is used to set the pulse equivalent, which is configured according to the number of pulses per revolution of the driver. As the basic unit of the controller, it can be set as the number of pulses required for the motor to rotate 1°. If the driver rotates 10000 pulses per 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.

 

D. SPEED

SPEED means speed, ACCEL means acceleration and DECEL means deceleration , they are basic speed parameters. In addition, there are others, SRAMP instruction is usued to set S curve, prolonging acceleration time, then speed changes become more gently, and shake can be less, but VP_MODE instruction is used to set SS curve, acceleration transitions will be smooth, and the trajectory is more smooth with less compact.  

IMAGE16.png

 

(2) Pulse Modes

The factory default pulse mode of the controller is pulse + direction, the pulse mode needs to be matched to run, so it is necessary to confirm the pulse mode of the driver.

In fact, our Zmotion motion controllers support three pulse modes, pulse + direction, double pulse and quadrature pulse (valid in ZMC4XX series and above), and positive/negative logic both can be configured.

If you need to modify the mode, INVERT_STEP instruction can do this. The initial value of INVERT_STEP is 0, which means pulse + direction mode.  

Then, grammar: INVERT_STEP = mode

mode: mode selection, default is 0, the mode value represented by the lower 8 bits (bit 0-bit 7) is as follows:

IMAGE17.png

 

The levels corresponding to each mode are as follows.

If the polarity is reversed, the reference movement direction is opposite to the original one.

IMAGE18.png

 

The upper 8 bits (bit 8-bit 15) indicate the direction change protection time, in microseconds: 0-255

Setting method: INVERT_STEP (axis No.) = 256*100+6, double pulse mode 6, protection time 100 microseconds.

 

(3) Basic Operations

A. Motion

Use the manual motion window of the view menu or online commands to send the MOVElinear motion command for debugging, and obtain the motion of the axis through the DPOS target position (or MPOS feedback position), etc. You can also use the view window "Scope" of the ZDevelop software to sample motion waveforms in real time.

The direction of motor movement is related to the motor polarity setting and INVERT_STEP positive/negative logic setting.

 

B. Parameters Checking

After the axis parameters are configured, they can be viewed in the "Axis Parameters"window. And parameters can automatically refresh and display in real time, and they can be modified through double-clicking.

IMAGE19.png

IMAGE20.png

IMAGE21.png


(4) 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 the axis status parameter, which is used to judge whether the axis is currently abnormal, and the abnormal information will be displayed bit by bit. Multiple abnormal information can be superimposed. Following form can be referred.

For example, when AXISSTATUS shows 20h, which means it meets negative hard position limit now, then the axis stops immediately. When AXISSTATUS displays 1000h, indicating that the pulse frequency is too fast. Generally, this kind of problem occurs only in high-resolution devices. When this alarm occurs, it only needs to increase MAX_SPEED value.

IMAGE22.png

Before the trial run, make sure that the hardware limit switch is configured successfully, as a safety protection for the machine to prevent overshooting.

After confirming that the machine can operate, use the DATUM command to configure the zero return mode, and the DATUM_IN command to configure the origin sensor to map to the input port. For the homing instructions, refer to the former technical articles.

IMAGE23.png

The hard position limit switch is the limit switch that limits the maximum "allowable travel range" of an axis. In addition, it is a physical switch element, which is mapped to the corresponding input switch signal by the instruction. And determine whether to flip the signal according to the switch signal (normally opened or normally closed). After the setting is completed, the hard limit switch is touched, then the corresponding axis stops immediately, and the stop deceleration is FASTDEC.  

The soft position limit switch will limit the "working range" of the axis, and the limit position is directly set by the command. After the axis reaches the set position, it will immediately stop moving with the deceleration FASTDEC.

IMAGE24.png

 

(5) Configuration Grammar

FWD_IN = input port No. connected to positive hard limit, -1 cancels mapping.

REV_IN =  input port No. connected to negative hard limit, -1 cancels mapping.

FS_LIMIT = forward movement travel limit, cancel setting larger value.

RS_LIMIT = negative motion travel limit, cancel setting a larger value

For example, the status bar below the ZDevelop software prompts axis0 alarm to indicate a red alarm error. Check the AXISSTATUS parameter of axis 0 in the axis parameters, and the prompt is 30h. According to the AXISSTATUS command description, it is known that the positive and negative limit alarms 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 reverses the level state.  

IMAGE25.png






4. Manual Motion For Quick Debug

Close all software except ZDevelop, use ZDevelop to connect to the controller at the same time, download the empty program, manually set the axis number to be debugged according to the previous instructions, set the axis type ATYPE, pulse equivalent UNITS, acceleration ACCEL, deceleration DECEL, speed SPEED, and then Open "View" - "Manual", and manually operate the motor for trial run.

IMAGE26.png

Operation method

Press and hold "Left"/"Right", the motor will continue to move, release it to stop. "Command position" shows the current pulse DPOS (unit: UNITS). Fill in the "Distance" parameter, click "Motion", when "Absolute" is checked, the motor moves to the position of the distance parameter, when "Absolute" is not checked, the motor continues to move according to the distance parameter.  

After setting according to the above steps, if the motor cannot move, refer to the instructions in the next section to troubleshoot.



ABOUT ZMOTION

That's all, thank you for your reading --   How To Fast Debug & Diagnosis Pulse Interface of EtherCAT Motion Controller.

For more information, please pay close attention to   "Support"   and     "Download"  , and there are other platforms about Zmotion -   Youtube    &     LinkedIn    &     Twitter     &     Tiktok     &     Facebook  including technical information (development environment, routine code), product showing, company development, etc.

Hope to meet you, talk with you and be friends with you.    Welcome!

This article is edited by ZMOTION, here, share with you, let's learn together.

ZMOTION: DO THE BEST TO USE MOTION CONTROL.

Note: Copyright belongs to Zmotion Technology, if there is reproduction, please indicate article source. Thank you.

Zmotion Technology  focuses on development of motion control technology and general motion control products, it is a national high and new technology enterprise. Due to its concentration and hard work in motion control technology, ZMOTION already become one of the fastest growing industrial motion control companies in China, and is also the rare company who has managed core technologies of motion control and real time industrial control software completely. Here, Zmotion provides motion controller, motion control card, vision motion controller, expansion module and HMI. In addition, there is one program software developed by Zmotion -- ZDevelop. It is a good choice for you to program and compile. And program through upper computer, there is PC manual.

Zmotion Technology   provides motion control cardmotion controllervision motion controllerexpansion module and HMI. (   more keywords   for Zmotion: EtherCAT motion control card, EtherCAT motion controller, motion control system, vision controller, motion control PLC, robot controller, vision positioning...)

Have a good day, best wishes, see you next time.



Copyright © 2013-2024 Shenzhen Zmotion Technology Co.,Ltd Design by Zmotion    粤ICP备13037187号 Motion Controller-Motion Control Card