Skip to content
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

Open
1 task done
DerAndere1 opened this issue Apr 21, 2024 · 29 comments
Open
1 task done

[BUG] movement too slow with G2/G3 #72

DerAndere1 opened this issue Apr 21, 2024 · 29 comments

Comments

@DerAndere1
Copy link
Owner

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

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

TODO

@printercnc
Copy link

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.

@DerAndere1
Copy link
Owner Author

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.

@printercnc
Copy link

yes, I use the Marlin2ForPipetBot branch, which is the branch with tcpc kinematics
Screenshot 2024-04-23 113629

@printercnc
Copy link

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
FILE_CONFIG.zip

@printercnc
Copy link

printercnc commented Apr 23, 2024

two weeks ago, did you edit this issue, I don't know if it has anything to do with this g2/g3 x y z i j f move syntax (eg G3 F1800. I-54.51 J212.302 X93.326 Y-198.328) . I downloaded and reconfigured but haven't had time to test the motion on my cnc router.
Screenshot 2024-04-23 120221

@DerAndere1
Copy link
Owner Author

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.

@printercnc
Copy link

I downloaded your latest fix, compiled it, no more errors appear at the moment. I will test it on my cnc router.
I plan to make a handle through the Joystick port
on board ramps. Do you think it is necessary to add a separate handle to the firmware?

@printercnc
Copy link

PI3_chess-king.zip
This is the gcode sample I used to test the g2/g3 command. on the marlin_bgfix2.1.x branch works perfectly fine. On the Marlin2ForPipetBot tcpc branch they move but very slowly. I will send you the video as soon as possible.

@printercnc
Copy link

video.zip
When the axes move, the g0/g1 commands move very smoothly. When the g3 command comes to interpolate the arc, the two x y axes move slowly. I like your firmware because the axis movements are very smooth compared to the marlin_bugfix firmware.

@printercnc
Copy link

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.

@DerAndere1
Copy link
Owner Author

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.

@DerAndere1
Copy link
Owner Author

DerAndere1 commented Apr 24, 2024

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

  #elif !IS_CARTESIAN
    #error "G38_PROBE_TARGET requires a Cartesian machine."

@printercnc
Copy link

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.

@printercnc
Copy link

1
2
The error is still not fixed, I took two pictures
Web comparisons and latest downloads. I'm confused and not sure if the download has to be updated.

@printercnc
Copy link

Previously discussed topic, I don't know if it can help?
MarlinFirmware#17348

@printercnc
Copy link

what a mess, marlin bugfix 2.1.x branch cannot connect to cura software like your branch.
g2/g3 motion video of marlin_bugfix2.1 branch
Uploading 1.zip…

@printercnc
Copy link

video when testing code with Marlin-Marlin2ForPipetBot branch, the response from the software is too strange
Uploading 2.zip…

@DerAndere1
Copy link
Owner Author

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

@printercnc
Copy link

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.
I'm not sure what effect tcpc or rtcp kinematics have, although on the 5-axis cnc machines I use they all have rtcp. The cam software I use all has the perfect gcode export feature. If we talk about compensation for misalignment on the spindle joints, adjusting the mechanical mechanism for accuracy will be much easier and better. With a controler for amateurs, I think what is needed on a device is the probe to find the xyz zero coordinate point. We don't always have to process with 5 axes, most of the time it will be 3 axes. Through that, as I mentioned the g38 issue in the adv.h file the other day, it is a perfect conversion feature for CNC 3D printing or CNC milling jobs. I'm on holiday, I brought a small test kit, eagerly waiting for you to fix the error to test, it's a pity to have to wait so long, haha

@HendrikJan-5D
Copy link

HendrikJan-5D commented May 4, 2024

DerAndere1.
Did you see my message last week on GitLab ?

@printercnc
Copy link

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.
handle_video.zip

@printercnc
Copy link

printercnc commented May 7, 2024

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
test.zip

@printercnc
Copy link

printercnc commented May 7, 2024

I am trying to declare additional port 2 for board ramps, leaving two pins 16 17 for rx tx communication blank. Committing from marlin 2.x will allow the use of two ports, which I think is still not perfect.

Screenshot 2024-05-07 185953

@HendrikJan-5D
Copy link

a 2560 motherboard is an 8 bit version
i think you need to go to a 32 bit version for 2 usb connections.
See https://bigtree-tech.com/

@printercnc
Copy link

I have an MKS GEN L board using a 32 bit mega2560au chip, maybe I will test it, that is a temporary solution. with a mega 2560 8bit development kit that also has 3 ports for rx tx communication. pin 16 pin 17 is used for LCD control. Pin 18 pin 19 is used for z axis endstop. In addition, there are empty pins for i2c and spi communication. When I use the i2c pins to connect to the lcd screen, there will be free port rx tx pin 16 pin 17. Therefore, it will have to be used for two SERIAL_PORT, here it is probably an error in the compiler functions.
106ef736-5390-11e6-865d-573262168e94

@HendrikJan-5D
Copy link

Looking at your compiler error list;
((#error “serial port 2 pin D16 and/or D17 conflicts with another pin on the board ))
Seems you have a problem in the pins file of your board.
D16 and D17 are in use there for another function
You have to clear and modify those first to use them as serial ports.

@printercnc
Copy link

That's right, however I can't figure out which lines are talking about the current function of those pins. 8bit chips cannot expand SERIAL_PORT without extensive firmware intervention. After carefully comparing ramps and MKS GEN L, I realized that my handle jod does not need the SERIAL_PORT extension. The above two types are the same, MKS GEN L is just RAMPS expanded with IO. I just need to check where the rx tx pin on the AUX1 of the MKS GEN L is connected to the MEGA 2560 chip. After that, just connect to RAMPS and you will be able to use it.
tải xuống

@printercnc
Copy link

I have connected handle job to board meg2560 + ramps via rx tx port. firmware marlin bugfix 2.1.x
I will use this to test DerAndere1's tcpc branch debugging
.zip

@printercnc
Copy link

DerAndere1
I discovered another error on your tcpc branch, the bugfix branch allows step to run at G0 max speed of 4500 mm/min, your branch is only 1000mm/min.
Board MKS GEN L 1.0
AXIS_STEPS_PER_UNIT 160
DRIVE A4988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants