Output pin floating after tool selection in laser mode
radiomodell last edited by
My board is a Duet2 Ethernet. Firmware is 3.01-RC11.
A solid state relais controls 220V sockets for spindel and laser power. It is configured to heater3 pin in laser and in CNC mode.
PWM signal for laser is configured to heater6 pin.
Here is the piece of code I use to switch to laser mode:
M453 C"nil" ; deselect CNC-Mode Pin. May be it was configured. M950 P0 C"exp.heater3" ; select heater 3 pin to control solid state relais. M42 P0 S255 -> laser power supply on, M42 P0 S0 laser off M42 P0 S0 ; set laser power off M452 C"exp.heater6" R500 S1 Q20000 ; laser PWM signal on heater6 pin, PWM frequency 20000Hz ; ; Tools M140 H-1 ; Heizbett aus M563 P0 D-1 H-1 ; Tool0 abwählen M563 P1 D-1 H-1 ; Tool1 abwählen M563 P0 S"Laser" ; Define tool 0 G10 P0 X-7 Y-45 Z-68.5 ; Set tool 0 axis offsets vs. Headposition -68.5 Z-Achse Nullpunkt (Laser Fokus) T0 ; Select Tool 0 (laser) M42 P0 S0 ; This line was added as workaround to avoid floating signal after selecting tool.
Lines 12 and 13 were added to set tool head offset.
After adding line 12 and 13 to configuration I noticed floating signal on heater3 pin from time to time.
As a workaround I redefined power state in line 14.
I would have expected that command in line 3 already sets signal on heater3.pin to zero level.
It seems that a tool change command makes heater3 pin floating.
Does anyone else see these effects?
DeltaCon last edited by
M452 C"exp.heater6" R500 S1 Q20000
Sorry to hijack your question, you obviously are a bit further on the path to a working laser than me...
I have RRF 3.01-RC11 loaded onto a Maestro board and am working towards a correct configuration for my dedicated laser CNC machine. I was looking into the M452 command, but the gcode wiki does not mention any parameters, so I was stuck on where to assign the laser pin to the tool. I thought i needed to look at the M563 command, because that defines the tools... Am I mistaken? What doe sthe R500 mean in you M452 command above?
radiomodell last edited by radiomodell
The laser PWM pin is assigned in M452 command. Use "C" parameter to select pin. A list of pin names on Maestro board you find here.
An example: M452 C"exp.pa21" Q2000 R255.
This command adds pin "exp.pa21" to laser PWM line. PWM frequency is set to 2000 by Q parameter. R parameter sets the value of max laser power in S parameter in G1 commands.
G1 X20 Y 40 S127 will move laser with half power.
Hope it is not too confusing.
Laser will only fire when moving by G1 command with the power set by S-parameter.
The laser power supply in my machine is controlled by "exp.heater3".
I change R parameter to adjust Laser power to different materials. It is faster than recreating G-code file with external software und upload to Duet.
DeltaCon last edited by
Thanks, this is splendid! I mostly revert to https://reprap.org/wiki/G-code#M452:_Select_Laser_Printer_Mode for gcode reference, but it seems incomplete when it comes to lasering. I can use your info. thanks a lot!