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

    Only probe where the part will be printed

    Scheduled Pinned Locked Moved
    Gcode meta commands
    5
    26
    2.3k
    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.
    • Proschi3Dundefined
      Proschi3D @OwenD
      last edited by Proschi3D

      @OwenD Thank you for your help,
      i will try this afternoon

      did someone manage it already with S3D?

      1 Reply Last reply Reply Quote 0
      • Proschi3Dundefined
        Proschi3D @OwenD
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • Proschi3Dundefined
          Proschi3D @OwenD
          last edited by Proschi3D

          @OwenD the mesh works but printing is canceled

          	Extruder pressure advance: 0.065, 0.000
          Error: in file macro line 7 column 7: M140: expected number after 'S'
          Error: Bad command: mperature] 
          Error: in file macro line 8 column 11: M190: expected number after 'r'
          Error: Bad command: mperature] 
          Error: in file macro line 9 column 11: M109: expected number after 'r'
          Error: Bad command: mperature] T0 
          Error: in file macro line 4 column 39: meta command: expected numeric operands
          Cancelled printing file 0:/gcodes/Part 27 - Part 2.gcode, print time was 0h 2m
          20.12.2022, 17:17:40	4 points probed, min error -0.233, max error -0.025, mean -0.132, deviation 0.078
          Height map saved to file 0:/sys/heightmap.csv
          20.12.2022, 17:17:28	Probe distance used: 60 mm
          xMin = max( 15.0 121.681 )
          xMax = min( 325.0 213.662 )
          yMin = max( -15.0 75.8219 )
          yMax = min( 210.0 153.294 )
          20.12.2022, 17:14:32	Connected to 192.168.178.91
          
          OwenDundefined 1 Reply Last reply Reply Quote 0
          • OwenDundefined
            OwenD @Proschi3D
            last edited by

            @Proschi78
            The M140, M190 & M109 commands that are causing the errors are in your code, not mine.
            Most likely in your start G Code
            It looks like you're using incorrect place holders for the temps

            Please post the start GCode from Prusa Slicer

            Proschi3Dundefined 1 Reply Last reply Reply Quote 0
            • Proschi3Dundefined
              Proschi3D @OwenD
              last edited by

              @OwenD
              PS start code

              M703		; Load Filament specific config, including Temps
              M98 P"/sys/start/Prusalinks"
              
              

              Macro

              T0
              M572 D0 S0.065
              M572 D1 D0.065
              G90 ; set printer absolute mode
              M82 ; set extruder to absolute mode
              M106 S0 ; fan off
              ;M98 P"0:/sys/mesh.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} N60 ; set N to your desired distance between probe points
              G28 ; home all axes
              G28 Z0
              G29
              G29 s1
              T0 ; set first toolhead
              G1 Z3 F2000 ; Move to Z3 for height clearance before Intro line
              G92 E0 ; set position
              ; intro line
              T0
              G1 Z0.35 F6000 ;
              G1 X60 Y-2 F6000 ;
              G1 X140 Y-2 E20 F200 ;
              G1 x160 y-2 F5000
              G1 Z5 F2000 ; Move to Z5 to prevent dragging nozzle and scratching bed
              G1 x170 y-2 F2000
              G92 E0 ; set position
              G1 F9000.0 ;
              M117 Printing...
              
              
              OwenDundefined 1 Reply Last reply Reply Quote 0
              • OwenDundefined
                OwenD @Proschi3D
                last edited by

                @Proschi78
                Where are you setting your temps?
                If it's in your filament config.g then post that too.
                If you don't put heater settings in PS start code, it will probably do it for you.
                So if you want to set your temps in the filament config.g then put a dummy setting in your PS start code.

                Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                • Proschi3Dundefined
                  Proschi3D @OwenD
                  last edited by Proschi3D

                  @OwenD

                  Extruder pressure advance: 0.065, 0.100
                  Error: in file macro line 6 column 59: meta command: expected numeric operands
                  Cancelled printing file 0:/gcodes/Part 27 - Part 1.gcode, print time was 0h 0m
                  20.12.2022, 20:56:33	M32 "0:/gcodes/Part 27 - Part 1.gcode"
                  File 0:/gcodes/Part 27 - Part 1.gcode selected for printing
                  
                  T0
                  M572 D0 S0.065
                  M572 D1 D0.065
                  G90 ; set printer absolute mode
                  M82 ; set extruder to absolute mode
                  M106 S0 ; fan off
                  M98 P"0:/sys/mesh.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} N60 ; set N to your desired distance between probe points
                  G28 ; home all axes
                  G28 Z
                  G29
                  G29 S1
                  T0 ; set second toolhead
                  G1 Z3 F2000 ; Move to Z3 for height clearance before Intro line
                  G92 E0 ; set position
                  ; intro line
                  G1 Z0.35 F6000 ;
                  G1 X60 Y-2 F6000 ;
                  G1 X140 Y-2 E20 F200 ;
                  G1 x160 y-2 F5000
                  G1 Z5 F2000 ; Move to Z5 to prevent dragging nozzle and scratching bed
                  G1 x170 y-2 F2000
                  G92 E0 ; set position
                  G1 F9000.0 ;
                  M106 P3 S33
                  M117 Printing...
                  
                  
                  OwenDundefined 1 Reply Last reply Reply Quote 0
                  • OwenDundefined
                    OwenD @Proschi3D
                    last edited by OwenD

                    @Proschi78
                    I'm unsure where the code you have posted is located.
                    Please try the following in your Prusa Start GCode.
                    Don't call any other macros from Prusa!

                    M118 S"Begin slicer start g code"
                    ;M104 S0 R0 P{current_extruder} ;Dummy  Set temps to zero to stop slicer adding them
                    T{current_extruder} ; select tool used on first layer
                    M703 ; load config file for [filament_type]
                    G90 ; Switch to using Absolute Coordinates
                    M82 ; set extruder to absolute mode
                    M568 P{current_extruder} R{"{heat.coldExtrudeTemperature+5}"} S{first_layer_temperature[current_extruder]} A1 ; (set extruder to stanby to soften any protruding filament before probing )
                    M106 P{current_extruder} S0 ;Start with fan off
                    M118 S"Heating Bed"
                    G4 S1
                    M140 S{first_layer_bed_temperature[current_extruder]}  R{bed_temperature[0]-20}; Set fast bed temp & standby - Standby is 20 degrees less than normal.
                    M116 ; Wait for bed before doing mesh probe.
                    M561 ; clear any bed transform
                    M291 S0 T3  P"Homing..."
                    G28 ; Home all 
                    M400 ; wait for last move
                    M98 P"0:/sys/mesh.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} N60 ; set N to your desired distance between probe points
                    G29 S1  ; load small mesh
                    G1 Z3 F2000 ; Move to Z3 for height clearance before Intro line
                    G92 E0 ; set position
                    ; intro line
                    G1 Z0.35 F6000 ;
                    G1 X60 Y-2 F6000 ;
                    G1 X140 Y-2 E20 F200 ;
                    G1 x160 y-2 F5000
                    G1 Z5 F2000 ; Move to Z5 to prevent dragging nozzle and scratching bed
                    G1 x170 y-2 F2000
                    G92 E0 ; set position
                    G1 F9000.0 ;
                    M106 P3 S33
                    M117 Printing...
                    
                    Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                    • Proschi3Dundefined
                      Proschi3D @OwenD
                      last edited by Proschi3D

                      @OwenD

                      Error: in file macro line 6 column 59: meta command: expected numeric operands
                      Cancelled printing file 0:/gcodes/Part 27 - Part 2.gcode, print time was 0h 2m
                      20.12.2022, 21:53:49	M32 "0:/gcodes/Part 27 - Part 2.gcode"
                      File 0:/gcodes/Part 27 - Part 2.gcode selected for printing
                      Begin slicer start g code
                      Heating Bed
                      

                      If I exclude M98 then normal mesh leveling and printing work.

                      M118 S"Begin slicer start g code"
                      ;M104 S0 R0 P{current_extruder} ;Dummy  Set temps to zero to stop slicer adding them
                      T{current_extruder} ; select tool used on first layer
                      M703 ; load config file for [filament_type]
                      G90 ; Switch to using Absolute Coordinates
                      M82 ; set extruder to absolute mode
                      M568 P{current_extruder} R{"{heat.coldExtrudeTemperature+5}"} S{first_layer_temperature[current_extruder]} A1 ; (set extruder to stanby to soften any protruding filament before probing )
                      M106 P{current_extruder} S0 ;Start with fan off
                      M118 S"Heating Bed"
                      G4 S1
                      M140 S{first_layer_bed_temperature[current_extruder]}  R{bed_temperature[0]-20}; Set fast bed temp & standby - Standby is 20 degrees less than normal.
                      M116 ; Wait for bed before doing mesh probe.
                      M561 ; clear any bed transform
                      M291 S0 T3  P"Homing..."
                      G28 ; Home all 
                      M400 ; wait for last move
                      ;M98 P"0:/sys/mesh.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} N60 ; set N to your desired distance between probe points
                      G29
                      G29 S1  ; load small mesh
                      G1 Z3 F2000 ; Move to Z3 for height clearance before Intro line
                      G92 E0 ; set position
                      ; intro line
                      G1 Z0.35 F6000 ;
                      G1 X60 Y-2 F6000 ;
                      G1 X140 Y-2 E20 F200 ;
                      G1 x160 y-2 F5000
                      G1 Z5 F2000 ; Move to Z5 to prevent dragging nozzle and scratching bed
                      G1 x170 y-2 F2000
                      G92 E0 ; set position
                      G1 F9000.0 ;
                      M106 P3 S33
                      M117 Printing...
                      
                      danym21undefined 1 Reply Last reply Reply Quote 0
                      • danym21undefined
                        danym21 @Proschi3D
                        last edited by

                        @Proschi78
                        Hi, I use SuperSlicer, but I think in prusa Slicer it should also work.
                        in my startcode I added this line:

                        M557 X{first_layer_print_min[0]}:{first_layer_print_max[0]} Y{first_layer_print_min[1]}:{first_layer_print_max[1]}
                        

                        maybe this will help you too.

                        Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                        • Proschi3Dundefined
                          Proschi3D @danym21
                          last edited by Proschi3D

                          @danym21 Error: in GCode file line 182 column 7: M221: expected number after 'S'
                          Extruder pressure advance: 0.065, 0.000
                          Error: in file macro line 8 column 8: M557: unknown value 'first_layer_print_min^'

                          can you give me your whole start code ?
                          and mesh.g ?

                          danym21undefined 1 Reply Last reply Reply Quote 0
                          • danym21undefined
                            danym21 @Proschi3D
                            last edited by

                            @Proschi78
                            start G-Code:

                            G90 ; use absolute coordinates
                            ;M83  ; extruder relative mode
                            ;BED_MESH_CALIBRATE AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}
                            ;MINX:{first_layer_print_min[0]}
                            ;MINY:{first_layer_print_min[1]}
                            ;MAXX:{first_layer_print_max[0]}
                            ;MAXY:{first_layer_print_max[1]}
                            M557 X{first_layer_print_min[0]}:{first_layer_print_max[0]} Y{first_layer_print_min[1]}:{first_layer_print_max[1]}
                            M82 ; absolute extrusion mode
                            M104 S140 T0
                            M140 S[first_layer_bed_temperature] ; set bed temp
                            M190 S[first_layer_bed_temperature] ; wait for bed temp
                            G32 ; home all
                            G1 X-14 Y-10 F10000
                            ; Reset speed and extrusion rates
                            M200 D0 ; disable volumetric e
                            M220 S100 ; reset speed
                            M221 S100 D0 ; reset extrusion rate
                            M109 S{first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} ; wait for extruder temp
                            G92 E0.0
                            
                            ;G1 X150.0 E20  F1000.0 ; intro line
                            G1 E20  F1000.0 ; intro line
                            G1 X0.0 Y0.0 Z0.1 F1000.0 ; go outside print area
                            ;G1 X5 Y0
                            G92 E0.0
                            G1 X2 Y2 Z0.2 E0 F18000 ; new
                            G1 X60 Y2 E9.0 F1800 ;intro Line
                            ;G1 X200.0 E30 F500 ; second Part intro Line
                            G92 E0.0
                            G1 Z5 E-{retract_length[0]} F{retract_speed *60}
                            G1 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} Z{first_layer_height} F30000
                            G1 E{retract_length[0]} F{retract_speed*60}
                            G92 E0.0
                            
                            

                            I do not use a mesh.g this does not exists on my system
                            my bed.g:

                            ; bed.g
                            ; called to perform automatic bed compensation via G32
                            ;
                            ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sun Feb 09 2020 01:08:02 GMT+0100 (Mitteleuropäische Normalzeit)
                            M561 ; clear any bed transform
                            G4 P100
                            G28 ; home
                            G0 Z10 F4200
                            
                            G0 F60000
                            G30 P0 X5 Y155 Z-99999						;Orbiter
                            G30 P1 X302 Y155 Z-99999 S2					;Orbiter
                            G30 P0 X5 Y155 Z-99999						;Orbiter
                            G30 P1 X302 Y155 Z-99999 S2					;Orbiter
                            G91 										;Relative positioning
                            G1 Z5 F1500 								;Raise Z 5mm
                            G90 										;Absolute positioning
                            
                            G0 X45 Y-5 F60000
                            G29 										;Probe the heatbed and generate heightmap
                            
                            G91 										;Relative positioning
                            G1 Z5 F1500 								;Raise Z 5mm
                            G90 										;Absolute positioning
                            
                            G4 P100
                            G0 X0 Y0 F60000 						;Go to Parking Position
                            
                            

                            some settings in config.g that maybe relevant for:

                            ...
                            M671 X-52:377 Y155:155 S2.5 					   ; leadscrews at left (connected to Z) and right
                            ...
                            M557 X10:300 Y10:300 P6:6; S40                     ; define mesh grid ( the normal full size mesh config)
                            
                            Proschi3Dundefined 2 Replies Last reply Reply Quote 1
                            • Proschi3Dundefined
                              Proschi3D @danym21
                              last edited by Proschi3D

                              jetzt gehts 🙂
                              now it works 🙂

                              danym21undefined 1 Reply Last reply Reply Quote 0
                              • danym21undefined
                                danym21 @Proschi3D
                                last edited by

                                @Proschi78
                                🙂

                                Proschi3Dundefined 1 Reply Last reply Reply Quote 1
                                • Proschi3Dundefined
                                  Proschi3D @danym21
                                  last edited by

                                  @danym21 Do you also have start codes for other slicers?

                                  danym21undefined 1 Reply Last reply Reply Quote 0
                                  • danym21undefined
                                    danym21 @Proschi3D
                                    last edited by

                                    @Proschi78
                                    no, sorry
                                    but on S3d maybe have a look to this variables:
                                    I do not know what is in, but you can test with a smal object and check then the gcode file

                                    [build_size_x]
                                    [build_size_y]
                                    [build_size_z]
                                    ....
                                    [next_position_x]
                                    [next_position_y]
                                    [next_position_z] 
                                    

                                    they are mentioned here:
                                    https://community.ultimaker.com/topic/11328-simplify3d-hidden-undocumented-placeholders-for-post-processing-scripts/

                                    Proschi3Dundefined 1 Reply Last reply Reply Quote 1
                                    • Proschi3Dundefined
                                      Proschi3D @danym21
                                      last edited by

                                      @danym21 thanks I'll test that tomorrow

                                      1 Reply Last reply Reply Quote 0
                                      • Proschi3Dundefined
                                        Proschi3D @danym21
                                        last edited by Proschi3D

                                        @danym21 said in Only probe where the part will be printed:

                                        @Proschi78
                                        start G-Code:

                                        G90 ; use absolute coordinates
                                        ;M83  ; extruder relative mode
                                        ;BED_MESH_CALIBRATE AREA_START={first_layer_print_min[0]},{first_layer_print_min[1]} AREA_END={first_layer_print_max[0]},{first_layer_print_max[1]}
                                        ;MINX:{first_layer_print_min[0]}
                                        ;MINY:{first_layer_print_min[1]}
                                        ;MAXX:{first_layer_print_max[0]}
                                        ;MAXY:{first_layer_print_max[1]}
                                        M557 X{first_layer_print_min[0]}:{first_layer_print_max[0]} Y{first_layer_print_min[1]}:{first_layer_print_max[1]}
                                        M82 ; absolute extrusion mode
                                        M104 S140 T0
                                        M140 S[first_layer_bed_temperature] ; set bed temp
                                        M190 S[first_layer_bed_temperature] ; wait for bed temp
                                        G32 ; home all
                                        G1 X-14 Y-10 F10000
                                        ; Reset speed and extrusion rates
                                        M200 D0 ; disable volumetric e
                                        M220 S100 ; reset speed
                                        M221 S100 D0 ; reset extrusion rate
                                        M109 S{first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} ; wait for extruder temp
                                        G92 E0.0
                                        
                                        ;G1 X150.0 E20  F1000.0 ; intro line
                                        G1 E20  F1000.0 ; intro line
                                        G1 X0.0 Y0.0 Z0.1 F1000.0 ; go outside print area
                                        ;G1 X5 Y0
                                        G92 E0.0
                                        G1 X2 Y2 Z0.2 E0 F18000 ; new
                                        G1 X60 Y2 E9.0 F1800 ;intro Line
                                        ;G1 X200.0 E30 F500 ; second Part intro Line
                                        G92 E0.0
                                        G1 Z5 E-{retract_length[0]} F{retract_speed *60}
                                        G1 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} Z{first_layer_height} F30000
                                        G1 E{retract_length[0]} F{retract_speed*60}
                                        G92 E0.0
                                        
                                        

                                        I do not use a mesh.g this does not exists on my system
                                        my bed.g:

                                        ; bed.g
                                        ; called to perform automatic bed compensation via G32
                                        ;
                                        ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sun Feb 09 2020 01:08:02 GMT+0100 (Mitteleuropäische Normalzeit)
                                        M561 ; clear any bed transform
                                        G4 P100
                                        G28 ; home
                                        G0 Z10 F4200
                                        
                                        G0 F60000
                                        G30 P0 X5 Y155 Z-99999						;Orbiter
                                        G30 P1 X302 Y155 Z-99999 S2					;Orbiter
                                        G30 P0 X5 Y155 Z-99999						;Orbiter
                                        G30 P1 X302 Y155 Z-99999 S2					;Orbiter
                                        G91 										;Relative positioning
                                        G1 Z5 F1500 								;Raise Z 5mm
                                        G90 										;Absolute positioning
                                        
                                        G0 X45 Y-5 F60000
                                        G29 										;Probe the heatbed and generate heightmap
                                        
                                        G91 										;Relative positioning
                                        G1 Z5 F1500 								;Raise Z 5mm
                                        G90 										;Absolute positioning
                                        
                                        G4 P100
                                        G0 X0 Y0 F60000 						;Go to Parking Position
                                        
                                        

                                        some settings in config.g that maybe relevant for:

                                        ...
                                        M671 X-52:377 Y155:155 S2.5 					   ; leadscrews at left (connected to Z) and right
                                        ...
                                        M557 X10:300 Y10:300 P6:6; S40                     ; define mesh grid ( the normal full size mesh config)
                                        

                                        what can I do with this start code so that it is probing in mesh like A5 in normal mesh?
                                        Best off five ?

                                        danym21undefined 1 Reply Last reply Reply Quote 0
                                        • danym21undefined
                                          danym21 @Proschi3D
                                          last edited by

                                          @Proschi78 said in Only probe where the part will be printed:

                                          ke A5 in no

                                          the A5 needs to be in the config.g where you configure the probe type
                                          look for M558
                                          https://docs.duet3d.com/User_manual/Reference/Gcodes#m558-set-z-probe-type

                                          Proschi3Dundefined 1 Reply Last reply Reply Quote 0
                                          • Proschi3Dundefined
                                            Proschi3D @danym21
                                            last edited by Proschi3D

                                            @danym21
                                            Hello,
                                            I know that and I also have it in the config.g
                                            but if I start a print and it only creates the mesh where the printed part is, then it only runs once in z

                                            M558 P1 C"io3.in" H5 A5 S0.009 F150 T6000                           ; set Z probe type to unmodulated and the dive height + speeds
                                            G31 P500 X0 Y0 Z1.730; set Z probe trigger value, offset and trigger height
                                            M557 X30:330 Y-3:210 P9         
                                            
                                            danym21undefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA