Simulating test button on duet
-
Hi, on my old 80w laser, test button on power supply not working any more. Probably due to having an old 80w tube.
I have written a sample script to handle test fire, it is moving the nozzle 1 mm away and meanwhile test fire is being shot.
But I wonder, is there any way to simulate test fire without moving the nozzle. Because if laser beam hitting the nozzle with my script you can not identify.
Thank you
-
@aytact when you say you have written script to handle the test fire, what so you mean, a gcode macro or something else?
and by simulating the test fire, can you explain what the test fire actually is supposed to do?
-
@T3P3Tony while saying script, I mean gcode marcro.
Test fire or with the other name sending pulse is used while adjusting the mirror alignments. With sending test fire, you are checking are you hitting dead centre on 1st mirror, 2nd mirror and 3rd mirror. And as a last step, to test nozzle exit - for detecting are you hitting any side walls of nozzle or not.
-
@aytact ok, from a control system perspective, what is the test fire doing that you want to change. Why not have the gcode macro you wrote not move if you don't want it to move?
-
@aytact There's a few ways to do this, including defining a fake extruder, and moving that while firing the laser. However, I think the easiest way is to redefine the laser pin to an unused pin, then define the laser pin as a normal output pin, and then turn the laser on and off with M42. Then reverse the process to set it back to laser control. eg:
; macro for firing laser stationary M452 C"e1heat" R255 F100 S1 ; Set initial laser mode in config.g M452 C"fan2" R255 F100 S1 ; Set unused pin as dummy laser pin M950 P2 C"e1heat" Q100 ; Create output using laser pin M42 P2 S2 ; Fire laser at low power (range 0.0-1.0 or >1.0-255) G4 S1 ; Time for the laser to fire M42 P2 S0 ; Turn off laser M950 P2 C"nil" ; Clear pin M452 C"e1heat" R255 F100 S1 ; set laser pin
The advantage of this method is that the coordinate systems are maintained as it stays in laser mode, the laser can be fired without moving (so position doesn't change), and the laser can be fired for a specified amount of time at a specified power.
There is a Github issue to fix this with M3, but generally the workarounds seem to be sufficient, so M3 is not made more complicated.
Ian