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.
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.
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