G30 Z Crashing issue



  • Hey there,

    I'm actually working on the Last steps of the Software and Cannot solve the following problem:

    I want to use a capacitive Sensor for both Homing the Z axis and Z Probing.

    HomeZ.g and HomeAll.g are working with no Problems, but when I hit AutoBedCompensation or send G30, the Z endstops get's ignored even though it triggers, and the bed would crash into the nozzle.

    I found other forums with similar problems, but couldn't find any Solution,pls help 😞

    HomeAll.g
    http://de.pastebin.ca/3812988

    Config.g
    http://de.pastebin.ca/3812989

    Bed.g
    https://de.pastebin.ca/3812991



  • not sure if this helps but i do know there are 2 different move commands 1 does not check sensor and the other does. also putting machine in absolute mode i think it is called can ignore sensor. sorry still a newbie but trying to help…


  • administrators



  • I'm kind of Confused..

    If i'm using my Z Capazitive for both as Z endstop and for Z Probing, does that mean that i have "no Probe", so im using P0 in the M558 command?

    "P0 indicates that no Z probe is present."

    And the Z Paramter = 1 because i'm using the Probe as Endstop fo Z

    "The X, Y and Z parameters specify whether each axis uses the Z probe for homing or not."

    M558 P0 X0 Y0 Z1 H0 F120 T6000

    Result:

    • When i use P0, the Bed Crashes into the Hotend by Auto-Bed-Compensation, Homing Z works fine
    • When i use P5, The Bed Stops like it should, the X&Y axis Move to the Probe points, but the Z-Axis is not driving up and down between the Points.

    also i get this error:

    Z probe warning: probe already triggered at start of probing move
    Bed equation fits points [15.0, 15.0, 0.000] [15.0, 235.0, 0.000] [235.0, 235.0, 0.000] [235.0, 15.0, 0.000] [125.0, 125.0, 0.000]

    Something is still wrong, and i don't get it 😒



  • When it goes to probe, it checks the probe and sees that the probe is already triggered, so you need to invert the logic of the Z endstop. To do so change this:
    line 18:

    M574 Z1 S0 ; Define active low and unused microswitches
    
    

    to:

    M574 Z1 S1 ; Define active low and unused microswitches
    
    

    This will change it so that the firmware doesnt see the probe as triggered until it actually is.

    To verify this and prevent a bed crash, move the bed far away from the nozzle, home Z, and manually trigger the probe if you are able to, and if it work the bed should stop still quite far away from the printer nozzle but all will be safe. and if it does not work you then have enough time to unplug or turn off the machine


  • administrators

    @ProjectK:

    I'm kind of Confused..

    If i'm using my Z Capazitive for both as Z endstop and for Z Probing, does that mean that i have "no Probe", so im using P0 in the M558 command?

    "P0 indicates that no Z probe is present."

    And the Z Paramter = 1 because i'm using the Probe as Endstop fo Z

    "The X, Y and Z parameters specify whether each axis uses the Z probe for homing or not."

    M558 P0 X0 Y0 Z1 H0 F120 T6000

    Result:

    • When i use P0, the Bed Crashes into the Hotend by Auto-Bed-Compensation, Homing Z works fine
    • When i use P5, The Bed Stops like it should, the X&Y axis Move to the Probe points, but the Z-Axis is not driving up and down between the Points.

    also i get this error:

    Z probe warning: probe already triggered at start of probing move
    Bed equation fits points [15.0, 15.0, 0.000] [15.0, 235.0, 0.000] [235.0, 235.0, 0.000] [235.0, 15.0, 0.000] [125.0, 125.0, 0.000]

    Something is still wrong, and i don't get it 😒

    P5 is correct. H0 is not. Try H5, then the probe will raise 5mm between points.



  • @Sniffle

    Inverting the Z axis via M574 Z1 S1 is wrong, it triggers when it should and is not triggered when it's not, so Z1 S1 should be right πŸ™‚ but thanks Anyway

    @DC42, thanks for joining to help,!

    I tried H5, it seems to do nothing, I also tried H50 to make it more visible, but it still don't change anything

    Also it says still "Probe already triggered at start of Probe" although if it's not triggered, I moved the bed down 10mm to show

    Video is uploading and should be visible here:
    https://youtu.be/gap8o6vxVqU

    Thanks for the support guys!



  • It seems that your probe is not working, it should show value 0. if you put a metal object under the probe, does the probe value change? What type of probe are you using, NPN or PNP?



  • It's not Analog, it is connected like a switch

    LJC18A3-8-Z/BX, NPN

    It switches when it detects something, I can see it in the user interface



  • I have the same kind of setup and I noticed some issues in your config.g:

    M574 X1 Y1 S1 ; Define active high microswitches
    mark Z so that it has no endstop since you are using a probe, change it to
    M574 X1 Y1 Z0 S1

    M558 P0 X0 Y0 Z0 H0 F120 T6000
    P0 is wrong, you must use P4 for NPN probe (as outlined in the documentation), also I1 for inverted logic, so change it to
    M558 P4 X0 Y0 Z1 H5 I1 F300 T6000 ; NPN inverted logic probe used for homing Z axis, dive height 5mm, probe speed 300mm/min, travel speed 6000mm/min

    I assume you are using a small-signal Schottky diode as outlined in the docs (https://duet3d.com/wiki/Connecting_a_Z_probe)?
    The probe must read value 0 in the main screen when it is not detecting the bed and will show 1000 when it detects the bed (do not look at the endstop screen)

    also your G31 trigger heigth seems too high (is the nozzle 10 cm from the bed when the probe triggers??)

    G31 P600 X0 Y0 Z100

    to get the correct value, do the calibration as outlined here: https://duet3d.com/wiki/Using_mesh_bed_compensation
    Since you have a cartesian type of printer, you don't need G32/bed.g, this is for delta style printers, M557 is all you need to setup the grid.



  • Ouh, I didn't use any shottky or other diode :x

    But I guess I'm pretty lucky, i found BAT43 which I buyed years ago and never needed.

    I will solder it in the circuit and switch the connector to E0, and then do your suggested changes, I will give you feedback! Thanks! πŸ™‚



  • Ok, She BAT43 diode is connected, The codes are applied

    this is the actual config.h:

    https://pastebin.com/MAWMXcEA

    only thing now is, the Z Triggers reversed, so it shows 1000 on detecting and 0 when its in distance

    Changing to L0 is not the solution :x


  • administrators

    You need to add parameter I1 (that's letter I followed by figure 1) in your M558 command as mentioned at https://duet3d.com/wiki/Connecting_a_Z_probe#NPN_output_normally-open_inductive_or_capacitive_sensor.



  • M574 X1 Y1 Z0 S1 ; Define active high microswitches
    M558 P5 X0 Y0 Z1 H5 I1 F300 T6000 ;

    (it's an i for invert i guess, seems legit, sorry ^^)

    but it's still not working. The LED on the Duet glows when it triggers, but the Z-Probe value is constant 1000 and does not change, the Endstop-status is always triggered in the Machine Properties.

    i feel kind of bad using that much of your Times, please be patient guys :x

    Thanks for the Support



  • you state you have an NPN probe, so why are you using P5 in M558 command instead of the documented P4?
    That said, the config you posted seems correct except for the L that needs to be I in M558



  • Whenever I get a new suggestion, I try to mix all the past settings, so I tried again everything with P0 to P5, with every combination of inverting the logic or enabling/disabling Z endstops options

    It maybe seem like I only change one thing and ask here again, but that's not true, I'm non-stop experimenting with various settings ^^

    P4 does not work, it maybe because of some other setting wich is set wrong, but I don't know which line conflicts with another



  • it looks like you are running around like a headless chicken trying to solve this problem, though the documentation explains it quite nicely, so you must be doing something wrong.

    Here are some questions for you,

    • Are you 100% sure the probe you have is a NPN probe, what type do you have exactly, maybe specify the part number?
    • I checked the config you pasted here https://pastebin.com/MAWMXcEA and it is correct except for L that needs to be I in M558
      and the mesh grid (M557 X15:235 Y15:400 S20 ; Define mesh grid) has a too large value on Y, should be (M557 X15:235 Y15:235 S20 ; Define mesh grid according to your axis maxima settings
      did you try that setup?
    • can you post a pic that shows how the probe is currently wired?

    Cheers!


  • administrators

    You can either connect the probe output through the diode to the E0 endstop and use P4 in the M558 command, or connect it to the Z probe input through the diode and use P5.

    The purpose of the diode is to protect the Duet if the ground connection to the Z probe breaks.



  • Okey, here is what i tried today.

    I made a list of every possible combination and connection and tried every single one.

    Best result i get is:

    Connected on E0, using
    M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    M558 P4 X0 Y0 Z1 H5 I1 F300 T6000

    in both Cases the Reading is Reversed, so i get 1000 when its not triggered, and 0 when its triggered

    Connected on Probe Connection using
    M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    M558 P5 X0 Y0 Z1 H5 I1 F300 T6000

    again its in both cases Reading Reversed, getting 1000 when it should be 0 and reverse.

    in every other scenario i get constant 1000.

    Here is a picture of the Wiring. i cut open the Shrink-tubes to be sure.

    The Anode of the BAT43 is Connected in DuetBoard Direction

    • is constantly on 24+ directly on the PowerSupply

    The Sensor i'm using is described as LJC18A3-8-Z/BX, NPN

    Here's a List of every Combination i tried and documented in Notepad.

    1000 means, the reading was constantly HIGH
    Reverse means, the readings switched when i trigger the Sensor, but Inverted

    i also tried to Switch GND and SIG to get rid of the Reverse issue.

    Z Endstop Try


    Probe Connection BEGIN

    1000 M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Probe Connection
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Probe Connection
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P5 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Probe Connection
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P4 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Probe Connection
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    (Swtich GND and SIG)
    1000 M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Probe Connection
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    Reverse M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    Reverse Probe Connection
    Reverse Board GND + Sensor GND
    Reverse Board SIG + Sensor Sig

    Reverse M558 P5 X0 Y0 Z1 H5 I1 F300 T6000
    Reverse Probe Connection
    Reverse Board GND + Sensor GND
    Reverse Board SIG + Sensor Sig

    1000 M558 P4 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Probe Connection
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    Probe Connection END


    E0 Connection BEGIN

    1000 M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    1000 E0
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    1000 E0
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P5 X0 Y0 Z1 H5 I1 F300 T6000
    1000 E0
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P4 X0 Y0 Z1 H5 I1 F300 T6000
    1000 E0
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    (Swtich GND and SIG)
    Reverse M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    Reverse E0
    Reverse Board GND + Sensor GND
    Reverse Board SIG + Sensor Sig

    1000 M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    1000 E0
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    1000 M558 P5 X0 Y0 Z1 H5 I1 F300 T6000
    1000 E0
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    Reverse M558 P4 X0 Y0 Z1 H5 I1 F300 T6000
    Reverse E0
    Reverse Board GND + Sensor GND
    Reverse Board SIG + Sensor Sig

    E0 Connection END


    Zendstop Connection BEGIN

    1000 M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P5 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    1000 M558 P4 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor Sig
    1000 Board SIG + Sensor GND

    (Swtich GND and SIG)
    1000 M558 P4 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    1000 M558 P5 X0 Y0 Z1 H5 I0 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    1000 M558 P5 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    1000 M558 P4 X0 Y0 Z1 H5 I1 F300 T6000
    1000 Zendstop
    1000 Board GND + Sensor GND
    1000 Board SIG + Sensor Sig

    Zendstop Connection END


    Result:
    1. Z Endstop Connection Reads ALWAYS 1000, no Matter whats in the Config.h or how its connected.
    2. E0 Conection works only with P4, but Reversed
    3. Z-Probe Conneciton works with P5, but Reversed

    any ideas how to Invert the Reversed readings?


  • administrators

    Which version firmware are you using? It must be quite old if it doesn't support the I1 parameter.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.