Raster Gcode
-
The speed of Gcode processing has been improved in firmware 3.2beta3 and beta 3.2. We have work planned to support sending data for several pixels in a single GCode command.
-
@Phaedrux said in Raster Gcode:
@infamous_panda said in Raster Gcode:
M566 X400.00 A400 ; set maximum instantaneous speed changes (mm/min)
M203 X4000.00 A80000 ; set maximum speeds (mm/min)
M201 X400.00 A400 ; set accelerations (mm/s^2)I'd say it's your low speed, jerk, and accel settings holding you back.
@infamous_panda said in Raster Gcode:
G1 F100000 S0
Your gcode tries to set a very high feed rate, but your X axis is limited to 4000mm/min.
I don't know what your kinematics are, so I can't venture what values you should use, but try doubling them and test and double again and test again if still too slow.
You also only have an X and A axis, which I find a little odd, but I don't know what machine this is.
You're also only setting a motor current for X but not A.
Yes this is setup on a test bed . We have an industrial laser with that is a dedicated rotary for cutting and marking cylinders. The A axis is an external motor. I trying to vet alternate controllers before taking off grbl-lpc.
The controller does not know the diameter of the workpiece so we have to enter very high speeds for small diameter rods to keep the same surface speed as larger diameter parts.
I multiplied the jerk and acceleration to 3600 and it's a little better but the the main problem is that the machine seems to want to stop at every "pixel" instead of moving continuously.
-
@dc42 said in Raster Gcode:
The speed of Gcode processing has been improved in firmware 3.2beta3 and beta 3.2. We have work planned to support sending data for several pixels in a single GCode command.
David,
Seems like the motion is pausing at every dot to be engraved. Is this just the nature of reprap at the moment. Smoothie and Grbl seem to keep the motion steady regardless if the laser is firing or not.
Maybe it's just the way my code is formatted?
Is the intent in the future to implement single line like smoothie "cluster". I think this would not work with the way our software generates the code.
-
I have tried a few other things with no improvement
Increased the speed in the Gcode from F100,000 to F100,000. Decreasing it to F1,000 is noticeably slower and still stops at each "dot" position.
Changed all the moves to G0 or G1 so there is no on/off switching for the laser (which is not physically connected anyway).
Turned off laser mode M452
Video below of the test bench.
https://photos.app.goo.gl/SiFXnkDEzYDFqumC9
Video of the GRBL-LPC setup. The rotary is driven by the same motor as in the bench only it's geared 5:1 (the steps/deg is identical for both setups)
https://photos.app.goo.gl/eEXaKqseQXFwaiLj6
Sample of our etch pattern
I assume this is just the way reprap is processing the file that it pauses the motion at each dot? We are moving this machine to a new facility and thought I would take the opportunity to upgrade the controller to Duet 3 hoping that we could push it even faster.
-
@infamous_panda said in Raster Gcode:
Increased the speed in the Gcode from F100,000 to F100,000.
Those are the same numbers. Did you also increase the limit in the config.g file? You mentioned increasing jerk and accel, but did you also raise the speed limit?
M203 X4000.00 A80000 ; set maximum speeds (mm/min)
If the limit here is set lower than what you request in the gcode file you won't be able to obtain what you request in the gcode file. So set the M203 limit very high so that you can actually control the feed rate in your gcode file.
I multiplied the jerk and acceleration to 3600
This is still fairly low. Many 3D printers are using accel of greater than 6000 already.
-
@Phaedrux said in Raster Gcode:
@infamous_panda said in Raster Gcode:
Increased the speed in the Gcode from F100,000 to F100,000.
Those are the same numbers. Did you also increase the limit in the config.g file? You mentioned increasing jerk and accel, but did you also raise the speed limit?
M203 X4000.00 A80000 ; set maximum speeds (mm/min)
If the limit here is set lower than what you request in the gcode file you won't be able to obtain what you request in the gcode file. So set the M203 limit very high so that you can actually control the feed rate in your gcode file.
I multiplied the jerk and acceleration to 3600
This is still fairly low. Many 3D printers are using accel of greater than 6000 already.
Yes sorry I meant to type F1,000,000
I did try increasing the both the X and A max speed to 100,000 in the config without any benefit. The way our programs move the X axis actually moves very slowly.
I will try higher jerk and accel, however I do not think this is the issue since even at lower speeds (F1000) the motion duet produces seems to purposely start and stop at each "dot" when the intent is to keep the movement constant.
Another issue with increasing these values is that the moving parts of our setup is in excess of 30kg or so. That's why our x moves slowly and we ramp up our speed on the A axis and need to keep it constant throughout the etch.
-
I understand. Hopefully the improvements mentioned by DC42 will help.
I assume you're using RRF3 at the moment? It may be worth trying the new beta releases.
-
Yes sorry I was not very specific. 3.2 beta 3 just release 4 days ago. I assumed RRF would not be as optimized for this as GRBL but hoping that the faster Duet 3 could make up for it. But likely not since this is looking like a firmware issue.
-
Just a quick question before I give up on this.
Default GRBL
Every time a spindle state M3 M4 M5 or spindle speed Sxxx is altered, Grbl would come to a stop, allow the spindle to change, and then continue.
Grbl's laser mode
-
Prevents unnecessary stops whenever possible
-
Adds a new dynamic laser power mode that automagically scales power based on current speed related to programmed rate.
In Reprap laser mode seems to apply only item #2. Which is why I and some others I have found in my search are experiencing a stutter in our movements. One example below.
https://forum.duet3d.com/topic/12785/duet-2-wifi-performance-for-laser-raster-printing/6https://www.youtube.com/watch?v=ePAcdSWWiTc&feature=youtu.be&ab_channel=PawelSwitalski
Would it be possible or make a difference at all if I were to somehow map the laser firing to the extruder motors pins?
-
-
@infamous_panda , the code you posted earlier did not include any M3 commands, except for the one at the beginning (which RRF does not need). Why then are you saying that coming to a stop when M3 is executed is a problem?
Using the S parameter on G1 commands is the recommended way of driving a laser with RepRapFirmware. Changes in the S parameter do not cause the system to wait for movement to stop.
-
Hi @dc42
"M3 M4 M5 or spindle speed Sxxx is altered"
My gcode changes the S parameter in this case to full on and full off at every dot. M3 turns on the laser initially. I am trying to explain sort out why the my movement is starting and stopping throughout the etch. This happens regardless even if I slow down the program so theoretically it's not the processing power that's the issue.
-
I have also tried changing all the G0 moves to G1 with no effect.
-
@infamous_panda, send me a sample file and I will try it on one of my machines.
-
@dc42 I very much appreciate this. Please see attached.
The code has a cut sequence at the beginning and end which seem to work fine. The high speed etching in the main body is what gives me trouble.
I left in M7 M8 M9 M3 M4 M5 commands. I know Reprap does not support all of these but they would be easy workarounds. What we would have difficulty in doing is changing the way our software generates the spiral etch.
For reference this file produces a 20mm diameter short 170mm long rod. We have files that produce 100mm diameter 2000mm long tubes.
-
Thanks for your file. It may be a few days before I get to try it as I have some other work to finish first.
-
@dc42 I accept that gratefully. Thanks!
-
Not sure if you had a chance to run the code we provided yet but if not attached is a different file we put together to "stress test" a few other boards and platforms. If your still willing can you test this file instead so we have an apples to apples comparison.
-
OK, will do.
-
In your speed test file, is A a rotary axes, and is the amount measured in degrees?
Please post your config.g file. [EDIT: I just found that in your earlier post.]
-
I have taken a look at your speed test file and config.g, and I can see some problems:
- RRF will not recognise the F100000 line. I suggest you change it to G1 F100000 as I did for my tests.
- X is alternately moving by a small amount and stationary. This means that the speed will be entirely dependent on the X axis jerk and acceleration settings. Your acceleration and jerk settings are low.
- The A speed is constantly changing, because you are alternately moving just A and then X and A. So the A acceleration and jerk matter too.
My current internal build of RRF for Duet WiFi completes simulation of your file in 1 min 36 seconds, and predicts execution time of 2h 20min. This confirms that the Duet is processing the file quickly but your acceleration and jerk settings cause it to execute slowly.
A few more data points:
- Changing the jerk policy from 0 to 1 reduces the predicted execution time to 1h 1m
- Then increasing the allowed X and A jerk to 1000, and increasing X and A acceleration to 3000 reduces the predicted time to 21min
Your test file is not representative of the engraving you are trying to do. I suggest you generate up a test file that only moves X once per revolution of A.