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

    CNC Duet 3 XYZ probe G10 Error: G10: Bad or missing parameter

    Scheduled Pinned Locked Moved
    CNC
    3
    6
    443
    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.
    • Max3Dundefined
      Max3D
      last edited by

      Greetings one and all. I have searched, and still searching, for a solution to the G10 "bad or missing parameter" error and have decided to open this topic for a possible solution. And, also so I can post my probe macros for others, as well as invite those that have solved the XYZ probe enigma to post theirs.

      Home all and I receive X=0 Y=0 Z=60 on the DWC. I jog bit to the center of the hole on the Openbuilds XYZ Probe Plus. Magnet attached to the spindle and I start the "Z-Probe" macro and the probe moves to the middle of the probe plate and then moves along Z to touch the plate and the plate indicates contact and illuminates green LEDs on the plate. Z moves up 5mm and then the G!0 error is displayed on the DWC.

      Most of my work is a hack in progress. The macro was taken from an archive off the Openbuilds site. Still trying to develop an understanding of Gcode regarding CNCs. I want to use the probe on X and Y also ...

      ; Configuration file for Duet 3 (firmware version 3)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool v3.1.4 on Wed Jul 29 2020 15:25:39 GMT-0700 (Pacific Daylight Time)
      
      ; General preferences
      M453			       					; CNC Mode
      G90                            			; send absolute coordinates...
      M83                            			; ...but relative extruder moves
      M550 P"Duet 3"                 			; set printer name
      
      ; Drives
      M569 P0.2 S0                   			; X 0.2 physical drive goes backwards
      M569 P0.0 S0                   			; Y-R 0.0 physical drive goes backwards
      M569 P0.1 S0                   			; Y-L 0.1 physical drive goes backwards
      M569 P0.3 S1                   			; Z 0.3 physical drive goes forwards
      M584 X0.2 Y0.0:0.1 Z0.3 E0.4:0.5:0.6 	; set drive mapping
      M350 X16 Y16 Z16 U16 I1        			; configure microstepping with interpolation U=dummy Y axis
      M92 X400.00 Y400.00 Z400.00      		; set steps per mm
      M566 X900.00 Y900.00 Z12.00    			; set maximum instantaneous speed changes (mm/min)
      M203 X2000.00 Y2000.00 Z1000.00 		; set maximum speeds (mm/min)
      M201 X500.00 Y500.00 Z20.00    			; set accelerations (mm/s^2)
      M906 X3000 Y2500 Z3000 I30     			; set motor currents (mA) and motor idle factor in per cent
      M84 S30                        			; Set idle timeout
      
      ; Axis Limits
      M208 X0 Y0 Z0 S1                		; set axis minima
      M208 X500 Y375 Z60 S0          	    	; set axis maxima
      
      ; Endstops
      M574 X2 S1 P"!^io0.in"         			; configure active-high endstop for high end on X via pin !^io0.in
      M574 Y1 S1 P"!^io1.in"         			; configure active-high endstop for low end on Y via pin !^io1.in
      M574 Z2 S1 P"!^io2.in"         			; configure active-high endstop for high end on Z via pin !^io2.in
      
      ; Z-Probe
      M558 P5 c"!^io7.in" H5 F120 R1 T300     ; Z probe switch type, probe recovery 1s probe speed and travel speed
      M557 X15:215 Y15:195 S20       			; define mesh grid
      
      ; Fans
      M950 F0 C"out7" Q500           			; create fan 0 on pin out7 and set its frequency
      M106 P0 S1 H-1                 			; set fan 0 value. Thermostatic control is turned off
      M950 F1 C"out8" Q500           			; create fan 1 on pin out8 and set its frequency
      M106 P1 S1 H-1                 			; set fan 1 value. Thermostatic control is turned off
      
      ; Tools
      M563 S"XYZ-Probe" P0                    ; define XYZ Touch Probe Tool
      M563 S"Spindle" P1 D0 H                 ; define tool 0
      G10 P0 X0 Y0 Z0                         ; set tool 0 axis offsets
      G10 P0 R0 S0                            ; set initial tool 0 active and standby temp to 0C
      
      ; Custom settings are not defined
      M453 P2 F400                            ; select CNC device mode P=pin number F=frequency
      M564 S1 H1                              ; disable jog commands when not homed
      M140 H-1                                ; disable heated bed
      M501                                    ; load stored parameters
      
      ;  CNC
      ;M307 H1 A-1 C-1 D-1                    ; disable heater for tool use
      M453 P1 R24000 F100                     ; set to CNC mode using tool 0 pin=1 max RPM 24000 PWM frequency 100hz
      

      Z-Probe macro

      G21                             ; Metric
      G91 G0 Z5                       ; Move Z quickly up
      G91 G1 X-22 Y22 F300            ; Move X,Y to mid probe plate
      G38.2 Z-25 F100                 ; Seek along Z until contact with probe plate
      G10 L20 P0 Z9                   ; Store probe offset's in co-ordinates system
      G91 G0 Z5                       ; Move Z quickly up
      ;G91 G1 X22 Y-22 F300            ; Move Z back to probe origin
      ;G91 G0 Z-5                      ; Move Z quickly down
      ;G21                             ; Metric
      
      1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators
        last edited by

        @Max3D said in CNC Duet 3 XYZ probe G10 Error: G10: Bad or missing parameter:

        G10 L20 P0 Z9

        I have not used this command myself but I wonder if you need X and Y parameters as well as Z?

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • Max3Dundefined
          Max3D
          last edited by

          Thanks for the reply.
          No it does not matter. Some time yesterday I tried "G10 L20 P0 X0 Y0 Z9" (9=probe plate thickness) as well as changing L20 to L2 and L1 with the same resulting error. There aren't that many parameters that I can change. P references the tool number L references the modes of the tool offset in the workplace coordinate system and XYZ.

          So just for fun (just now), I edited the probe macro and added X340 Y43 as the current coordinates from the DWC after jogging to the probe position. The code in the macro = "G10 L20 P0 X340 Y43 Z9". I ran the macro and the same error occurred:

          M98 P"0:/macros/Z-Probe.g
          Error: G10: Bad or missing parameters

          1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt
            last edited by

            Hi,

            For L=2 or L=20 the P parameter (the coordinate system number) ranges from P1 to P9

            Did you try that?

            Frederick

            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

            1 Reply Last reply Reply Quote 0
            • Max3Dundefined
              Max3D
              last edited by

              BINGO! YES! YES! YES!
              Houston we have Lift-Off... "fcwilt", thanks for the fix-up ma-man (or ma-mam)....
              Thank you too "T3P3Tony".

              I edited config.g to change the tool number from 0 to 1, and edited the Z-Probe.g macro to "G10 L20 P1 Z9". I commented out the M501 in the custom settings in the config.g because I no longer need it. I jogged the bit to the probe and ran the macro successfully.

              Z-Probe.g macro for the Openbuilds XYZ Probe Plus that will probe and reposition for another axis. I'll post the X and Y macros here when I finish them, as well as the XYZ combo macro, for 1/8 and 1/4 bits.

              ;Z-Probe.g
              G21                             ; Metric
              G91 G0 Z5                       ; Move Z quickly up
              G91 G1 X-22 Y22 F300            ; Move X,Y to mid probe plate
              G38.2 Z-25 F100                 ; Seek along Z until contact with probe plate
              G10 L20 P1 Z9                   ; Store probe offset's in co-ordinates system
              G91 G0 Z5                       ; Move Z quickly up
              G91 G1 X22 Y-22 F300            ; Move Z back to probe origin
              G91 G0 Z-5                      ; Move Z quickly down
              G21                             ; Metric
              
              1 Reply Last reply Reply Quote 0
              • Max3Dundefined
                Max3D
                last edited by

                I'm back to post the probe macros as stated above. I kind of got lost trying to do all axes in one macro and ran into trouble with the the offset, end-mill radius, saving and restoring a tool position with the G60 command, DWC workstation coords were not making sense, and I couldn't figure out why the G38.2 only ran in a negative direction on some macros, etc... Then applied the tried and true K.I.S.S. technique and then the DWC showed me zeros on all axes at the workpiece origin. Yeah baby!

                The macros below are a jog to an axis position before you start the probe macro. This should be a easy start for all of us CNC noobs out there trying to get started cutting some material and making stuff.

                The macros are simple straight forward easy to edit starting point. When your are ready to make a "do-all axes at once" macro, I found that calling each separate axis macro within a single macro with the M98 command the best way to prevent an error message from the DWC stating that the probe was already triggered after probing the first axis in the code.

                I hope this helps to get you started.

                Jog-Q-X-Probe.g The Q stands for a 1/4 (quarter) inch end-mill. The macro needs to be edited for 1/8 or any other size.

                ; Jog-Q-X-Probe.g - Quarter (6.4mm) end-mill X Probe, jog tool in position to touch plate B4 starting this macro 
                ; For use with Openbuilds XYZ Touch Probe Plus (10mm  edge thickness, 9mm top thickness).
                ;
                G21                              ; Metric
                G38.2 X-50 F100                  ; Seek along X until contact with probe plate
                G10 L20 P1 X13.2                 ; Store probe offset's in co-ordinates system for X
                G91 G1 X5 F300                   ; Back away from touch plate
                G91 G0 Z15                       ; Move Z quickly up
                

                Jog-Q-Y-Probe.g

                ; Jog-Q-Y-Probe.g - Quarter (6.4mm) end-mill Y Probe, jog tool in position to touch plate B4 starting this macro
                ; For use with Openbuilds XYZ Touch Probe Plus (10mm  edge thickness, 9mm top thickness).
                ;
                G21                             ; Metric
                G38.2 Y50 F100                  ; Seek along Y until contact with probe plate
                G10 L20 P1 Y-13.2               ; Store probe offset's in co-ordinates system for Y
                G91 G1 Y-5 F300                 ; Back away from touch plate
                G91 G0 Z15                      ; Move Z quickly up
                

                Jog-Q-Z-Probe.g

                ; Jog-Q-Z-Probe.g - Quarter (6.4mm) endmill Z Probe, jog tool in position to touch plate B4 starting this macro
                ; For use with Openbuilds XYZ Touch Probe Plus (10mm  edge thickness, 9mm top thickness).
                ;
                G21                             ; Metric
                G38.2 Z-50 F100                 ; Seek along Z until contact with probe plate
                G10 L20 P1 Z9                   ; Store probe offset's in co-ordinates system for Y
                G91 G1 Z5 F300                  ; Back away from touch plate
                

                XYZ-Probe.g This is an example of how to use the M98 gcode command to run a set of macros using the Openbuilds touch probe plus. The touch plate has a 14mm hole at the X0, Y0, Z0 coords of the touch plate that can be used as a start and end point for each individual axis macro so you can call them all in a single macro. When I tried to run a macro that triggered the probe more than once I received an error from the DWC. I am not sure if the error was significant enough to cause the a problem with the coordinate system since I abandoned the hack for the M98.

                ; Calls all macros for quarter size bits on all axes
                M98 P"/macros/XY-Probe-center.g"           ; run XY-Probe-center.g from Macros directory in the DWC
                G4 S1                                      ; dwell (pause) for 1 sec
                M98 P"/macros/Z-Probe.g"                   ; run Z-Probe.g from Macros directory in the DWC
                G4 S1                                      ; dwell (pause) for 1 sec
                M98 P"/macros/Y-Probe.g"                   ; run Y-Probe.g from Macros directory in the DWC
                G4 S1                                      ; dwell (pause) for 1 sec
                M98 P"/macros/X-Probe.g"                   ; run X-Probe.g from Macros directory in the DWC
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA