Problem with delay DIR-STEP - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
View: 53608|Reply: 63
Print Previous Topic Next Topic

Problem with delay DIR-STEP

[Copy Link]

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Jump to the specified floor
Landlord
Posted at 2018-8-7 00:39:16 | Only Author Replies reward |Descending browser |Read mode
Last edited by Nikolay81 In 2018-8-7 00:44 Editor

A very big problem was discovered.
At first I could not understand what was happening, but the oscilloscope helped me in this.
For example, a person bought on Aliexpress, DDCSV and drivers LEADSHINE 556 (the most popular).
He wants his machine to work quieter, and sets the division step 1/32.
Configures the controller, sets the "X axis pulse equivalency" to 1280 (with the step of the ball screw 5mm).
Rejoices, for a while, how well and quiet everything works.
But the joy does not last long. Since, soon he notes that the machine loses its steps when changing direction.
Even at the lowest speeds.
He begins to read the instructions to the drivers, and finds out that the minimum delay between DIR and STEP should be 5 microseconds.
After reading the forums, he finds out that everything is even worse. For these drivers, it is desirable to exhibit a minimum of 10 microseconds.
It sets the "Time interval between DIR & pulse" parameter, for example, at 7000 nanoseconds (7 microseconds).
And then this bug happens.
At large values ​​of "X axis pulse equivalency" (more than 1000) and simultaneously, greater values ​​of "Time interval between DIR and pulse"
(more than 5000), the machine can not develop speed, more than 2500 mm / min.
What happens at this time with STEP signals is visible in the figures.
If you increase the speed, for example to 5000 mm / min, even the numbers on the screen will stop spinning.
That is, the controller just stops generating STEP signals.
If you reduce the "Time interval between DIR & pulse", for example up to 300, the machine quietly develops 10000mm / min.
And STEP signals have an ideal shape.
If you reduce the division of the step to 1/8, the problem also disappears. Since it appears, only at a high frequency of the STEP signal.

How to fix it?


Good STEP.jpg (47.33 KB, Down times: 1468)

Good STEP.jpg

Bad STEP.jpg (52.75 KB, Down times: 1433)

Bad STEP.jpg
Reply

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Sofa
Posted at 2018-8-7 06:21:31 | Only Author
If there are losing steps when changing direction,you do not need to adjust parameter #416, you only need to change the definition of the pulse level of the relevant axis (#418-#421).

Parameter #416 is recommended to set 300ns.

脉冲方向说明.png (10.06 KB, Down times: 1011)

脉冲方向说明.png
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Bench
Posted at 2018-8-7 06:27:44 | Only Author
In addition, you can also change the pulse trigger definition of the drive to solve such problems.
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Floor
 Author| Posted at 2018-8-7 14:11:34 | Only Author
Perhaps we do not understand each other well.
I will try to explain.
For Leadshine drivers, and for many other drivers, the DIR signal must switch slightly earlier than the STEP signal.
I tried both STEP signal levels. Anyway, at a value of # 416 = 300ns, it loses its steps on the Leadshine 556 drivers when
change of direction. Because, the minimum delay between DIR and STEP should be at least 5000ns.
Only then, the steps are guaranteed not lost when changing direction.
It is a fact. See the screenshot of the instructions for DM556.
Also, here is a link to Purelogic's research.
http://wiki.purelogic.ru/index.p ... %B8_DIR_%D0%B2_PLCM
See the end of the article.
They found out that when STEP signal level is changed to low, the delay should be even greater. Up to 25000ns (!). Since the Leadshine drivers do not work correctly with low level STEP signals.
Can I not correctly understand the meaning of the "Time interval between DIR & pulse" setting?
In my opinion, it determines how much the DIR signal is generated before the STEP signal. This is necessary because the driver does not have time
in time to understand that the direction of movement has changed (see figure).
I am wrong?
In any case, the machine loses its steps at # 416 = 300 ns (with a change of direction). And at # 416 = 7000ns does not lose.
I tried STEP both high and low. It does not change anything. The problem is solved only by setting parameter # 416, more than 5000ns.
But there is a bug that I described.

Dir-step.jpg (273.41 KB, Down times: 1430)

Dir-step.jpg

556.jpg (108.6 KB, Down times: 1390)

556.jpg
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
5#
Posted at 2018-8-7 18:25:53 | Only Author
Nikolay81 Posted at 2018-8-7 14:11
Perhaps we do not understand each other well.
I will try to explain.
For Leadshine drivers, and for  ...

