-
I'm using another grbl version on a mega2560, and it has a bug whereby on G94 G1 XA moves, the linear feedrate value seems to be assigned incorrectly to the A axis rather than X. Of course A is expecting degs/min units. The spec on this situation is here: http://linuxcnc.org/docs/html/gcode/machining-center.html#_feed_rate |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 27 replies
-
grblHAL was initially forked from Grbl so perhaps not... Code is here? I am not sure how to interpret the LinuxCNC spec, if linear motion and rotary motion is executed together the max feed rate for the rotary part should be ignored? Or somehow transformed before applied? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if thread followers are notified of edits on a previous post, so if not, I edited my previous post here to clarify the pseudo code in which I was proposing a possible fix, if grblHAL exhibits the same error of course. Also, nothing to report yet from the folks at MillRight (MR grbl as I call it). I would be interested in knowing how the test case behaves on grblHAL when someone gets a chance to run it. Laser not needed, just time the moves via the gcode sender DRO. |
Beta Was this translation helpful? Give feedback.
-
Ah... here's another proof point for the solution I suggest above... I built a version of the test file "XA tcB.nc", hand modified to use G93 Inverse Time motion mode in the G1 XA stmts, where F22.22 is the inverse time value for 45mm line at designed feedrate of 1000mm/m, and this file worked fine on my MR grbl. I just did the math on a few G1 XA lines of the original "XA tcB.nc", using the pseudo code in the proposed solution, and it works out to a block->programmed.rate of 22.22 in the case of converting the planner block to an inverse time motion when linear-angular motion is planned. Of course I haven't extrapolated this logic down stream of the processing to know for sure, but it stands to reason that converting this condition of move to an inverse time motion will play out correctly through cascaded code paths and not have undesired side effects. |
Beta Was this translation helpful? Give feedback.
-
@terjeio , Well done!
As I study my pseudo code and your translate to C, I think I have a missing condition to trigger the fix, the fix being the pl_data->feed_rate conversion to inverse time feedrate and state, that missing trigger condition is... Otherwise, I like it, it looks good so far. Thank you very much for handling, please keep this thread posted with the final fix info or links to it. I'll make sure MillRight refers here before they dive too deep in their fork. Cheers, |
Beta Was this translation helpful? Give feedback.
-
In this reference, the CNC builder and Vectric expert Gary Campbell, explains "...Rotary feedrates have never been easy to understand. Inches (or millimeters) per minute (second) converted into degrees per min/sec just adds to the rotary confusion. To make it even worse, various controllers handle the data differently when given the same feedrates." Here's an interesting one, according to the author he's running linuxCNC no less! The vid is 6 years old, so apparently linuxCNC had this bug too! I expect not anymore since they cite the spec now in their doc. This one threw me for a loop for a week because I thought if linuxCNC behaved as such, then it must be right! Until I read their spec, and verified it against NIST RS274.
sorry no. |
Beta Was this translation helpful? Give feedback.
-
@terjeio @phil-barrett @terjeio please advise how/when I download the fix code and you were going to make Plasma/THC plugin available on a web server for download and build. Thanks. |
Beta Was this translation helpful? Give feedback.
-
@terjeio Thank you for jump starting and sound boarding this fix. I'll be in touch when I get grblHAL running, I can at least do some bench testing with it sans the otherwise mechanical CNC attached in the very near future, now that I'm back in Arduino IDE work flow mode. |
Beta Was this translation helpful? Give feedback.
-
@terjeio The original rotary fix in grblHAL did not work for me, and rather than debug it, based on obvious differences with the MR-grbl fix, I just ripped it and replaced it with the MR-grbl fix. Here is the compare report. Only file changed is planner.c. Thanks again for your help moving this to the eventual fix. |
Beta Was this translation helpful? Give feedback.
-
agreed on the config and N_AXIS limit, good point, using settings.steppers.is_rotational.mask is better.
|
Beta Was this translation helpful? Give feedback.
-
I am using a MKS TinyBee v1.0 ESP32 card with a 5 axis machine - three linear and two rotary. I select the Lightburn, Backlash and Rotary axis fix options only. I connect via USB only. The Rotary axis feature does not seem to compile using the Web Builder. I have tried three different compilations without success. I have used GrblHal successfully on a Red Mach3 card for 4 axes - three linear and one rotary. I am using iOSender to test the actions of the cards with Lathe option turned on. It is interesting that enabling Report in Inches for the DRO still requires the initial position settings to be entered in mm. Occasionally after running a GCode program in inches I can enter the starting coordinates in inches. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay reporting back. My SKR Pro V1.2 board was stuck in an
alarm state (10) that I couldn't figure out. It would not budge until I
changed several Grbl settings. All hard and soft limit settings are
disabled on my machine because I don't use them. I don't use Homing at all.
I think disabling the Probe location might have helped. Maybe it was a
power surge at some point, no idea. Reloading previously working Grbl
settings was not helpful. Resetting (software or hardware) or rebooting was
not helpful. It is unlocked and working now.
I have downloaded the Edge version of iOSender and run several programs on
it. I added the Parser State enable in the Grbl settings as suggested too.
Another interesting observation is the reporting behaviour for the C axis
in a type of GCode program I am running. The C axis should always be
turning in a Negative direction and physically it does. iOSender usually
reports it counting negatively but occasionally it will switch and report
the C as moving in a Positive direction (which it is not). I will attach
the GCode file for your interest.
Thanks again for a great program
…On Tue, May 14, 2024 at 1:55 AM Terje Io ***@***.***> wrote:
The Rotary axis feature does not seem to compile using the Web Builder. I
have tried three different compilations without success.
It fails at run-time? Asking since it compiles for me.
It is interesting that enabling Report in Inches for the DRO still
requires the initial position settings to be entered in mm. Occasionally
after running a GCode program in inches I can enter the starting
coordinates in inches.
I have modified the DRO behaviour in ioSender to always regard input as in
the mode set by $13 and convert as neccesary depending on G20/G21 status.
The perceived randomness in interpreting the values correctly is likely due
to the sender not keeping track of the current G20/G21 status unless the *Parser
state* option is enabled in the *Status report options* setting ($10). I
have uploaded new edge versions <https://www.io-engineering.com/downloads>
(p7) with this change.
—
Reply to this email directly, view it on GitHub
<#241 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM2XK2XU7OYCS6CEY4GFNGTZCG7PZAVCNFSM6AAAAAAT37NBIGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIMZQGAZTA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Looking to find,
Finding to know,
Knowing to learn,
Learning to grow, wiser.
JH
|
Beta Was this translation helpful? Give feedback.
-
Please do so I can check it out. |
Beta Was this translation helpful? Give feedback.
@terjeio
So I had so much fun with Arduino IDE, fixing MR-grbl, flashing mega2560, and testing (bench and with CNC machine), iterate; that I thought '...before I forget all that work flow detail I'll just do the same with grblHAL and Teensy'. So I bench tested (no CNC machine motion) the grblHAL fix on a Teensy, using UGS to feed the gcode, and I used timings and the UGS visualizer to verify grbl operation. It's working identical to MR-grbl.
The original rotary fix in grblHAL did not work for me, and rather than debug it, based on obvious differences with the MR-grbl fix, I just ripped it and replaced it with the MR-grbl fix. Here is the compare report. Only file changed is planner.c.
Tha…