Laser Mode RRF3.3 Resetting operation has been cancelled
EducatingSavvas last edited by Phaedrux
Hiya - just a quick observation while using laser mode in the latest RRF3.3 with the Opt Lasers CNC Adaptor. I'm trying to do a test laser engrave to workout the offset between my laser and router spindle. I've written some code to do this once I've positioned the laser at the correct height somewhere in the middle of my wasteboard.
M452 C"duex.fan7" R255 F5000 S0 ; Laser Mode G91 ; relative movement T0 ; Select Tool 0 G10 L1 P0 Z-3 ; subtract sacrificial material thickness M42 P1 S1 ; Enable #1 G1 X10 S120 ; mark x axis G1 X-5 Y-5 ; move to start of second pass G1 Y10 S120 ; mark y axis G1 Y-5 ; move laser head over centre of cross-mark M42 P1 S0 ; Disable #1 G10 L1 P0 Z0 ; subtract sacrificial material thickness G90 ; absolute movement
I'm finding that I the controller resets at: G10 X10 S120 and I get the message "operation has been cancelled" - Has this feature been disabled or am I missing something when using laser mode?
Many thanks, Savvas
@educatingsavvas please run M122 after the reset occurs and post the result here.
@dc42 Here is the M112 response from yesterday:
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC3 (2021-05-26 13:47:14) running on Duet WiFi 1.02 or later + DueX5 Board ID: 08DGM-917NK-F23T0-6JTD0-3SD6P-TGBJF Used output buffers: 8 of 24 (20 max) === RTOS === Static ram: 23876 Dynamic ram: 76264 of which 12 recycled Never used RAM 14264, free system stack 184 words Tasks: NETWORK(ready,11.4%,271) HEAT(delaying,0.0%,357) Move(notifyWait,0.1%,364) DUEX(notifyWait,0.0%,24) MAIN(running,81.1%,433) IDLE(ready,7.4%,29), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 00:00:10 ago, cause: software Last software reset at 2021-05-31 16:46, reason: StackOverflow, GCodes spinning, available RAM 10348, slot 0 Software reset code 0x4103 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f80e BFAR 0xe000ed38 SP 0x2001ffbc Task Freestk 7548 bad marker Stack: 20018970 200189a4 0045a9b9 00000000 20005c28 00000002 0045a045 2001897c 20005c28 00000000 00f00000 e000e000 c0000000 00000002 0045a181 00459efc 21000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 37.6, current 38.4, max 38.5 Supply voltage: min 23.8, current 23.9, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Driver 0: position 0, standstill, SG min/max not available Driver 1: position 0, standstill, SG min/max not available Driver 2: position 0, standstill, SG min/max not available Driver 3: position 0, standstill, SG min/max not available Driver 4: position 0, standstill, SG min/max not available Driver 5: position 0, standstill, SG min/max not available Driver 6: position 0, standstill, SG min/max not available Driver 7: position 0, standstill, SG min/max not available Driver 8: position 0, standstill, SG min/max not available Driver 9: position 0, standstill, SG min/max not available Driver 10: position 0 Driver 11: position 0 Date/time: 2021-05-31 16:47:17 Cache data hit count 390322934 Slowest loop: 6.22ms; fastest: 0.19ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 9 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 3.1ms, write time 5.7ms, max retries 0 === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === DueX === Read count 1, 5.69 reads/min === Network === Slowest loop: 18.90ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 - WiFi - Network state is active WiFi module is providing access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.26 WiFi MAC address 86:0d:8e:b3:b7:8c WiFi Vcc 3.36, reset reason Turned on by main processor WiFi flash size 4194304, free heap 24216 WiFi IP address 10.10.10.10 Connected clients 1 Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
@educatingsavvas thanks. I have located the problem. The laser control code doesn't work properly if the laser is connected to a fan port on the DueX. This isn't a new issue in firmware 3.3. It's not easy to fix, so we'll probably prohibit use of DueX fan ports for controlling lasers.
Can you connect the laser to a different port? You can use a heater port on either the Duet or the DueX, or a fan port on the Duet.
@dc42 Hiya - I changed over to using the bedheat terminals and the Duet controller is working correctly but I'm still having problems with the CNC laser adaptor (PLH3D) by Opt Lasers though.
If I connect the Bed- to ground and Bed Vin to PWMin on the laser adapter, it's LED does not power up - in fact the armed LED is very faintly on. What I am noticing is the bedheater pin on the Duet is pulled up to 24v - If I disconnect one of the safety external switches this drops to around 3v. If I disconnect the ground from the adaptor it performs as if correctly set up, but I am not able to trigger the laser once I'm in laser mode. I triple checked all my wiring but can't identify what is wrong.
@educatingsavvas can you link to the details of that laser adapter?
If the laser has a standard TTL-compatible input to modulate the power, then I suggest you connect it to one of the servo outputs on the DueX.
EducatingSavvas last edited by EducatingSavvas
@dc42 I swapped over to duex.pwm1 - but I'm still having the same problem. If ground is connected from the duex to pin 4 on the Laser Adaptor, and both external switches are normally closed the unit doesn't power up. I'm wondering if I need a pull down resistor? I any case I'll send this thread of Opt Lasers to see if they can contribute something too.
Edited: I'm noticing the E2_Heater is flickering while PWM1 is connect to the laser adapter. I am using the rest of heater terminals (E3 to E6) to control an LED strip.
@educatingsavvas do you need to do anything with the two Enable inputs?
PWM1 is shared with E2Heat on the DueX, so it's normal for the E2Heat LED to show the PWM state. if you can see it flickering then you must have chosen a low PWM frequency.
@dc42 The frequency is set to F1000 - the flickering is happening when the laser is not being used. Could the laser adapter be pulling the pin up? Should also hopefully get a response from Opt Lasers tomorrow.
@dc42 The enable inputs can be set to accept high, low or any type of inputs up to 24v, so I don't think these are the problem. While troubleshooting I've set these to accept any but my plans was to use a spare pin and M42 command in the tool number for additional failsafe. The adapter seems to be very versatile and the manual suggests quite a few ways to set up.
That said I'm still having problems that feel like grounding issues with the heat terminals on the duex - I am using PWM-1 for the laser and E3-E6 to control LED lights through the deomon.g file.
I wired the ground from pin 4 on the CNC adapter to the laser PSU ground - separate from the stepper PSU. I had my signal go to inverted TTL from the Duet PWM 1 header. The controller turns on as normal, and if I press the red arm button and close the external switch (which I leave normally open at start-up because I use a key) the arm LED turns on but the Laser LED just flickers briefly on and turns off. What I've noticed also on the duet is E3 and E4 lights are on when only E4 should be on at start up. Those along with E5 and E6 for used for LED's which signal machine state. The LED for heater 2 does not turn on - it seems the pin is being pulled down or drained to ground - but if I open the external switch on the cnc adapter the LED for E2 lights up. The seems like like a ground issue.
In any case I have received some additional troubleshooting guidance from Opt Lasers which I will go over on the weekend to identify if it is the laser head or adapter.