Welcome to Our Community

Some features disabled for guests. Register Today.

Z-homing direction, NO / NC switches

Discussion in 'Control Software' started by Anselm Wiskott, Aug 30, 2022.

  1. Anselm Wiskott

    Builder

    Joined:
    Jun 19, 2022
    Messages:
    15
    Likes Received:
    2
    Hi all,

    I am running a Lead 1515 with all ancillary components (motors, black box) from Openbuilds.

    I had installed inductive proximity sensors (Fuling LJ12A3-4-Z/BX) but the one on the z-axis was misbehaving. Therefore I installed a lever activated single pole double throw microswitch.

    Now my issues:

    1. When I changed $23 "Homing direction invert mask" from Zmax to Zmin, the spindle started homing in the wrong direction (downwards instead of upwards)

    2. I wired my microswitch to a NO (normally open) position, that is, the signal was set to ground and then raised to 5V upon switch activation. Yet the troubleshooting screen indicated "activated" when the switch was at rest. When I wired to NC, things seem to be working OK.

    I realize that these are two separate issues but how can they be explained ?

    Greetings,

    Anselm
     
  2. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,793
    Likes Received:
    1,373
    Z max is up, even though Z up is zero - as you go down the coordinates become more negative. Grbl, like most cnc control software, works in negative space for the machine co-ordinate system. So Z-10 would be 10 mm below the home position, Z 10 would be outside the machine - 10 mm above Z max and Z home.

    Workplace coordinates behave slightly differently - you set the workplace coordinates system zero in the same place on your workpiece as you set the origin in your cam software, then X+ve moves right, X-ve moves left, Y+ve moves back, Y-ve moves forward, Z+ve moves up and Z-ve moves down.

    Alex.
     
  3. Anselm Wiskott

    Builder

    Joined:
    Jun 19, 2022
    Messages:
    15
    Likes Received:
    2
    Hi Alex,
    Thank you for your info - I think I got it.
    Any idea about item #2 ?
    Greetings from Switzerland,
    Anselm
     
  4. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,793
    Likes Received:
    1,373
    You use (I'm sure you know this, but for others reading this) $5 in grbl to invert the operation of limit switches, but it can only be 0 or 1, so all limit switches (or other sensors) have to operate in the same way - either switching from 0 to 1 or from 1 to 0.
    You got the setup right for your proximity sensors - your replacement switch has to do the same logic operation as the proximity sensors.
    On the blackbox logic 0 is 0volts and logic 1 is 5volts.
    Alex.
     
    #4 Alex Chambers, Aug 30, 2022
    Last edited: Aug 30, 2022
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,149
    Likes Received:
    4,340
    Opposite. With $5=0 (Default) we expect NO switches
    When they Close (triggered) they connect GND to SIG (logic low)

    $5=1 with NC switches are wired the same, but go OPEN (logic z-state - Blackbox internal pull-ups and filtering through the optos keeps it logic high) when triggered,
    They stay closed (GND to SIG) when not triggered.

    You can mix NPN type inductives and Xtension Limits with $5=0 : See

    docs:blackbox:connect-xtension-limit [OpenBuilds Documentation]

    and

    docs:blackbox:connect-npn-inductive [OpenBuilds Documentation]

    PNP type is not supported
     
  6. Anselm Wiskott

    Builder

    Joined:
    Jun 19, 2022
    Messages:
    15
    Likes Received:
    2
    Hi - thank you.
    I was unaware that triggering was obtained by connecting to GND (and not 5V).
    Greetings from Geneva,
    Anselm
     
    Peter Van Der Walt likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice