-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] movement too slow with G2/G3 #72
Comments
i tried with latest marlin bugfix 2.1.x, it works great. Your tcpc branch has many errors, in addition to the g2/g3 migration error, there is also the problem of declaring spindle in the adv.h file. I have downloaded the latest version on your tcpc branch, reconfigured it, I will test it in the next few days to give you feedback. i use chip mega 2560 board ramps 1.4 for 5 axis machine, has limit switches for all 5 axis. |
What do you mean with tcpc branch? Do you use my Marlin2ForPipetBot branch ? With that branch I can enable SPINDLE_FEATURE without problems. Please provide your configs (Configuration.h, Configuration.adv) and the exact error message. You can attach files by putting them in a .zip archive. Then add a new comment below. While editing the comment, click on the button "Paste, drop or click to add file" below the comment. |
These are the 3 files I have edited in there, In the pin ramps file, I edited the endstop part to add home points for axis a and c |
The change in commit d632ff3 was an attemt to fix an issue with erratic, fast moves when a G1 command involving only linear axes was followed by a G1 command without F parameter that involved rotational axes. The compiltion error when SPINDLE_FEATURE and ABORT_ON_SOFTWARE_ENDSTOP were enabled is now fixed in branch Marlin2ForPipetBot with commit 00e49de. |
I downloaded your latest fix, compiled it, no more errors appear at the moment. I will test it on my cnc router. |
PI3_chess-king.zip |
video.zip |
Am I annoying you by asking too many questions? I discovered an error that I cannot use g38 in the adv.h file if I use tcpc kinematics. I love your firmware, so I want to apply it to multi-axis CNC machines, or robotic arms. i know the marlin platform doesn't prioritize cnc work. If I bother you, then please try to fix the g2/g3 error. |
I appreciate any feedback. Please report as much issues as you can. I have a lack of time and I am not a "hardware guy", so I depend on testers and discussions like this to improve support for mills in Marlin. I will look into these bugs one at a time, whenever I have time to spare. |
I cherry-picked the two most recent change-sets affecting G2/G3 from MarlinFirmware/Marlin. One of the commits was called "Fix G2/G3 error in limit speed", so that might already fix the issue with G2/G3. Please test the latest Marlin2ForPipetBot branch from today Enble G38 with a non-cartesian machine at your own risk. It was never tested. Make sure that the rotational axes are in neutral (zero) position before you send G38: Probing currently can only work if your tool and probe is oriented in Z direction and when the table / printbed is oriented in the XY plane. Switch to tool 0 for probing. HOTEND_OFFSET for tool 0 must be 0. To compile with G38_PROBE_TARGET, remove the following 2 lines from file Marlin/src/inc/SanityCheck.h before compilation: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/Marlin/src/inc/SanityCheck.h#L2518-L2519
|
I just recompiled, and am excited to test this g2/g3 fix. We'll come back to this g38 topic once we're done with the g2/g3 fix. I will need some time to rebuild my multi-axis cnc router, with tests using high precision measuring tools. will then respond to you. |
Previously discussed topic, I don't know if it can help? |
what a mess, marlin bugfix 2.1.x branch cannot connect to cura software like your branch. |
video when testing code with Marlin-Marlin2ForPipetBot branch, the response from the software is too strange |
I can confirm that G2 is totaly broken in Marlin2ForPipetBot. On my machine, trajectories and feedrate are wrong, even when compiling for a cartesian machine (no special kinematics defined). It was working at some point,. Looks like some wrongly zero-initilized variable, but I cannot find it. The fr_mm_s varibale in the body of the function Planner::_populate_block shows correct values when executing G2 commands, so that is not the issue. I think the easiest and best way for me to fix this is to rebase onto current bugfix-2.1.x. Initially the new branch I plan to create will not support G49 or G43, it will allways be in TCPC mode. I have already rebased kinematics, quick_home and tool change. TOOLS and G10 is missing. It will take some weeks to have something ready for testing. Sorry for the inconvenience |
I feel a bit regretful if I have to go back to the beginning, the official branch on the marlin homepage, or the bugfix branch makes me not very confident about the part that creates pulses to make the axes move, the sound of the moving motors is not as smooth as the Marlin2ForPipetBot branch. your. |
DerAndere1. |
I am building an additional handle for a cnc machine by using an Arduino nano to generate rotation pulses for the x y z axes. communicates with the motherboard via the RX TX interface. Everything on the handle is fine, but connecting to the motherboard is not possible. I don't know if the mega 2560 chip allows multiple PORT RX TX ports. |
I have completed the handle job version from a free source code, the problem is that I am testing the rx tx communication with the MKS GEN L board, the firmware allows using additional port 2. However, the central controller My heart is building on a multi axis cnc router which is a mega 2560 kit and ramps. I haven't figured out how to solve this problem yet. haha |
a 2560 motherboard is an 8 bit version |
Looking at your compiler error list; |
I have connected handle job to board meg2560 + ramps via rx tx port. firmware marlin bugfix 2.1.x |
DerAndere1 |
DerAndere1 |
No progress yet. I was busy reviewing a friend's master thesis in my free time. Now that is done, but the upcoming weekends will be occupied with other duties. The code update is a major undertaking and will require a lot of efford. I can make only very slow progress after work. The fastest way to update is to search for the new features you need in all files of my fork and copy those changes to upstream marlin manually. rebasing with git will not be of great help because the commit history is not clean |
as a starting point, I have partially updated code in this branch: https://github.com/DerAndere1/Marlin/tree/penta_axis_kinematics . However, some pieces are still missing. Compile errors are expected at this stage. Also handling, of hotend offsets is certainly broken. It is really early untested WIP |
So you started rebuilding everything here before merging into the tcpc branch? I'm not in a hurry, I still use the main marlin to operate the cnc router. but I'm more excited about your branch, and I find using tcpc dynamics too complicated, which has its own benefits. Now that I know you're free, let's test out the added tools from a different angle. |
Current Marlin2ForPipetbot has diverged too much from Marlinfirmware/Marlin bugfix-2.1.x, so updating the code using git merge would be very cumbersome. That is why I sticked to my plan of creating the new branch. It may replace current Marlin2ForPipetbot as the default branch of my fork in the future. But as I said, https://github.com/DerAndere1/Marlin/tree/penta_axis_kinematics is not yet ready for hardware tests. If you manage to fix some of the remaining compile errors, you can speed things up by creating pull requests. |
do you mean this? I think we should eliminate this hassle by just adding an M6 cnc machine tool replacement code. At this point, tool 0 can be a probe, CNC milling cutter or 3D printer extruder. Subsequent tools will be taken at pre-set coordinates. At this time, z0 will default to the printing table surface or CNC table surface, measuring the deviation of the following tools through comparison with probe number 0 (tool number 0) Here is an example yt link for the problem |
Yes, HOTEND_OFFSET_X, HOTEND_OFFSET_Y, HOTEND_OFFSET_Z must be arrays with as many elements as you have tools. In Marlin, you can set hotend offsets at runtime using M218. In my fork I added an additional possibility to set the offsets for all tools (also non-extruder tools) with G10 as described in the Marlin2ForPipetBot README. When I have finished updating the new branch, Hotend offsets will be applied directly at toolchange. Regarding the YT video you sent: If you want to do the same with Marlin, you can set up tool 0 as a dummy extruder by setting |
It is great to see that you found a solution to calibrate the tool length. It helps to discuss these things with you, as you seem to have experience with industrial CNC machines. Your solution to introduce M6 is great. However, If I understand correctly, you use G29 to adjust for the tool length offset . This is not a solution for the general user. G29 is meant to be used for bed-leveling and only works properly on 3 axis machines. For a solution in Marlin that works with multi-axis machines, tool length offsets MUST be specified using the HOTEND_OFFSET_Z feature and M218 (or G10 L1 in my fork). Then, Marlin performs tool changes, including tool length compensation, directly when a tool change command is issued (Syntax: Like you, I found the toolchanging code in Marlin very limiting and proposed changes that improve the situation (MarlinFirmware#26956). In addition, I added the command In the coming weeks I will try to test the branch https://github.com/DerAndere1/Marlin/tree/penta_axis_kinematics. Once it works roughly as expected, I will let you know. In the meantime, I invite you to make yourself familiar with the HOTEND_OFFSET feature and the tool changing mechanisms supported by Marlin. To make use of my improved toolchange code which is intended to work with tool carousels or tool magazines, you will have to use the branch https://github.com/DerAndere1/Marlin/tree/penta_axis_kinematics, enable the option
Note: HOTEND_OFFSET_Z values, set with M218, are the opposite of tool length. E.g. if tool 0 length is 0mm and tool 1 length is 20 mm, you need `#define HOTEND_OFFSET_Z {0, -20} (set via G-code with M218 T1 Z-20) Unfortunatelly, the industry failed to compose a modern international Gcode standard that encompasses automtic tool changers, tool setters and multi-axis features. Marlin has its own method for calibrating the tool length offset, which is G425. I invite you to study my proposal (MarlinFirmware#26887) in depth. It is the best documentation of how to use that Gcode I can find so far. testing and feedback is highly appreciated. If you want to trigger G425 upon each toolchange, I suggest to experiment with the following features in Configuration.adv: If you want to share code, please copy the code block in text form and enclose it in tripple backticks (```) as described here: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks |
At that time, I used the old 2.0 firmware, then updated it to your tcpc branch to test, so the configuration.h file was just a command form.
g29 is not for measuring tool length, with g29 as I understand it recognizes where the Z0 points are compared to Zmax. I'm so tired of testing Marlin's features, they really have too many bugs, Marlin developers just add hundreds of things and then forget about basic dynamic testing. so I'm going to pause testing HOTEND. With the G425 command and the G10 part you rely on the linus_cnc platform, I feel that linus_cnc is based on the cnc machine platform of HAAS products manufactured in the US. I find it difficult to use compared to the T0M6 code of German or Japanese-made cnc machines. I think just letting the firmware understand what the distance from the Zmax point to the tool tip is and where the Oxyzabc 0 point is located is easy for building tcpc kinematics. I will discuss this tcpc part with you tomorrow. I plan to include it here https://github.com/DerAndere1/Marlin/tree/penta_axis_kinematics then send it back to you |
I force-pushed several changes to https://github.com/DerAndere1/Marlin/tree/penta_axis_kinematics in the last days. If you pull a fresh copy now, you should have a good starting point for your tests. I also found that the |
Here is the original m6 code file added and tested in practice and it works fine. I share this way because I actually don't know English, I almost don't understand the instructions in the links you sent to google translate. |
Now let's discuss more about rtcp before, tomorrow I will discuss more about g10l1 and g34h tool height offset. If the mechanical model is accurate, the machining center will be as shown. In reality, we have mechanical models that have error deviations with a tolerance of 1/1000, so Dy deviation is 0. We only have Dz deviation left, I have two ways to solve the problem. So what are the advantages of tcpc for regular users? That is to compensate for amateur-made Dy Dz deviations, it does not guarantee an error of 1/1000. What I want is that when selecting the tcpc option, reporting the offsets, the machine will automatically calculate and compensate for the offsets correctly when we enter the Gcode without having to call the G43.4 kinematic command code like this. That's why I think we have to use codes T and M6 to call the tool and measure the distance from the Zmax point to the tool's starting point. We don't need to declare the offset for each tool, because we measure will not be accurate. |
Thank you for sharing your thoughts and the code. It reminds that I have to test probing (G38, G38.2) and workspace offsets (G54, G55...) in the new branch. The sanity check that has to be removed to test PROBE_TARGET (G38.2) on multi-axis machines is here: Marlin/Marlin/src/inc/SanityCheck.h Lines 2570 to 2571 in db95270
|
I'm struggling with the delta machine, so now I have free time to carefully read the g10l1 syntax on linus. https://linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G10-L1 For example, with that syntax, I have to understand that tool number 1 is located 1.5 away from tool number 0. Knife number 0 is the knife with length equal to 0 and coincides with the center of Oxyz = 0 or the center of the machine (3D printer). This is completely reasonable for a 3D printer, however you can use the M6 code I shared to have the machine automatically recognize this offset through the touch-probes, all of which are connected to the Zmin pin. |
Is there any way to fix this warning "G38_PROBE_TARGET requires a Cartesian machine." ? I think all cnc machines, whether or not they have special kinematics, before the machine works with Gcode, the moving axes need to move to a position away from the working space. z is up to Zmax, xmin, ymin (can be xmax ymax). The A B C axes also need to be located parallel or perpendicular to the X Y Z axes. For example, with TRT kinematics, the inclined crane A B is parallel to the X Y axis. In the home position, the rotation axis A B must make the C axis parallel. parallel to axis C, rotary table surface C is perpendicular to axis C parallel to X Y axis. We can call the working point the center (0,0) of the ROTARY table C and Z0 is on the surface of the turntable. If we choose to save this point in G54 it will be G54 X0 Y0 Z0 A0 C0, if we choose to save it in G53 then the distance from the home point XY to this point needs to be measured with a standard center finder tool, However, it fails with the encoder over 20 pulses, I don't know why |
To remove the error "G38_PROBE_TARGET requires a Cartesian machine", you have to delete the two lines of code I mentioned in my last comment here: #72 (comment) In case you have EXTRUDERS 0, you also need this change which I just pushed a minute ago: |
Did you test the latest
bugfix-2.1.x
code?No, but I will test it now!
Bug Description
WITH SYNTAX G2/G3 X Y Z I J F THE AXIS DO MOVE BUT VERY SLOWLY
This potential bug was first reported by @printercnc here: #55 (comment)
Bug Timeline
unknown
Expected behavior
Feedrate should be accoring to parameter F
Actual behavior
Feedrate too slow
Steps to Reproduce
TODO
Version of Marlin Firmware
unknown
Printer model
custom
Electronics
unknown
Add-ons
unknown
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
TODO
The text was updated successfully, but these errors were encountered: