Suggestion for improvement to SOFT LIMIT feature - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
12Next
Return to List Add thread
View: 13616|Reply: 15
Print Previous Topic Next Topic

Suggestion for improvement to SOFT LIMIT feature

[Copy Link]

10

Threads

24

Posts

116

Credits

Registered member

Rank: 2

Credits
116
Jump to the specified floor
Landlord
Posted at 2018-10-13 00:28:51 | Only Author Replies reward |Descending browser |Read mode

On a stepper CNC system like DDCSV2.1 it is always good to avoid "emergency stops" as they do not decelerate smoothly and risk losing HOME position calibration.  


As such I admire the SOFT LIMIT feature very much but I think it could be improved:

I have "Soft-limit stop mode" parameter #2030 set to 0 (deceleration) and am running V2018-10-12-102.


Currently when a G01 code orders an axis to travel way-beyond the soft limit it appears that there is no deceleration phase or, perhaps, the deceleration is agressive or perhaps something different from what I have programmed into my axis-specific deceleration parameters #263-#266.

When operating in CONT mode I notice that the deceleration works but DDCSV2.1 only begins decelerating when the soft limit is exceeded.  Because of this I have to put my soft limits more than 25mm away from the hard limit switch point.  With this large 25mm buffer I can approach the limit at full speed using CONT mode and it will decelerate almost exactly to, but slightly before, the hard limit.  This operation is wasteful of table space as if forces me to give up an inch or more on each side of my table.  


Since, for every axis, the DDSCV2.1 "knows" both the "current speed" and "allowed deceleration" I suggest that the soft limit feature always "look ahead" to, regardless of axis speed and operating mode, begin its deceleration in advance so that any axis that is trying to move beyond its soft limits will reliably decelerate, trip the alarm, and arrive exactly at the soft limit position.  


The exact distance required to stop is, at all times, known by DDCSV2.1:
Stop Distance[mm] = 0.5 * (Speed[mm/min]/60)^2 / (deceleration[mm/s^2])


In G-Code operation this would be easy to implement as any command that orders an axis to go beyond its soft-limit could instead just-order that axis smoothly to the soft limit and then trigger soft limit alarm.

In MPG and CONT modes the DDCSV2.1 would have to always look at the "current axis speed" and "allowed deceleration" and intelligently begin deceleration so that both MPG and CONT commands, no matter what axis speed, also arrive exactly, and gracefully, at the soft limit (then trigger the alarm).


If implemented properly this would allow DDCSV2.1 users to put their soft limits very close to the hard limits--like within 1mm or 2mm of the hard limit.

TOM


Reply

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Sofa
Posted at 2018-10-13 06:49:14 | Only Author
Thanks, I will adopt your suggestion.
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Bench
Posted at 2018-10-14 17:39:34 | Only Author
I agree with math_indy. Poor working with the soft limitd, this is one of the biggest problems with DDCSV. Solve it simply.
But with manual movements and when executing G-code, the algorithm should be different.

With manual movements, the axis can rest on its ending, because it needs time to slow down.
The solution is to enter the parameter "speed limit near the ends of the axes" and "offset from the ends axes for the speed limit".
That is, we set, for example, that at a distance of 20 mm from the ends of the axes, the speed of any axis cannot exceed 300 mm / min.
And when approaching this zone, the axis slows down to the set value.

When doing G-code, you need to do it differently. The controller should not execute the program at all if there is an excess of soft limit in it.
This is logical. Since the workpiece will be spoiled.
To do this, you need to make the controller scan all the lines of G-code before execution.
But the height of the Z axis changes with tool changes. Therefore, it is necessary that he scan the G-code lines from this tool change to the next.
That is, the algorithm is as follows:
-Change tool
-After replacement - scanning the program until the next M6
-If an exceeded soft limit is detected on any of the axes - a message box is displayed "Exceeding soft limit along the axis -, in the row number ----. Continuation is impossible"
-If there is no excess - the continuation of the program.

