Weird G-Code needed on my duet maestro wifi!
-
Hi!
Newbie here, upfront sorry if that is an easy one but I can't find any info in the forum or anywhere actually.
Long story made sort. I have a workbee CNC with a duet maestro wifi board and a 5W diodelaser cutter on it from OptLasers (no other cutter on the machine, just the laser unit).
After loads of problems to make it work we finally have it ready to cut but ... then there is a problem. When we send G-Code to the machine it works weirdly. The problem is with the codes G0 G1 G2 and G3. They accept as parameters S for the power of the tool (PWM 0-255) and F for speed (mm/min or whatever configured).
Now, normally you have to write these two params on the first line of code and it is resilient until the next change happens, like:
;(Header) M5 M307 H3 A-1 C-1 D-1 ; Disable Heater output on pin #8 HEATER3 M452 P3 R255 F1000 ; Enable Laser mode, on output 3 (HEATER3), with max PWM value 255, and a PWM frequency 1000 G0 X0 Y0 G90 ; absolute positions G21 ; metric M3 S0 ;(Header end) G0 X0.0000 Y17.5000 Z0.0000 F10000 S0 ;Used for the first time Laser ON Speed 10000 G3 X35.0000 I17.5000 J0.0000 ;Resilient G3 X0.0000 I-17.5000 J0.0000 ;Resilient G0 Y0.0000 F10000 S0 ; used second time , Laser OFF ;(Footer) M5 G90 G0 X0 Y0 ;(Footer end)
As you can see only the first G0 command has the F and S parameters and the following just use whatever was stated. This is the G-code all the generators I've tried do generate.
Now this is the code that works (just a simple circle, G1 and G2 act the same):
;(Header) M5 M307 H3 A-1 C-1 D-1 ; Disable Heater output on pin #8 HEATER3 M452 P3 R255 F1000 ; Enable Laser mode, on output 3 (HEATER3), with max PWM value 255, and a PWM frequency 1000 G0 X0 Y0 G90 ; absolute positions G21 ; metric M3 S0 ;(Header end) G0 X0.0000 Y17.5000 Z0.0000 F10000 S0 G3 X35.0000 I17.5000 J0.0000 F1000 S255 ; F & S on each and every line G3 X0.0000 I-17.5000 J0.0000 S255 G0 Y0.0000 F10000 S0 ;(Footer) M5 G90 G0 X0 Y0 ;(Footer end)
As you can see, here there is F and S parameter on most lines, I belive the relevant one is just the S but I'm not really sure of that.
So my question is, is that the normal behavior to be expected from Duet? why does it need that strange (to me) G-Code? or maybe it is not due to the board but something else in which case, any ideas how to make it work as it should?
Thanks for your attention, I hope to hear back soon from you guys.
If you need any other information from my do not hesitate to ask!
Pedro
-
I'm not a laser guy, but have you reviewed these?
-
You can set the laser as "sticky" using M452. So the gcode you have will then work
-
@Phaedrux Thanks mate, yeap, that was my first lecture but didn't help solve the problem, thanks for pointing
Pedro -
@jay_s_uk Yes! it worked this way, thank you so much! That completely solved the issue. Just had to update the header and voila!
Really, thank you mate,
Pedro
-
@perigonza said in Weird G-Code needed on my duet maestro wifi!:
that was my first lecture but didn't help solve the problem
That's odd, because I'm quite sure both mention using M452 for laser mode.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M452_Select_Laser_DeviceMode