Firmware request - Laser mode "frame"
-
For your reference here is one of the other recent discussions relating to this: https://forum.duet3d.com/topic/16138/idex-smart-tool-parking-position
-
@bot said in Firmware request - Laser mode "frame":
This was discussed in other threads for different purposes. It sounds like scanning the entire file for X/Y extents is not practical. The Z height is grabbed from a known location, at the end or beginning of the file, I think.
Max Z is found via a full scan in Duet RepRap firmware 2 and 3 both. Re: https://forum.duet3d.com/topic/15643/layer-count-in-dwc-progress-display?_=1589150657667
X and Y could easily be gathered along the way. Relative moves would be the only thing even a little "hard", and while those could be scanned, I doubt it would be necessary.
Therefore, it was very kind of lightburn to put bounds in a comment header, but it might be more universally applicable for Duet firmware to slightly enhance the scan it is already doing.
Of course, all this is really up to Dave...
-
Are you positive that the firmware scans the entire file, parsing every line of gcode? I was under the impression that it looks for a comment at the begin, or it scans the file backwards for the last non Extruder G1 command with a Z parameter, thereby skipping the majority of the file.
Is this incorrect?
-
@bot said in Firmware request - Laser mode "frame":
Are you positive that the firmware scans the entire file, parsing every line of gcode? I was under the impression that it looks for a comment at the begin, or it scans the file backwards for the last non Extruder G1 command with a Z parameter, thereby skipping the majority of the file.
Is this incorrect?
This is the module that does it: https://github.com/dc42/RepRapFirmware/blob/285b457264b9c852cc744ff258010986c8f401c4/src/Storage/FileInfoParser.cpp
You are correct.
At present, it scans the first 4K and the last ?4K? (or amount that will fit in the buffers that were used for the header scan). It does scan both of those chunks top down. It could easily be changed to scan the whole file if the controller is in laser mode.
Other controllers are doing this somehow, without a "hint" in a header.
-
Also, to be clear, it does not "parse". It is searching (scanning) for certain keywords. It does 'accumulate' some things, but it is much simpler than a parse.
For example, it simply ignores everything between G91 and a following G90.
-
Interesting, thanks. I think your idea of scanning the entire file if in laser mode is a good idea. Also, have a check for filesize and allow a reasonable limit to not make the machine work for an hour scanning the file.
-
I believe it could scan during upload. Modern CPUs are ridiculously fast when compared to any form of IO
-
The gcode header will be updated to
; LightBurn 0.9.11 ; GRBL device profile, current position ; Bounds: X-46 Y-38.11 to X46 Y38.11 G00 G17 G40 G21 G54 G91 M4 ; Cut @ 100 mm/sec, 20% power
Now its just a case of looking for the comment and adding a button or extra item to the right click menu for a job when the duet is in laser mode.
-
I'll add this as a work item for RRF 3.02. Cura already outputs the bounds of the job and RRF already has a comment parser, so I was planning to add this for Cura. Now I'll add it for Lightburn too.
-
@dc42 sorry to bring up this rather old topic, but since fast laser engraving is now possible this feature is an other must have for using RRF on laser cutters.
Please include this in the next release.
Many thank's!
-
@dc42 did you look in to the frame part. ? (bounds)
-