I’m planning to use the J-tech no-z post processor for my laser. I looked it over and there is no $32=1 (Laser Mode) in that post processor. Can I treat “$32=1” as gcode and enter it into the startup section?
If that works, I could add $32=0 to my normal post-processor. That way I can never worry about setting it or resetting it. I can’t check the machine directly at the moment since it’s torn apart with the spindle upgrade project.
@wb9tpg I’m interested in this as well, i can’t seem to figure out where to put the $32 = 1…i get a syntax error where ever i put it…where did you end up putting it?
@neilferreri will probably chime in, but in the meantime could you try with the following format, just for the sake of experimenting (I don’t have access to VCarve just now but will try myself later today)
@rub0t I’m not near a machine with any way to test, but the issue here most likely lies with Motion. $32=1 should work (I’d recommend adding a G4P0.25 dwell after that). Motion intercepts all commands and acts on them. There is no “syntax error” in GRBL. Try a different sender if you want to do this, or just send the Laser Mode command before the job.
In the CM UI, Midi tab, for ‘directly sending GRBL’ you can prefix your command with a slash ‘/’. I wonder if it would ‘not interpret’ the $31= command if similarly prefixed in the post-processor output file?
But then indeed Carbide Motion rejects the G-code file upon loading, reporting a Syntax error on the $32=1 line.
I then loaded the same G-code file in CNCjs, and it worked correctly (apart from the fact it displayed a weird “error 22: feedrate not set”, but it did not seem to have any impact, the air cut went fine and I was able to verify that $32 was indeed set to 1)
Conclusion: it seems CM does not allow for GRBL $ params to be modified from a G-code file.
I also tested adding the forward slash (which works when using the MDI tab, to tell CM to send the command straight through to GRBL), and the same Syntax Error is reported.
Not sure whether this behavior in CM is on purpose or not, maybe @robgrz can comment.
@Julien If you have a chance, try adding a short dwell (G4P0.2) after the $32 command. The eeprom write takes time, albeit microseconds, and that can cause weird errors like what you saw.
Also, make sure you remember to set $32 back to zero or your spindle will do some weird stuff next carve.
Just tried putting $32=1 info my file, followed by the dwell you mentioned. CM complained of a syntax error, and I had to take the $32=1 back out again. I next typed /$32=1 into the MDI section, which did not complain. But after I started the run, CM turned the laser on, then popped up a dialog waiting for me to set the RPM to 255.
So is $32=1 working at all?
CM does not like/support $ params modification from the Gcode file. On the other hand it won’t know if you manually changed $32, so that should stick (and then of course you have to manually switch it back to use the CNC mode again).
Two things here:
if you check the “has spindle control” box in CM settings, you should not get the RPM prompts anymore.
I suppose you set RPM in your design file to 255 as a mean to enable the laser at full power, which only make sense if your $30 is set at 255. With the default value of 1000, it will activate the laser at 1/4th the max power.
Then again as Neil said, few people use CM for lasering. Consider buying LightBurn software which is dedicated to using lasers, so there will be fewer hoops to jump through.
To be more precise, what he said what that they intentionally stayed away from selling laser modules (my interpretation : because the liability risk is not worth the extra business). This is subtly different from “you can’t use CM for a laser job”, but it does mean that there will probably not be much effort put in making CM more laser-friendly (again, my thoughts, I don’t know that for a fact)