For this problem, I need your cooperation.

Let's first look at the CW / CCW mode, will there be a loss of steps?

Parameters #230-#233(command type) and #234-#237(DIR in CW/CCW mode) have been added to the configuration file. You can set the command type to CW/CCW mode, and set  the direction of movement of axis via #234-#237.

If the controller is in CW/CCW mode, configure the drive to the same mode.

install.zip

12.66 KB, Down times: 1813

Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
6#
 Author| Posted at 2018-8-7 19:33:06 | Only Author
ytliu Posted at 2018-8-7 18:25
For this problem, I need your cooperation.

Let's first look at the CW / CCW mode, will there be a ...

Thank you.
I am very glad that you are ready to solve this situation.
For dealers, customers' appeals for losing steps are the biggest "headache".
At a distance, it is impossible to understand what happened - the screw is wedged, the drivers are not properly configured, the wires have a problem, or the controller is buggy.
And all cases of loss of steps, through the fault of the controller, should be known and have a solution.
The problem is not as simple as it seems.
The fact is that on programs like:
G91
G1 X + 10 F2000
G1 X-10
G1 X + 10
G1 X-10
G1 X + 10
G1 X-10
and so on,
steps are not lost.
For any values of the parameters # 416 and # 418- # 421.
And on complex programs (example in the screenshot) - are lost for any values of # 418- # 421.
But an increase of # 416 to 7000 helps.

Today I'll take the oscilloscope, and I'll try to understand what there really is a delay, between DIR and STEP.
I need a little time, maybe a couple of days. I want to accurately identify the problem.


Prog.jpg (111.89 KB, Down times: 1345)

Prog.jpg

StepsLost.rar

4.19 KB, Down times: 1669

Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
7#
Posted at 2018-8-7 20:38:11 | Only Author
Last edited by ytliu In 2018-8-7 20:43 Editor
Nikolay81 Posted at 2018-8-7 19:33
Thank you.
I am very glad that you are ready to solve this situation.
For dealers, customers' appe ...

I carefully read the LEADSHINE-556 user manual. The problem should be caused by the current-limiting resistor R. The series resistance(R) of the pulse/direction signal of the DDCSV controller is 100 ohms,which will cause insufficient drive current,Especially at high frequencies, the front end optocoupler of the driver may not be turned on normally.

You can replace the R107 and R112 resistors with 0 ohms.

DM556.png (156.95 KB, Down times: 1376)

DM556.png

DDCSV.png (1.32 MB, Down times: 1361)

DDCSV.png
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
8#
 Author| Posted at 2018-8-7 21:45:09 | Only Author
ytliu Posted at 2018-8-7 20:38
I carefully read the LEADSHINE-556 user manual. The problem should be caused by the current-limitin ...

It is interesting.
I can see a part of the DDCSV schematic diagram with outputs STEP / DIR?
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
9#
Posted at 2018-8-7 22:12:47 | Only Author
Nikolay81 Posted at 2018-8-7 21:45
It is interesting.
I can see a part of the DDCSV schematic diagram with outputs STEP / DIR?

If the R107 and R112 in the controller are not convenient to replace, you can replace the 270 ohm resistor in the drive with 150 ohms.

In addition, in the latest controller, R107 and R112 have become 22 ohms.

164245.png (8.14 KB, Down times: 896)

164245.png
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
10#
 Author| Posted at 2018-8-8 01:37:07 | Only Author
ytliu Posted at 2018-8-7 22:12
If the R107 and R112 in the controller are not convenient to replace, you can replace the 270 ohm  ...

The CW / CCW mode unfortunately does not work properly.
In this mode, depending on the direction of travel, the pulses must be generated at the STEP or DIR output.
Instead, when this mode is enabled, pulses are generated simultaneously at the STEP and DIR outputs.
Of course, the axis twitches and does not want to move.
Settings # 234- # 237 do not change anything.
What am I doing wrong?
Reply Support Opposition

Use props Report

You need to log in before you can reply Login | Register now

This forum Credits Rules

Shenzhen Digital Dream Numerical Technology Co., Ltd. support
Adress:507,A Building,Leibo Industry Zone,No. 22 Jinxiu East Road,Kengzi Street,Pingshan district,Shenzhen City,P.R. of China
Phone:13244704799
E-mail:info@ddcnc.com

TEL

0755-87654321

Wchat

Website designed by DigitalDream Technology Support
Quick Reply Back to top Back to list