Closed Darkmorro closed 2 years ago
How to make it so that when generating Gcode, the start of the spindle is ignored? I don't need a code like "M3 S1000" while I delete the line manually.
Why you need to delete this command? What is physically connected to the spindle output pin?
1,3 Thanks, got it.
Why you need to delete this command? What is physically connected to the spindle output pin?
A spindle is connected to the output contact. When I use a CNC router as a plotter, I do not need to turn on the spindle. Instead of a milling cutter, I install a vane knife in the spindle. GRBL-Plotter_20220407_194919.zip
Perhaps it helps to set the spindle speed to 0. On the other hand, if drag tool is enabled, the chance that also the spindle is needed is minimal. Will see if can avoid switching on/off the spindle, taking account of this (and perhaps other) option.
Maybe I can try in a couple of days. I'll let you know the result right away.
I added a checkbox to disable spindle on: https://github.com/svenhb/GRBL-Plotter/releases
Thank you! Now everything works as it should. Another question: when working with a tangential knife, I noticed one moment when cutting circles of small radius (20mm or less). Judging by the operation of the machine, there is not enough speed of the A axis relative to the speeds of X and Y. Thus, the machine works in jerks. First, they work out the X and Y axes, stop and wait until the A axis takes the desired value. On large circles (200mm or more) there are no such problems, the machine works smoothly.
there is not enough speed of the A axis relative to the speeds of X and Y
I think it is a problem of the firmware, and you should try to increase the value of $113 A Max rate, mm/min In your case it would degree/min. Or you may try to work with 36° per turn and adapt your $103 setting to match this - this hepled me a lot, when using Z as tangential axis. When importing graphics, GRBL-Plotter takes account of the 36°/turn...
Question #1 is relevant again. I put symbols in the figure to make it easier to understand, I also attach a file with settings. I use a vane knife without tangential control. At the beginning of the program, the knife blade looks along the positive value of the X axis (Green arrow with marker 1) The knife comes to the point of the beginning of the cut, descends into the material and changes its direction (towards the arrow with marker 2) then the program execution does not raise any questions and the knife completes the trajectory with direction under marker 3, rises and moves to the beginning of the next path. Further, it is repeated by analogy: the direction of the knife changes in the material from marker 3 to marker 4. Thus, material damage occurs when the knife direction changes from 1 to 2 and from 3 to 4 (orange mark). Changing the angle value does not help, reducing the knife offset reduces the problem, but does not eliminate it completely. GRBL-Plotter_20220412_201055.zip .
I think it is a special problem with circles... How should the start of the path look like?
It helps, if you add a starting line at the circle:
I marked the starting points as it seems to me to be correct (the point is selected first with the minimum Y, then with the minimum X of the remaining ones for each curve), the beginning of the cut is always counterclockwise. Thus, there will be no idle turn in the material. I work only with closed contours, I can’t imagine how such an algorithm will show itself with open curves. .
The problem is, I can't forsee, where the knife is looking to, when starting a figure. Also, in your case; you might want to cut a ring, so the start-path of the outer ring must be different, than of the inner ring..
If we assume that by default at the beginning of the program the knife is always directed in the direction of increasing X, then the problem with determining the starting point of the first curve disappears. If a circle is cut, then at the end point the direction of the knife will be close to the start. So close that this small deviation can be neglected (provided that the starting points of the cut and the direction are always chosen according to the same rule). And if you complete the cut at a point coinciding with the initial one, then this minimum deviation will not be.
Also, in your case; you might want to cut a ring, so the start-path of the outer ring must be different, than of the inner ring..
I agree, the starting points will be different, but they must be selected according to the same rule. For example: we select a closed contour, we calculate its points with the minimum Y, from these points we select one with the smallest X, the cutting direction is always counterclockwise. Sorry, I do not know how your program works, maybe what I write sounds stupid.
Up to now I don't know the start angles: 1st I create path with modifications and angle informations, 2nd I do grouping and sorting figures. Also user can sort or delete figures... But in principle you are right.
BTW in e.g. incscape the path direction is the information if it's outside or inside path: The inner path is clockwise, the outer path counter clockwise
Of course, I don’t quite represent the technical capabilities of the program, I see two ways to get around the problem: one.
Ok, in short words:
Sounds logic and actionable
BTW: this new rule does not apply to brushes, which was the first intention for this path-modification: https://github.com/svenhb/GRBL-Plotter/wiki/Drag-tool-compensation
Check new release 1.6.6.2: https://github.com/svenhb/GRBL-Plotter/releases You may also use the overlap option below...
I tried. Of course, one check is not enough, but it seems to me that the algorithm works correctly for rectangular shapes. For the circle, the initial direction is chosen correctly, but the starting point is not chosen quite correctly, taking into account the offset of the knife, part of the circle will turn out to be cut off. I think that the starting point of the circle should be a little lower and to the right by the amount of offset, so that the tip of the knife coincides with the quadrant .
If you compare original circle (red) with drag-knife path of same circle (yellow) - for me it looks correct:
You're right. Everything is correct. But I found another problem. Sometimes the trajectory is distorted. Defect No. 1 and No. 2 sometimes appears on the circles. Defect No. 3 also appears on complex curves .
Can you upload the original graphics?
Can you upload the original graphics?
Oh sure
I think the problem are some cubic shapes, which are may not "clean". E.g. one circle, made of a cubic shape, results to this coordinates - note the wired y values at the beginning, which finally caused the wired cutting path:
k:49 x:67.09106 y:5.99980
k:48 x:67.09106 y:6.00011
k:47 x:67.03628 y:5.18590
k:46 x:66.87672 y:4.40500
k:45 x:66.61952 y:3.66454
k:44 x:66.27183 y:2.97168
To get rid of this behavior, you need to change this limit, than it works:
To be honest, I didn’t understand anything how it works, all the circles are made by the corresponding function. I just tried changing the ratio. It seems that I managed to choose the right one, I will most likely check tomorrow.
I built in an extra check in drag tool compensation: https://github.com/svenhb/GRBL-Plotter/releases
I think the problem are some cubic shapes, which are may not "clean". E.g. one circle, made of a cubic shape, results to this coordinates - note the wired y values at the beginning, which finally caused the wired cutting path:
To be honest, I didn’t understand anything how it works, all the circles are made by the corresponding function. I just tried changing the ratio. It seems that I managed to choose the right one, I will most likely check tomorrow.
Everything is working! Thank you!
Found another problem associated with circles of small diameters. More precisely all, but on small it is especially noticeable. The offset of the tip of the knife in my case is 3mm. For example, we take a circle with a diameter of 10mm (in the example it is black), the actual cutting line is purple, a circle with a diameter of about 11mm is cut out. with an extra cut at the starting point. The cut starts at point A, then B, then C, then D and ends at point A. In fact, the trajectory is more complicated, shortened for convenience. I think that with such a trajectory, the spindle coordinates at point A should be (8; 0), at point B (10; 2), at point C (8; 10), at point D (0; 8). In the resulting z-code, the corresponding points are offset from the center.
Received code:
G00 X4.580 Y0.000
G01 Z-1.800 F1000 (PD)
G01 X7.580 Y0.060 F1000
G01 X8.585 Y0.080
G01 X9.493 Y0.899
G01 X10.218 Y1.884
G01 X10.732 Y2.994
G01 X11.014 Y4.184
G01 X11.052 Y5.406
G01 X10.845 Y6.612
G01 X10.401 Y7.751
G01 X10.044 Y7.983
G01 X9.580 Y8.968
G01 X8.690 Y9.807
G01 X7.651 Y10.451
G01 X6.503 Y10.874
G01 X5.294 Y11.059
G01 X4.072 Y10.998
G01 X2.888 Y10.695
G01 X1.788 Y10.160
G01 X0.817 Y9.416
G01 X0.014 Y8.493
G01 X-0.587 Y7.428
G01 X-0.964 Y6.265
G01 X-1.100 Y5.049
G01 X-0.990 Y3.831
G01 X-0.639 Y2.660
G01 X-0.061 Y1.582
G01 X0.722 Y0.642
G01 X1.676 Y-0.123
G01 X2.764 Y-0.681
G01 X3.942 Y-1.011
G01 X5.162 Y-1.098
G01 X6.375 Y-0.939
G01 X7.531 Y-0.541
G01 X7.568 Y-0.267
G01 X7.580 Y0.000
G00 Z5.000 (PU)
With your settings d=10 mm, knife-r = 3 mm I get this result: With the start point at 8;0 it should also work and would be more correct, but the other coordinates... You should try with a real drag-knife...
So far I am solving the problem like this: I cut out holes of typical diameters, measure the actual size, reduce the size of the hole in the drawing by the difference.
What is the difference, for your example: Circle diameter 10 mm, knife offset 3 mm? The calculated path is shown here in green: between extended s1 and extended s2: The red line shows the knife offset
That's just the point, I did not see such a problem on curves that are not circles. Your example is correct.
Describe the solution you'd like
Describe alternatives you've considered
Additional context