When converting SVG to Gcode, Is it possible for the openbuilds Cam software to somehow add M8/M9 and G4 gcode commands. I'm suspecting it should do via some sort of customization, but not sure where to start.... To give an example. If my acro wanted to draw a path.... - Move to position X100 Y100 - Run M8 (coolant on) - Run G4 P1 (dwell for 1 section) - Move to position X200 Y200 - Run M9 (coolant off) - Run G4 P1 then onto next path and so on. thanks.
Just to add.... Looks like CAM can do something like this, but cant see the toolpath which uses M8/M9, closest seems to be Pen Plotter which uses M3. Also, any way to have multiple documents open and create multiple Gcode files taking filenames from documents ?
why have you connected the laser to a coolant output? it should be connected to the PWM tool output so that M3/M5 can turn it on and off, but Sxxxx can set the power level why delay after the off command? in short, what you are trying to do is quite custom, so you are probably going to need a custom solution, something like a python or php script that inputs a standard Gcode file and transforms it into what you want.
Yeh, it does sound custom.....no I'm not using a laser, just need to operate an air feed, hence the coolant. Think you're right about a script though, I do manually edit Gcode files, and even using cut/paste/find etc, would be a lot easier with a simple script that takes a text file and replaces certain sections, just need to find one.
one does not 'find a script', one WRITES a script (-: in the Linux world the sed command can do it in 2 lines (generated by chatgpt, so subject to testing) sed -i '/M3 S1000/c\M8\nG4P1' filename sed -i '/M5/c\M9' filename and here is chatgpt's attempt at python Code: # Read the contents of the file with open('filename.txt', 'r') as file: lines = file.readlines() # Open the file in write mode to replace the lines with open('filename.txt', 'w') as file: for line in lines: if 'M3 S1000' in line.strip(): file.write('M8\nG4P1\n') elif 'M5' in line.strip(): file.write('M9\n') else: file.write(line)
Thanks David, if you're a programmer, you may write it, but I FOUND a mate who could write one...(-: Anyway change of tact, discovered svg2gcode which seems to do most of what I wanted anyway, for the moment at least
Regardless of what cam workflow you use, setting up machine to use m3 for tools and m8 for coolant is just smart. When driving any car do you expect the steering wheel to be the brake pedal? No. Follow standards.