Get the bit index of a line in a gcode file
-
Hello everyone,
Configuration; rep rap 3.3 on duet2 (ooznest workbee)
After a power cut on a very long job, I'd like to restart job, but before the position stored on the resurect file, because the cuting tool was broken so no cut was made during the last (?) 5 minutes.
the resurect file gives me :
M26 S1484811 P0.474 X552.682 Y567.508
The file is 10 Mo, 197000 lines...So i'd like to manually reduce the restart index to go back in the file, then simulate to check my roughing layer. But the bit index has to correspond to the start of a command, so is it possible to get the bit index of a line in a gcode file?
Thank you
-
@gratgrat27 open the GCode file in Notepad++ and put the cursor at the start of the line you want to find the offset of. Then press control-G. In the box that pops up, click Offset, then it will show the character index of the cursor position.
-
@gratgrat27 Not sure how to do this in Windows, but on macOS using the BBEdit text editor, I can 'Go' to a specific byte (not bit, I think) in a file, which then shows the line number. I expect there's a way to do this in other text editors?
Searching for "convert byte index of file to line number" comes up with a few Python/Command prompt ways of doing it, but haven't tested these. Maybe it would be useful if RRF put the line number (even in comments) in resurrect.g, @dc42 ?
If you can get the line number, then you can use M110 to set a new line number a few moves before.
Ian
-
This post is deleted! -
Ok perfect I could restart from the desired index thank you two.
There are many things I don't get on M24 though, It is using the resurect file, but modifying the M26 line of the resurect file does not modify the resume index. I guess there are hidden actions at a deeper level!
Is there any documentation I can read to understand it better?Alex