[3.3.0-rc2] M3-M5 gcode action
Hi, i'm helping a friend to update his CNC running Duet 2 wifi and he use an OptLaser on his CNC sometimes. The update from RRF2 was a bit rude as we also installed a duex 5 to be able to have 5 axis.
Now he tell me that before the update, he was able to control the laser to stay on with the M3 command and shut it with M5 but he no longer can.
Is it something i missed on the changelogs or a bug ?
So how can we keep the laser on to adjust the focus ?
Have a nice day.
jay_s_uk last edited by
@krohm-koala is the firmware set in Laser mode using M452?
@jay_s_uk yes, off-course
M452 C"!duex.e2" something like that, I haven't the whole line in head but it works well to engrave and everything, just the M3 that don't work as before.
Please share the actual config.g and results of M122 please.
@phaedrux Off-course, here it is, sorry for the delay.
; Configuration file for Duet ; executed by the firmware on start-up ; WorkBee Firmware Version 1.0.5 ; General preferences M452 C"!duex.e2heat" R255 F1000 S0 G90 ; Set absolute coordinates M453 ; Put the machine into CNC Mode ; Network M550 P"Atelier Vosgien CNC" ; Set machine name M552 S1 ; Enable network M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S0 M569 P2 S0 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M569 P4 S0 ; physical drive 4 goes forwards M569 P5 S0 M584 X0 Z3 A1 Y2:4 C5 ; set drive mapping M92 X640 Y640 Z800 A35.8 C8.8 ; Set steps per mm M350 X16 Y16 Z16 I1 A16 C16 ; Configure microstepping with interpolation M566 X150 Y150 Z250 A500 C500 ; Set maximum instantaneous speed changes (mm/min) M203 X2700 Y2700 Z2000 A6500 C6500 ; Set maximum speeds (mm/min) M201 X25 Y25 Z70 A250 C250 ; Set accelerations (mm/s^2) M906 X2200 Y2200 Z2000 I100 A2000 C2000 ; Set motor currents (mA) ; Axis Limits M208 X25 Y0 Z0 S1 ; Set axis minima M208 X645 Y1190 Z225 S0 ; Set axis maxima M208 A-3600:3600 C-3600:3600 ; Endstops M574 X2 P"!xstop" S1 M574 Y2 P"!ystop" S1 M574 Z2 P"!zstop" S1 M574 A0 C0 ; set active low and disabled endstops M558 P5 C"!^zprobe.in" A1 H2 F600 G31 P500 Z0 ; Tools ;M950 P0 C"exp.heater3" ;M563 P1 S"XYZ-Probe" ; Define XYZ Touch Probe Tool M563 P0 S"Spindle" M563 P1 S"Laser" ; Custom settings M575 P1 B57600 S1 ; Connection paneldue G92 A0 C0 ; prehome A et C M564 H0 ; Disable jog commands when not homed M140 H-1 ; Disable heated bed M911 S21.0 R23 P"G91 G1 Z3 F1000" ; Configure power loss resume M501 ; Load Stored Parameters T0
T1pre.g (enter laser mode)
M452 C"!duex.e2heat" R255 F1000 S0
18/05/2021, 16:36:36 M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC2 (2021-05-11 14:55:01) running on Duet WiFi 1.02 or later + DueX5 Board ID: 08DJM-9178L-L4MSN-6JKFL-3SJ6M-TB3QR Used output buffers: 3 of 24 (23 max) === RTOS === Static ram: 23876 Dynamic ram: 75836 of which 0 recycled Never used RAM 14704, free system stack 116 words Tasks: NETWORK(ready,14.0%,223) LASER(notifyWait,0.0%,70) HEAT(delaying,0.0%,386) Move(notifyWait,0.1%,305) DUEX(notifyWait,0.0%,24) MAIN(running,85.9%,420) IDLE(ready,0.0%,29), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 00:31:19 ago, cause: software Last software reset at 2021-05-18 16:05, reason: User, GCodes spinning, available RAM 11672, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 31.8, current 32.2, max 32.7 Supply voltage: min 23.7, current 23.8, max 24.2, 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 34398, standstill, SG min/max not available Driver 1: position 60263, standstill, SG min/max not available Driver 2: position 180000, 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-18 16:36:35 Cache data hit count 4294967295 Slowest loop: 5.32ms; fastest: 0.17ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 0.9ms, write time 0.0ms, max retries 0 === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 9215, completed moves 9215, 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 0, 0.00 reads/min === Network === Slowest loop: 201.01ms; fastest: 0.10ms 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 connected to access point Failed messages: pending 0, notready 0, noresp 1 WiFi firmware version 1.25 WiFi MAC address ec:fa:bc:2d:e6:96 WiFi Vcc 3.38, reset reason Turned on by main processor WiFi flash size 4194304, free heap 27056 WiFi IP address 192.168.137.149 WiFi signal strength -62dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
jay_s_uk last edited by
@krohm-koala this could be linked to this bug.
Maybe try the version dc42 has linked to?
@jay_s_uk we will try, i'll keep you in touch
@jay_s_uk So, now we have a message that said "M3 commande not supported in machine mode laser"
maybe it's not supported anymore but it was really usefull for focus adjustement..
M3 commands with S parameter to set the laser power should still work in Laser mode.
@dc42 it's what it does before, we don't know why it doesn't work anymore, i only work on the machine in remote, the most of the time my friend do everything and tells me the result ^^ since we are on the last version, it doesn't work anymore, with the message ^^
@krohm-koala I can confirm I am also experiencing a problem with this - I've enabled laser mode with:
M452 C"duex.fan7" R255 F5000 S0 ; Laser Mode
which I've connected to the input of a spare relay module and I am unable to switch the pin using M3 S255. If I enable laser mode with the pin inverted "!duex.fan7" I can hear the relay switching at the start of Laser mode but I still can't control it.
@educatingsavvas Have you tried to do a G1 Xxxx Sxxx to try if it turn on with a mouvement? it work for us, i assume it'll work for you. Even if it doesn't stay On, you can engrave
@krohm-koala Hiya - I swapped over to a spare heater terminal and generated a test code with the Opt Lasers g-code generator and I can see the red LED flickering on and off - for an image raster. Preventing the M3 command to turn on the laser is a safety feature so that makes sense now.
@educatingsavvas it make sense but, when you want to adjust your focus, it's a bit difficult during a mouvement ^^
hen you want to adjust your focus, it's a bit difficult duri
Does your laser have a Z-axis to adjust height? I'm planning for mine too - so eventually I'll do a test g-code that fine adjusts the laser height over multiple passes, and to than workout the offset from the top of the material being engraved/cut.