Welcome to Our Community

Some features disabled for guests. Register Today.

How to invert the Door Sensor?

Discussion in 'Control Software' started by Robert Linn, Apr 10, 2024.

  1. Robert Linn

    Builder

    Joined:
    Oct 25, 2023
    Messages:
    16
    Likes Received:
    2
    Is there a way, a configuration, or a Grbl setting that would invert how the Door Sensor works? I have an IR emitter that my X32 detects as 'closed' when the IR is blocked and as 'open' when the IR. I need the functionality to be reversed; when the IR is not blocked I want the Door Sensor to think the door is closed and therefore operational. When the IR is blocked I need the machine to pause.
    If the Door Sensor is not the way to accomplish this, what may be some alternatives?
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    Peter Van Der Walt likes this.
  3. Robert Linn

    Builder

    Joined:
    Oct 25, 2023
    Messages:
    16
    Likes Received:
    2
    Thank you for the response. What value should I enter in the Grbl Settings $14 (Limit Pins invert, mask) to invert only the Door Sensor? I've tried setting the value to '3' for the 'safety door' as well as other decimal and binary options all of which have had no affect; the Door Sensor is not getting reversed when restarting. I am using the most recent Blackbox X32 and have flashed with the Door option.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,868
    Likes Received:
    4,283
    Enter $$=14 into the Serial Console to access grblHAL's "help" for that command


    [18:54:55] [ $$=14 ] $14: Invert control pins as bitfield: ;unknown

    [18:54:55] [ $$=14 ] 1 - Feed hold (2)

    [18:54:55] [ $$=14 ] 2 - Cycle start (4)

    [18:54:55] [ $$=14 ] 3 - Safety door (8)

    [18:54:55] [ $$=14 ] 6 - EStop (64)

    [18:54:55] [ $$=14 ] Inverts the control signals (active low).

    [18:54:55] [ $$=14 ] NOTE: Block delete, Optional stop, EStop and Probe connected are optional signals, availability is driver dependent.

    Door's value to enter is [8]
     
    David the swarfer likes this.
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    the doc says
    <control mask> = bitmask where bit 0 = reset, 1 = feed hold, 2 = cycle start, 3 = safety door, 4 = block delete, 5 = stop disable, 6 = e-stop, 7 = probe connected

    those are bit positions, not values.
    bit 3 has a decimal value of 8 in the binary system
    so $14=8 should invert the door
     
    Peter Van Der Walt likes this.
  6. Robert Linn

    Builder

    Joined:
    Oct 25, 2023
    Messages:
    16
    Likes Received:
    2
    Setting the value to '8' worked. Thank you.
     
    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