Z-Probe Won't Invert - NPN Proximity sensor



  • I have a LJ12A3-4-Z-BX NPN proximity sensor. Everything seems to work fine, but I cannot get the Z-Probe inverted.

    Here is my Config Info:

    ; Endstops
    M574 X1 S1 P"!xstop"                           ; configure active-high endstop for low end on X via pin !xstop
    M574 Y1 S1 P"!ystop"                           ; configure active-high endstop for low end on Y via pin !ystop
    M574 Z1 S2                                     ; configure Z-probe endstop for low end on Z
    
    ; Z-Probe
    M558 P5 C"^zprobe.in" I1 H10 F120 T6000        ; set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X40.5 Y0 Z2.5                         ; set Z probe trigger value, offset and trigger height
    M557 X15:215 Y15:195 S20                       ; define mesh grid
    

    With Z axis is away from the bed, I get the following results:

    m119
    Endstops - X: at min stop, Y: at min stop, Z: at min stop, Z probe: at min stop
    ok
    

    d33260d8-8787-4fa4-9afe-43cf7dbc35c7-image.png

    m119 with a screwdriver triggering it.

    m119
    Endstops - X: at min stop, Y: at min stop, Z: not stopped, Z probe: not stopped
    ok
    

    05ff25be-67a6-4bdc-a10b-a4183f179a10-image.png

    I've tried all sorts of config changes and commands via YAT and can't get it to change the behavior. using the m558 command I never see it say it is inverted:

    m558
    Z Probe 0: type 5, input pin zprobe.in, output pin nil, dive height 10.0mm, probe speed 120mm/min, travel speed 6000mm/min, recovery time 0.00 sec, heaters normal, max taps 1, max diff 0.03
    ok
    m558 I1
    Z Probe 0: type 5, input pin zprobe.in, output pin nil, dive height 10.0mm, probe speed 120mm/min, travel speed 6000mm/min, recovery time 0.00 sec, heaters normal, max taps 1, max diff 0.03
    ok
    M558 P5 C"^zprobe.in" I1 H10 F120 T6000   
    ok
    M558 
    Z Probe 0: type 5, input pin zprobe.in, output pin nil, dive height 10.0mm, probe speed 120mm/min, travel speed 6000mm/min, recovery time 0.00 sec, heaters normal, max taps 1, max diff 0.03
    ok
    M558 P5 C"^zprobe.in" i1 H10 F120 T6000   
    ok
    M558 
    Z Probe 0: type 5, input pin zprobe.in, output pin nil, dive height 10.0mm, probe speed 120mm/min, travel speed 6000mm/min, recovery time 0.00 sec, heaters normal, max taps 1, max diff 0.03
    ok
    M558 P5 C"^zprobe.in" I0 H10 F120 T6000   
    ok
    M558
    Z Probe 0: type 5, input pin zprobe.in, output pin nil, dive height 10.0mm, probe speed 120mm/min, travel speed 6000mm/min, recovery time 0.00 sec, heaters normal, max taps 1, max diff 0.03
    
    
    

    Notes:

    Board: Duet 2 WiFi (2WiFi)
    Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.1.1 (2020-05-19b2)
    Duet WiFi Server Version: 1.23

    Wired
    Brown to PSU 24v+
    Blue to PSU GND
    Black to Z__probe_n


  • Moderator

    @toy4x4 said in Z-Probe Won't Invert - NPN Proximity sensor:

    M558 P5 C"^zprobe.in" I1 H10 F120 T6000

    I1 is no longer used to invert in RRF3. Instead you use a ! pbefore the pin name. So you should use

    M558 P5 C"^!zprobe.in" H10 F120 T6000



  • @Phaedrux

    Perfect thanks! Not sure how I missed that change. I'm good now!



  • Just kinda bumping basically to keep this abit alive...

    But also to point out, that this should probably be somewhere in the documentation for how to set up the board. There is only a mention of "you should put ! infront of the pin name to invert", but for people who have never used this board before, that means nothing to them..

    I had spent nearly 3-4 hours trying to get my Z-Probe to work again since all the typical things I know of that worked on my Duet Wifi, does not work on this board at all. Having seen "you need to put ! infront of the pin name" meant nothing to me. I had no clue what I was supposed to be putting the ! infront of. It wasn't until a completely unrelated search that magically brought this thread up, that I saw an actual example of what people keep talking about. So thank you Phaedrux! I would still be destroying my hair for the next few hours if you hadn't posted an actual example of the code, instead of just simply saying "Put an ! at the front" like everyone else 😄


  • Moderator

    @HikariNoKitsune You can familiarize yourself with the specifics of RRF3 here.

    https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names

    Starting fresh with any new firmware is going to have a learning curve.



  • @Phaedrux That it will 😄 Thankfully there are forums and wiki's to help people 😄


Log in to reply