Welcome to Our Community

Some features disabled for guests. Register Today.

How to capture an input signal?

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

  1. Robert Linn

    Builder

    Joined:
    Oct 25, 2023
    Messages:
    16
    Likes Received:
    2
    I have the Openbuilds BB X32 controller and am looking for a way to have it receive an Open/Close, On/Off signal that can be captured and made available to a g-code program.
    The 'Door' would be a good example of such an input. By using the "2/3 Axes CNC/Laser: Dual-Y" (without the 'Door Switch') Firmware version I can connect the device and when triggered can see the Door icon on the controller light up indicating the controller received the signal. Is there a way for the controller to notify a g-code program of the signal without pausing the program?
    If I flash with the "2/3 Axes CNC/Laser: Dual-Y with Door Switch" Firmware version the controller pauses until I manually unlock the alarm. I'm simply looking for a way to have the g-code program know the event occurred.
     
  2. terjeio

    terjeio Well-Known
    Builder

    Joined:
    Oct 18, 2020
    Messages:
    59
    Likes Received:
    60
    Event handlers cannot be written in gcode, however you can read the input with M66 at any time. If you need to take action based on the input then that is only possible if expression and flow control is enabled in the controller.
    An event handler can be added as a plugin, this is one example that is written for CO2 lasers - it stops execution by raising an alarm if coolant is lost.
     
    Peter Van Der Walt likes this.
  3. Robert Linn

    Builder

    Joined:
    Oct 25, 2023
    Messages:
    16
    Likes Received:
    2
    Much appreciated. I'll look further into the M66 commands and adjust how I may approach this. I'm working with the RapidChangeATC and looking into how I can incorporate their Tool Recognition IR sensor into the job to detect a mis-aligned clamp nut. Here's their reference Tool Recognition Zones – RapidChange ATC
     

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