Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Weird Laser Mode

    Scheduled Pinned Locked Moved
    Laser Cutters
    6
    42
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      Does that make a difference to your attempt?

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 0
      • pauleddundefined
        pauledd
        last edited by

        No, the command was just there IN CASE I still have the laser mode enabled.
        If laser mode was not enabled the wrong command would have no effect anyway...

        ----- human being without Windows™ ------

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator @pauledd
          last edited by

          @pauledd said in Weird Laser Mode:

          after setting "M106 P2 S1"

          I wonder if this is because S1 is the same as S255?

          S1 or S0 for on and off, or S0.1 to S1 in decimal values to act as a percentage, or 2-255 as an 8bit value.

          I wonder if it would behave differently if it was configured as a servo i/o pin and controlled with M42 instead.

          https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M42_Switch_I_O_pin

          Z-Bot CoreXY Build | Thingiverse Profile

          pauleddundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
          • pauleddundefined
            pauledd @Phaedrux
            last edited by

            @Phaedrux said in Weird Laser Mode:

            I wonder if it would behave differently if it was configured as a servo i/o pin and controlled with M42 instead.

            That is definitely worth a try, I'll test that tomorrow, thanks.

            ----- human being without Windows™ ------

            1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator @pauledd
              last edited by

              @pauledd said in Weird Laser Mode:

              exp.heater3

              I'm not sure if it would matter either but there are other expansion heater pins to try. I don't know if all are created equal.

              Z-Bot CoreXY Build | Thingiverse Profile

              pauleddundefined 1 Reply Last reply Reply Quote 0
              • pauleddundefined
                pauledd
                last edited by pauledd

                I tried exp.heater3 as servo pin and I detached my laser inverter logic just to be sure this is not another error source...

                from a fresh booted Duet...

                ; initial voltage 3.276V on exp.heater3
                M950 P0 C"exp.heater3" Q1000 ; voltage now at 0.0005V
                M42 P0 S1 ; 3.310V  ??? WTF
                M42 P0 S2 ; 0.0274V check!
                M42 P0 S3 ; 0.0402V check!
                M42 P0 S4 ; 0.0529V check!
                M42 P0 S5 ; 0.0658V check!
                M42 P0 S128 ; 1.656V check!
                M42 P0 S253 ; 3.274V check!
                M42 P0 S254 ; 3.287V check!
                M42 P0 S255 ; 3.302V check!
                

                So, except M42 P0 S1, which is exactly what I want... everything else seems to work.
                The same strange behavior happens if I reverse the logic:

                M950 P0 C"!exp.heater3" Q1000 ; voltage now at 3.302V
                M42 P0 S1 ; 0.0005V  ??? WTF
                M42 P0 S2 ; 3.274V check!
                M42 P0 S3 ; 3.262V check!
                M42 P0 S4 ; 3.248V  check!
                M42 P0 S5 ; 3.240V check!
                M42 P0 S128 ; 1.646V check!
                M42 P0 S253 ; 0.0267V check!
                M42 P0 S254 ; 0.0138V check!
                M42 P0 S255 ; 0.0005V check!
                

                ----- human being without Windows™ ------

                1 Reply Last reply Reply Quote 0
                • pauleddundefined
                  pauledd @Phaedrux
                  last edited by

                  @Phaedrux said in Weird Laser Mode:

                  I'm not sure if it would matter either but there are other expansion heater pins to try. I don't know if all are created equal.

                  The problem is, my laser pcb pinout has been designed according to
                  alt text
                  which involves exp.heater3

                  ----- human being without Windows™ ------

                  1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator @Phaedrux
                    last edited by

                    @Phaedrux said in Weird Laser Mode:

                    S1 or S0 for on and off, or S0.1 to S1.0 in decimal values to act as a percentage

                    It's exactly as I said. S1 is full on. As you see from your voltage?

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • pauleddundefined
                      pauledd
                      last edited by pauledd

                      Thanks, I again missed that, so I will mark S1 & S0 as NOT PWM in my brain. 😬
                      I was irritated because I worked with the M3 S1 command over a year and that did not set the laser to FULL power, insead it used 1/255th PWM...

                      So then PWM value 2 is the lowest possible setting for my laser... I think I can live with that.

                      ----- human being without Windows™ ------

                      Phaedruxundefined dc42undefined 2 Replies Last reply Reply Quote 1
                      • Phaedruxundefined
                        Phaedrux Moderator @pauledd
                        last edited by

                        @pauledd said in Weird Laser Mode:

                        So then PWM value 2 is the lowest possible setting for my laser... I think I can live with that.

                        Possibly. I'm not sure how many decimal places you could get. Try 0.01.

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • g0rgundefined
                          g0rg
                          last edited by

                          my laser mode worked correctly just once until i moved it to the enclosure 😣
                          I dont understand where or what could i missed.

                          Now the laser is always ON with 3.6 volt on heater3 pin

                          btw, i use the same added small board and my version is rrf3 on duet2 wifi.
                          here is my config.g

                          ; Configuration file for Duet
                          ; executed by the firmware on start-up
                          ; WorkBee Firmware Version 1.0.7
                          
                          ; Configure Connection - ENABLE ONLY ONE OF THE BELOW THREE
                          ;M552 S1 ; Enable Wifi Network
                          ;M552 S2 ; Enable Access Point Mode
                          ;M552 S1 P192.168.2.14 ; Enable Ethernet - Change IP Address to suit
                          M552 S1 ;
                          ;	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
                          
                          ; DO NOT CHANGE ANY OF SETTINGS BELOW
                          ; TO MAKE A CHANGE, COPY THE LINE OF CODE, PASTE IT INTO customconfig.g. THE CHANGE CAN THEN BE MADE IN customconfig.g
                          ; ANY ADDITIONAL SETTINGS SHOULD BE PUT IN customconfig.g
                          
                          
                          ; General preferences
                          ;M453 				; Put the machine into CNC Modes
                          M452 C"!exp.heater3" R255 F9000	S1	; enable LASER mode
                          
                          M575 P1 S1 B57600 ; PanelDue for RRF3
                          M550 PWorkBee CNC Machine 	; Set machine name
                          G90 				; Set absolute coordinates
                          
                          
                          ; Network
                          M586 P0 S1 			; Enable HTTP
                          M586 P1 S0 			; Disable FTP
                          M586 P2 S0 			; Disable Telnet
                          
                          
                          
                          ; Configure Drives
                          M569 P0 S0 			; Drive 0 goes forwards
                          M569 P1 S0 			; Drive 1 goes forwards
                          M569 P2 S0 			; Drive 2 goes forwards
                          M569 P3 S0 			; Drive 3 goes forwards                        
                          M584 X0 Y1:3 Z4 U3 P3 		; Apply drive mapping to axes
                          
                          
                          ; Configure Axes
                          M92 X400 Y400 Z400 U400 	; Set steps per mm
                          M350 X16 Y16 Z16 U16 I1 	; Configure microstepping
                          M566 X100 Y1000 Z1000 U1000 	; Set maximum instantaneous speed changes (mm/min)
                          M203 X4000 Y4000 Z2000 U4000	; Set maximum speeds (mm/min)
                          M201 X120 Y120 Z150 U120	; Set accelerations (mm/s^2)
                          M906 X2100 Y2100 Z2100 U2100 I50 ; Set motor currents (mA)
                          
                          
                          ; Configure Axis Limits
                          M208 X0 Y0 Z0 S1		; Set axis minima
                          M208 X1300 Y1270 Z85 U1270 S0 	; Set axis maxima
                          
                          
                          
                          ; Configure Endstops	
                          M574 X2 S1 P"xstop"   ; X min active high endstop switch
                          M574 Y1 S1 P"ystop"   ; Y min active high endstop switch
                          M574 Z2 S1 P"zstop"   ; Z min active high endstop switch
                          M574 U1 S1 P"e0stop"  ; U max active high endstop switch	 
                          			 
                          ; Other Settings
                          M140 H-1 			; Disable heated bed
                          M564 S1 H0 			; Disable jog commands when not homed
                          M911 S21.0 R23 P"G91 G1 Z3 F1000" ; Configure power loss resume
                          M501 				; Load Stored Parameters 
                          M98 Pcustomconfig.g 		; Execute custom config settings
                          

                          any idea ?

                          Duet 2 wifi , Ooznest Worbee CNC 1510 , Neje Laser 20w. Ruida 100w Co2 Laser 6090. Some homemade laser cnc grbl 1515.

                          pauleddundefined 1 Reply Last reply Reply Quote 0
                          • pauleddundefined
                            pauledd @g0rg
                            last edited by

                            @g0rg Can you double check that you attached the small board to the correct pins?
                            I had the same case were the laser was always on until I noticed that the pin-socket that goes into duets expansion header was attached with a offset by one pin...

                            ----- human being without Windows™ ------

                            g0rgundefined 1 Reply Last reply Reply Quote 1
                            • g0rgundefined
                              g0rg @pauledd
                              last edited by

                              @pauledd From my understanding:
                              if i remove the small board, is it normal to measure 3.7v between gnd and pin8 ?

                              That's actually what i have , with or without the board pinned in place.Screenshot_7.jpg

                              Duet 2 wifi , Ooznest Worbee CNC 1510 , Neje Laser 20w. Ruida 100w Co2 Laser 6090. Some homemade laser cnc grbl 1515.

                              pauleddundefined dc42undefined 2 Replies Last reply Reply Quote 0
                              • dc42undefined
                                dc42 administrators @pauledd
                                last edited by

                                @pauledd said in Weird Laser Mode:

                                So then PWM value 2 is the lowest possible setting for my laser... I think I can live with that.

                                If you are using 255 as the maximum then the lowest is about 1.001. If you use 1.0 as the maximum then you can go as low as you like, within the limits of the resolution of the PWM generator.

                                Duet WiFi hardware designer and firmware engineer
                                Please do not ask me for Duet support via PM or email, use the forum
                                http://www.escher3d.com, https://miscsolutions.wordpress.com

                                1 Reply Last reply Reply Quote 2
                                • pauleddundefined
                                  pauledd @g0rg
                                  last edited by

                                  @g0rg said in Weird Laser Mode:

                                  if i remove the small board, is it normal to measure 3.7v between gnd and pin8 ?

                                  Well, I would expect 3.3V, I dont know why you read 3.7V ?
                                  Yes on the bare pin I would expect High level right after boot, and the attached board should invert the logic to 0V until you issue your laser commands.

                                  Thats the problem I had:
                                  Peek 2020-11-27 18-25.gif

                                  ----- human being without Windows™ ------

                                  g0rgundefined 1 Reply Last reply Reply Quote 1
                                  • dc42undefined
                                    dc42 administrators @g0rg
                                    last edited by

                                    @g0rg said in Weird Laser Mode:

                                    if i remove the small board, is it normal to measure 3.7v between gnd and pin8 ?

                                    It should be 3.3V.

                                    Duet WiFi hardware designer and firmware engineer
                                    Please do not ask me for Duet support via PM or email, use the forum
                                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                                    1 Reply Last reply Reply Quote 0
                                    • g0rgundefined
                                      g0rg @pauledd
                                      last edited by

                                      @pauledd You got it ! Same idiot issue. I put the board on the right pins and it works now.
                                      Sometimes more than 2 eyes and a good reactive forum helps.
                                      Thank you very much guys !

                                      Duet 2 wifi , Ooznest Worbee CNC 1510 , Neje Laser 20w. Ruida 100w Co2 Laser 6090. Some homemade laser cnc grbl 1515.

                                      1 Reply Last reply Reply Quote 2
                                      • FelixHundefined
                                        FelixH
                                        last edited by

                                        So @pauledd how do you focus your laser now?

                                        I need to do some engravings today and I haven‘t used the laser since I updated the RRF to 3.3, so I fear I will have some troubles there.

                                        I understand the safety issue behind, but I used to use the laser at 1% power to align it with my work and also focus. I don‘t understand how I am supposed to do it now if the laser can only be ON while moving…

                                        Phaedruxundefined 1 Reply Last reply Reply Quote 0
                                        • Phaedruxundefined
                                          Phaedrux Moderator @FelixH
                                          last edited by

                                          @felixh said in Weird Laser Mode:

                                          I don‘t understand how I am supposed to do it now if the laser can only be ON while moving…

                                          I'm not sure either, but maybe a work around could be to start a move with the laser on with a very very slow feed rate so that it barely actually moves?

                                          Z-Bot CoreXY Build | Thingiverse Profile

                                          FelixHundefined 1 Reply Last reply Reply Quote 0
                                          • FelixHundefined
                                            FelixH @Phaedrux
                                            last edited by

                                            @phaedrux following the original poster's suggestion, I prepared two macros for that:

                                            FOCUS LASER ON

                                            M106 P2 S255  ; turn on laser's 12v PSU
                                            
                                            
                                            M451   ; disable Laser Mode
                                            
                                            M950 F3 C"nil"     
                                            
                                            M950 F3 C"!exp.heater3" Q1000   ; assign laser pin to a free fan Numbe
                                            
                                            M106 P3 S0.001 ; enable laser with 1% power 
                                            
                                            
                                            ; do the focusing stuff
                                            

                                            FOCUS LASER OFF

                                            M106 P3 S0 ; disable laser
                                            
                                            
                                            M950 F3 C"nil" ; free heater3 again for use in laser mode
                                            
                                            M106 P2 S0  ; turn on laser's 12v PSU
                                            

                                            it works ok. My problem is now that I have to do the focusing BEFORE switching to Laser mode with:

                                            M452 C"!exp.heater3" S1 F200  
                                            

                                            If I have done something in laser mode and I have to refocus or pinpoint another work origin, even if I switch to CNC mode it throws an error telling me that the pin "exp.heather3" is occupied (or assigned, I don't remember). So, how do "unassign" the pin when I switch from Laser mode to CNC mode?

                                            Sincerely I can understand the safety concerns behind not being able to use M3 while not moving, but at the end of the day, if I have a laser I have to be able to set it onto the correct origin and also focus it. Even I am not able to do that with a M3 command, I have been able to do find a workaround.
                                            I think this is an issue it should be addressed. It makes working with a laser cumbersome and overly complicated if you are not use to tinker with the RRF3 environment. Maybe a solution would be limit the power output of the M3 command to 1% when stationary? Just an idea...

                                            Phaedruxundefined 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA