How are files read?

When using CM does the program pick up the entire gcode/cc3d file first or does it read the file sequentially?

If read sequentially overwriting the file while in operation would be a bad idea.
If however, cm reads/snapshots the file when loaded, then one could make updates and save them while the machine is running.

I would recommend writing to a new file, w/ a new filename ā€” that way you can be absolutely certain that the updated/corrected file is being loaded.

Will,

I agree that unique file names leave less room for error and is the recommended workflow.

Still, I am curious if CM does a file read or a sequential read of the file.
Just curious.

Ron

On v7 CC the gcode in encrypted into the file. Cm reads the gcode and sends it a little at a time to the controller. The entire gcode file is not sent at once to the controller. As the controller buffer requests more data from the CM program it is sent sequentially but a little at a time. The GBRL controller does not have a lot of memory so it is just sent data as requested by the controller. That is why the usb connection must be connected the whole time you are using CM. When you get a static discharge and you get a disconnect very little of the gcode is actually inside the controller. Also if you accidentally disconnect the usb cable the Shapeoko does not run long before it stops.

Iā€™m pretty sure it caches the entire file, as it needs it for the preview. I would be surprised if it left the file on disk open. But you could test it easily enough. Open a file in CM, then open it in an editor. Windows will not let you open it if it is open in another program.

1 Like