Naturally, you need to do so that this feature can be turned on and off for each of the axes separately.
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Floor
Posted at 2018-10-14 22:33:18 | Only Author
Ver:2018-10-12-102 Description:
1. Add G20/G21 recognition macro variable (#448): in G20 mode, #448=25.4; in G21 mode, #448=1, used to correct the bug that G28 and G153 instructions execute errors in G20 mode;
2. Correct the error that the detection command M101/M102 stops processing during the machining process;
3. Change the soft limit response mechanism in the manual mode, pre-judicate the soft limit, and increase the #2032-#2035 pre-judgment coefficient to adjust the pre-judgment bias.

The soft limit response mechanism in automatic mode has not changed temporarily. I agree with Nikolay81's idea that it should be discovered and prevented in advance. However, scanning gcode file can take a lot of time, especially for larger gcode files. Let me consider it again.

install(2018-10-12-102)-1.zip

597.16 KB, Down times: 992

Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
5#
Posted at 2018-10-15 19:36:43 | Only Author
Thanks Ytliu. The problem with the soft limit when manually moving the axes is solved. You, as always - the best.

There is an error in this firmware:
-Parameter # 448, can be equal, only 1 and 2. And you wrote that it can be equal to 25.4.

As for the soft limit in the G-code mode, I assumed that the controller might not have enough power to scan the entire program.
I have a good solution. And this solution will simultaneously solve the problem of incorrect calculation of the processing area for visualizing the tool path.
As they say in Russia "we will kill two rabbits with one shot" :-)
The fact is that perhaps the DDCSV processor is too weak for such tasks. But the power of a PC is enough to scan several thousand lines of G-code in a few moments.
I propose to implement the definition of the processing area, at the level of the postprocessor.
That is, at the beginning of any G-code file, 6 variables are defined that define the boundaries of the axes for this program.
The controller, after each M6 command, compares the machine coordinates with the value of these variables. And if they go beyond the soft limit, a message box is displayed.
Also, the value of these variables is used to determine the size of the visualization area of ​​the tool path.
At the end of the program, the value of these variables is reset to 0.
If the variables are not defined, the implementation of the soft limit occurs by the usual algorithm.

On a PC, this is implemented as follows: a simple program is written that scans the G-code file for maximum and minimum XYZ values.
Then it appends the necessary information to the beginning of the file and overwrites the open file.
The program has no interface. All its settings are stored in the ini file. Opening a G-code file is done from the command line, or by dragging and dropping a G-code file onto a program shortcut, or from the Windows context menu (that is, all 3 methods work).

Basically, the program will be automatically executed after the postprocessor. In many postprocessors, there is a function to open the finished G-code file defined by the program. Usually, this is a notebook. And in this case, we change in the settings of the CAM system, the Windows notepad to our program. Thus, program files are created already modified, without "extra gestures."
But it remains possible to modify the files manually, by dragging the G-code file onto the program shortcut, or from the Windows context menu.

I will create the program myself if you implement this feature on DDCSV.
If you do this, the soft limit function will be implemented on DDCSV, better than on most professional CNC machines.
This will certainly interest buyers. And the visualization function of the tool path finally works fine.
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
6#
Posted at 2018-10-15 20:08:10 | Only Author
Two more errors were identified:
-When # 2031 = Yes, the acceleration-deceleration of the axes varies greatly with G1 / G0. Try running G-code.
-When M101, after the appearance of the signal Probe, usually used the command G92, which determines the new coordinates.
But, it works, only at value XYZ - 0.
That is, this code will work:
M101
G1 X100 F300
G90G92X0
G1 X-10
M102

And this is not:
M101
G1 X100 F300
G90G92X2
G1 X-10
M102
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
7#
Posted at 2018-10-15 21:56:58 | Only Author
probe instructions
M101 or M103 is used to turn on the probe func. After turning on, in the subsequent motion, if the probe signal is found, the motion will stop. M101 differs from M103 in that the effective level of the probe signal is different.
M102 is used to turn off the probe func.
M101 or M103 must appear in pairs with M102.
E.g:
M101
G91G01Z-100F_
M102
G04P0; synchronization, where P must be 0
M103
G91G01Z100F_
M102
G04P0; synchronization, where P must be 0
G90G92Z_

First, M101 turns on the forward probe func, then the Z axis moves down 100mm at the set speed. In this process, if the level of the probe signal changes from '1' to '0', the motion stops, then M102 turns off the probe func, and Synchronize.
Next, M103 turns on the reverse probe func, and the Z axis moves up 100mm at the set speed. In this process, if the level of the probe signal changes from '0' to '1', the motion stops, and then M102 turns off the probe func. And synchronize.
Finally, execute G90G92Z_, set the Z coordinate of the current position to the set value.
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
8#
Posted at 2018-10-15 22:02:58 | Only Author
#448 is a macro variable, not a parameter. The parser assigns it, if it is in G20 mode, #448=25.4; if it is in G21 mode, #448=1.
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
9#
Posted at 2018-10-15 22:11:35 | Only Author
Your advice on the soft limit is very good, I will increase the corresponding processing.
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
10#
Posted at 2018-10-16 00:12:36 | Only Author
Thanks Ytliu. I got it.
I would like to adjust the function of the parameter # 2031.
When enabled, the acceleration of the axes varies greatly with G1 / G0.
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