G0/G1 H1 chk f z-endstp w trggr-hght crrectn & move-dirctn only



  • Hi,
    when printing with extruder still very close to plate and wanting to call "pause" that has a z"+"hop like
    G91
    G0 Z10 F500 H1
    G90
    It skips it when H1 is there for checking endstops because the IR-sensor is still close to the plate and is above threshold-value... but this is strange to me because it should take into account the trigger-height-offset-value to know if it is within axis-limits on a homed-axis or not (In my case it is within... but still skips the move because of it...)?

    My intention is to include H1 for the very rare case that somebody initiated a pause with printer and head spaced away all the axis-length in z on the cartesian to avoid having the z-spindel try to move the plate further from the head away then it can without having to install a 2nd endstop for z+ (having the IR-sensor for z-/zTrigger).

    Also it could theoretically know that if a z"+"move with H is initiated it has to check for the z"+"Endstop and SHOULD (?HM?) ignore z"-"Endstop and vice-versa if a z"-"move is done? Or am I missing some rare case it could be good to check both directions endstops?

    Testing latest 2.03b3 on a 1.0.4-board


  • administrators

    Do you actually have a Z max endstop on your machine? If so, please supply your config.g, homez.g and homeall.g files.



  • @dc42 said in G0/G1 H1 chk f z-endstp w trggr-hght crrectn & move-dirctn only:

    Do you actually have a Z max endstop on your machine? If so, please supply your config.g, homez.g and homeall.g files.

    Thanks for coming back on this so fast: No I do not plan to put any "+"end-stop, but just stay with simple switches in X"-" & Y"-" and have your IR-Z-trigger mounted to the head for z"-". For my clients I have mounted the IR-Z-Trigger quite high, ca. 2mm that it is not so much in the way of seeing the nozzle, so the calibrated offset is rather huge, and e.g. If a print is started with e.g. 0.3mm absolut z, of course the z-probe-theshold-value of 500 is "hit" (with ca. 600-1000 depending of fabric underneath - yes they print on fabric, do not ask me...) so e.g. with those 0.3mm abs z if I press then pause with "G10 Z... F... H1" it skips it because - to me - it seems it does not take into account to in this case ignore that z-probe-threshold-val is hit because it is within absolute boundaries and would actually move away from the "endstop" and not towards it...



  • @dc42

    config.g:
    <
    ; Configuration file for Duet2 wifi or ethernet (initially firmware version >=1.21)
    ; executed by the firmware on start-up
    ; for general reference see https://duet3d.dozuki.com/Wiki/Gcode#main
    ;
    ; General preferences
    ;M451 ; M451 is default when powered up; set duet2 to FusedFilamentFabrication mode for filament printing
    G90 ; All coordinates from now on are absolute relative to the origin of the machine
    M83 ; relative extruder move counting
    G21 ; G21 set units to mm/G20 set units to inches
    ; kinematics type
    ; M669 K0 ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M669_Set_kinematics_type_and_kinematics_parameters
    ; printer cartesian axis length calibration/scaling
    ; M579 X1.0000 Y1.0000 Z1.0000 ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M579_Scale_Cartesian_axes
    ; Network config
    M550 P"TFD" ; Set machine name
    M551 Ptfd ; Set password
    M552 P0.0.0.0 S1 ; Enable network and acquire dynamic address via DHCP
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet
    ; Drives config
    ; seems to be: 0=X, 1=Y, 2=Z, 3=e0, 4=e1, 5=e2(exp-pcb:Drv5), 6=e3(exp-pcb:Drv6), ... see https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers
    M569 P2 S0 ; Drive 2=Z; S1 = def, only needed when S0
    M569 P3 S0 ; Drive 3=e0; S1 = def, only needed when S0
    M569 P5 S1 R1 T3.3:3.3:6.1:0 ; the external driver individual timing; R1
    M569 P6 S1 R1 T3.3:3.3:6.1:0 ; the external driver individual timing; R1
    ;
    M584 X5 Y6 Z2 E3 ; drive mapping - better to USE IT ONLY ONCE, since additional use will not overwrite older definitions...
    ; M350 MUST BE later then any M584!
    M350 Z16 I1 ; Config (micro)stepping with(I1)without(I0) interpolation (trinamic microplyer provided only with 16-stepping)
    M350 E16 I1 ; Config (micro)stepping with(I1)without(I0) interpolation (trinamic microplyer provided only with 16-stepping)
    ; leave x & y out since external
    ; z= 400 for fullstep, 400
    16=6400
    ; check out https://www.prusaprinters.org/calculator/ for some val-tweaking:
    M92 X376.47 Y376.47 Z6400.00 E415.00 ; Set steps per mm corresponding to the before defined microstepping
    ; M92 ; M92 without parameters = Report current steps/mm (since M500 at end of this file saves recalced vals)
    M566 X800.00 Y800.00 Z0.1 E120.00 ; Set maximum instantaneous speed changes (mm/min)
    ;M205 same as M566 but with mm/s instead of mm/min
    M201 X3000.00 Y3000.00 Z0.75 E200.00 ; Set maximum accelerations (mm/s^2)
    M204 P300 T3000 ; Set max acceleration (mm/s^2) for Printing P___ and Travel T___ moves
    M203 X18000.00 Y18000.00 Z200.00 E1200.00 ; Set maximum (absolute) speeds (mm/min)
    ; since with the long cables this printer has a lot of noise from the motor-electricity in the other cables make sure it´s idle is VERY LOW:
    M906 Z2400.00 E700.00 I10 ; Set motor currents (mA) and motor idle I__ (0..100) factor in per cent
    ; since with the long cables this printer has a lot of noise from the motor-electricity in the other cables make sure it´s idle is IMMEDIATELY triggered:
    M84 S1 Z E0 ; Set idle timeout with S_ in seconds, only for internal drives
    ; Axis Limits config
    ;M206 X5.0 Y5.0 Z-0.01; 5mm in x&y -> 690mm p.Axis; offset axes from homing points, maybe good to virtually shorten the print-area
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X680 Y680 Z300 S0 ; Set axis maxima
    ; Endstops config, where on axis: (0 = none,) XYZ1 = low end, XYZ2 = high end
    M574 X1 S0 ; S_ endstop-type: 0 = active low, 1 = active high, 2 = slice-direction-probe, 3 = motor load detection
    M574 Y1 S0 ; S_ endstop-type: 0 = active low, 1 = active high, 2 = slice-direction-probe, 3 = motor load detection
    ; Z-Probe
    M574 Z1 S2 ; Snnn type: 0 = active low, 1 = active high, 2 = slice-direction-probe, 3 = motor load detection
    ; M558 before G31..., if heated-bed is installed check for "B1"-variable
    M558 P1 H5 F60 T6000 ; Set Z probe type to modulated and the dive height + speeds
    ;M558 P1 H5 F60 T6000 B1 ; Set Z probe type to modulated and the dive height + speeds
    ; >>>
    ; >>>
    ; >>>
    ; SET RELATIVE POSITION TO NOZZLE (https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe😞
    G31 P500 X50 Y0 Z2.5 ; Set Z probe trigger value, offset and TRIGGER HEIGHT RELATIVE TO NOZZLE ON BED = 0; before calibration put a low val for DC42-IR-Sensor
    ; <<<
    ; <<<
    ; <<<
    ; define grid levelling of Z-plate:
    M557 X100:600 Y100:600 S100 ; Define mesh grid Xmin:max Ymin:max Sprobepointsdistances
    ; Heaters & temp sens config
    M140 H-1 ; Disable heated bed
    M305 P1 X200 F50 W4 ; temperature-sensor for heater 1, PT100: W___ wires; F___ mains frequency; channels 200, 201... are MAX31865 PT100 channels;
    M143 H1 S350 A2 ; Set temperature limit (MAX) for heater H_ to __°C, https://duet3d.dozuki.com/Wiki/Gcode#Section_M143_Maximum_heater_temperature
    ;M143 H2 S350 A2 ; Set temperature limit (MAX) for heater H
    to ___°C, https://duet3d.dozuki.com/Wiki/Gcode#Section_M143_Maximum_heater_temperature
    ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M302_Allow_cold_extrudes
    M302 S175 R115 ; Allow extrusion starting from (MIN) ___°C (def160) and retractions already from (MIN) °C (def90)
    ; Temp sens OTHERS
    ; check heat also on trinamic drivers, since they can get hot...
    M305 P101 S"Internl-Motr-Drvrs" ; If you go to the "Extra" tab in DuetWebControl (where is says Tools/Heaters/Extra), you will see "Drivers"
    ;heater-fault detection:
    M570 S300 ; if after S
    seconds heater has not get close to set temp, raise a heater-fault, e.g. 5min
    60sec=300sec
    ; Fans config, see https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_fans#Section_Using_a_fan_connector_as_a_general_purpose_output
    ; https://duet3d.dozuki.com/Wiki/Gcode#Section_M106_Fan_On
    ; thermostatically controlled fans from/for extruder-heatbreak
    M106 P1 L0.0 X1.0 B1.0 H1 T50:70 S1.0 ; exclusive extruder-fan/heatbreak-fan e0 connected to H1, on if H__ get´s hotter than T__°C, S_(0.0-1.0) speed
    ;M106 P2 L0.0 X1.0 B1.0 H2 T50:70 S1.0 ; exclusive extruder-fan/heatbreak-fan e1 connected to H2, on if H__ get´s hotter than T__°C, S_(0.0-1.0) speed
    ; additional fans: Take care if these should be thermostatically controlled...
    M106 P0 L0.0 X0.55 B1.0 H1 T50 S0.1 ; printcool fan "P0" default, S_(0.0-1.0) speed
    ;M106 P0 L0.0 X0.55 B1.0 H1:2 T50 S0.1 ; printcool fan "P0" default, S_(0.0-1.0) speed
    ; Tools config
    M563 P0 D0 H1 ; Define tool(P) 0 with drive (D) 0 with heater (H) 1
    ;M563 P0 D0:1 H1:2 ; Define tool(P) 0 with drive (D) 0 with heater (H) 1 & 2
    ; tool(s)-virtual-mid is rel from axis 0/0 shifted on fly-ship-mid by 116/2=58mm, but we only take into account the relative spread between separate nozzles of 15mm from that mid:
    G10 P0 X-15 Y0 Z0 ; Set tool 0 axis offsets with -15mm in x if single extruder
    ;G10 P1 X15 Y0 Z0 ; Set tool 1 axis offsets with +15mm in x if single extruder
    ; if ever 2in1-tool will be installed this will zero out everything and the offsets can be commented out
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C
    ; Automatic power saving config
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 E-5 F1000" ; Set voltage thresholds and actions to run on power loss
    ; Height-map load
    ;G29 S1 ; load "sys/heightmap.csv" comment/uncomment until/if done 1 time at least
    ; GUI config
    M404 N1.75 ; display for users nominal-filament-diameter/width of setup, in this case 1.75mm
    ; default selection config
    G54 ; use 1st machine coordinate-system (P1/G54), see https://duet3d.dozuki.com/Wiki/Gcode#Section_G54_to_G59_3_Select_coordinate_system
    T0 ; Select first tool
    ; volumetric extrusion yes or no and if yes what is the filament-diameter
    ; M200 D0 ; disable volumetric extrusion on all extruders
    ; M200 D1.75 ; set all extruder filament diameters to 1.75mm
    ; M200 D1.75:1.75 ; set extruder 0 to 1.75mm, and all remaining extruders to 1.75mm
    ; Load any saved values from last use, that were saved with M500 command
    M501 ; Ensure that M501 is at the end of config.g in order for the values in config-override.g to be loaded at startup
    ; config done
    ;M291 P"config done" S2 T5 ; send message
    M117 config done ; send message
    M300 S300 P1000 ; beep
    M292 ; Hide the message



  • @dc42

    pause.g:
    <
    ; called when a print from SD card is paused
    ; for general reference see https://duet3d.dozuki.com/Wiki/Gcode#main
    ;
    G54 ; change to machine-csys
    M117 pausing ; send message
    ; retract filament
    M83 ; relative extruder mode
    G1 E-1 F3600 ; retract filament
    ; z-hop
    G91 ; relative positioning mode
    M98 P"home-zhop-plus.g" ; call P".g" submacro; see https://duet3d.dozuki.com/Wiki/Gcode#Section_M98_Call_Macro_Subprogram
    G90 ; absolute positioning mode
    ; x-y pause-position
    G0 X340 Y680 F6000 ; go to X=... Y=...
    ;G0 X0 Y0 F6000 ; go to X=... Y=...
    G55 ; change to working-csys



  • @dc42

    z-hop-plus.g (have already deleted the H1 there... and commented in the M564):
    ; called to move z a little bit: plate and head "+" is further apart
    ; for general reference see https://duet3d.dozuki.com/Wiki/Gcode#main
    ;
    M564 H0 S0 ; S1 = enable axis limits, H1 = NOT allow movement of axes that have not been homed
    G91 ; relative positioning
    ;M203 Z___ ; Set max Z feedrate to mm/min
    G1 Z10 F200 ; lift Z relative to current position, check not for endstop H1 but maybe for axis maximum...
    G90 ; absolute positioning
    M564 H1 S1 ; S1 = enable axis limits, H1 = NOT allow movement of axes that have not been homed


  • administrators

    @lb said in G0/G1 H1 chk f z-endstp w trggr-hght crrectn & move-dirctn only:

    when printing with extruder still very close to plate and wanting to call "pause" that has a z"+"hop like
    G91
    G0 Z10 F500 H1
    G90
    It skips it when H1 is there for checking endstops because the IR-sensor is still close to the plate and is above threshold-value... but this is strange to me because it should take into account the trigger-height-offset-value to know if it is within axis-limits on a homed-axis or not (In my case it is within... but still skips the move because of it...)?
    My intention is to include H1 for the very rare case that somebody initiated a pause with printer and head spaced away all the axis-length in z on the cartesian to avoid having the z-spindel try to move the plate further from the head away then it can without having to install a 2nd endstop for z+ (having the IR-sensor for z-/zTrigger).

    G0 with H1 is the wrong command to use, because H1 in that command means ignore axis limits and stop when the endstop is triggered. G0 Z10 F500 by itself will honour the Z max limit that you set in the M208 command.



  • @dc42
    Ah - O.K. Thanks! Then I understood it wrong way round. I thought without calling the check, it could go out of boundaries, if it still honours the size given within M208 it is safe...
    Thanks!



  • @dc42

    Edit: I included the words "ignoring the axis limits" in the table @ https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_G0_G1_Move
    O.K.?


  • administrators

    @lb said in G0/G1 H1 chk f z-endstp w trggr-hght crrectn & move-dirctn only:

    @dc42
    Ah - O.K. Thanks! Then I understood it wrong way round. I thought without calling the check, it could go out of boundaries, if it still honours the size given within M208 it is safe...
    Thanks!

    That's correct; whereas if you include H1 then it assumes that it doesn't know where the print head is, so it ignore axis limits and stops when the endstop is triggered.


Log in to reply