FluidNC icon indicating copy to clipboard operation
FluidNC copied to clipboard

Feature: Add outputs to indicate status: Idle/Run/Halt/Alarm

Open errolt opened this issue 3 years ago • 11 comments

Machine Context

Useful for: Adding a fan to cool the steppers when the machine is not in idle mode(Idle pin, active low) Adding a cnc signal tower(green light,yellow light, red light)

Feature Description

If machine is in idle state, set IDLE pin, all other status pins unset If machine is in running state set RUNNING pin, all others status pins unset etc etc

Other Approaches

Can be done with an external controller monitoring fluidnc's output, but doing in in fluidnc would be a lot cleaner.

How I Can Help

Can try to do the code, but have not looked at the fluidnc code framework yet.

errolt avatar Jan 18 '23 13:01 errolt

This one "Adding a fan to cool the steppers when the machine is not in idle mode(Idle pin, active low)" can be done with coolant or mist and they are already in FluidNC code, You can use them for any purposes like cooling steppers or controlling a fan .

mani-fa avatar Jan 18 '23 14:01 mani-fa

This one "Adding a fan to cool the steppers when the machine is not in idle mode(Idle pin, active low)" can be done with coolant or mist and they are already in FluidNC code, You can use them for any purposes like cooling steppers or controlling a fan .

That would rely on gcode at the start/end of the nc program to turn the fan/mist on. If it is missing then hardware damage can occur, and with the spindle running it can be hard to verify that the fan is running. And stopping the gcode would leave the fan running.

I'll look at the code to see if I can add it myself, but at this point I don't know where would be best.

errolt avatar Jan 18 '23 14:01 errolt

My DRV8825 are controlled by the disable_pin in FluidNC. This pin also controls via a transistor, the fan.

sjonholle avatar Jan 18 '23 19:01 sjonholle

My DRV8825 are controlled by the disable_pin in FluidNC. This pin also controls via a transistor, the fan.

That is a really good idea. When I design my own board I'll keep that in mind and add a dedicated fan header. I'm currently using an MKS DLC32 though, and adding a FET would be a huge pain.

I have added a StatusOutput class(with all 10 status types) to FluidNC, but I'm struggling to find the appropriate place to update the status pins. I've added it to the protocol_main_loop, and it works for Idle/Jog/Alarm. But Home and Hold seems to not loop in protocol_main_loop, and the pin status does not update.

errolt avatar Jan 19 '23 08:01 errolt

I don't know why the issue was prematurely closed.

I like the idea of lamps showing Alarm status. I would like to have such a feature in FluidNC.

ein-erin avatar Feb 16 '23 08:02 ein-erin

With https://github.com/bdring/FluidNC/pull/787 , people can add auxiliary UART-connected devices that can monitor the status.

MitchBradley avatar Feb 16 '23 17:02 MitchBradley

I started a project that could fulfill such wishes. I will put the first version online in about 1-2 weeks. I'm just going to implement this function as a sample. I also have similar ideas.

https://github.com/PatrikRindlisbacher/FluidNC-or-GRBL-UART-Gateway-an-IO-Module-

Such requests should not be integrated on the main controller. The CNC controller should do the important functions well

PatrikRindlisbacher avatar Feb 16 '23 22:02 PatrikRindlisbacher

I don't know why the issue was prematurely closed.

I like the idea of lamps showing Alarm status. I would like to have such a feature in FluidNC.

Because:

  1. Everyone told me to do it with extra/external hardware, or extra gcode.
  2. I couldn't find a place in the code to get the status under all circumstances.

I have a branch here: https://github.com/errolt/FluidNC/tree/StatusOutput It added outputs for all the possible states, but as mentioned earlier in this thread, HOME and HOLD doesn't work. Due to those states not working, I never did a merge/pull request.

errolt avatar Feb 17 '23 06:02 errolt

Hello errollt I recently took up this topic. In my view, the matter should be divided into two parts.

  • FLUID NC reports the correct status via the UART (grbl 1.1)
  • Individual hardware for display and also inputs

This division is important so that FluidNC is not overloaded. All non-time critical tasks can easily be done externally. Professional controllers have similar divisions of tasks. Everyone has different needs and desires. :-)

I'll be working on this topic for about 3-5 hours a day next week.

I have two temporary places where I collect and test everything A small working group would be great. https://github.com/PatrikRindlisbacher/FluidNC-or-GRBL-UART-Gateway-an-IO-Module- https://github.com/users/PatrikRindlisbacher/projects/1

PatrikRindlisbacher avatar Feb 17 '23 12:02 PatrikRindlisbacher

I don't know why the issue was prematurely closed. I like the idea of lamps showing Alarm status. I would like to have such a feature in FluidNC.

Because:

  1. Everyone told me to do it with extra/external hardware, or extra gcode.
  2. I couldn't find a place in the code to get the status under all circumstances.

I have a branch here: https://github.com/errolt/FluidNC/tree/StatusOutput It added outputs for all the possible states, but as mentioned earlier in this thread, HOME and HOLD doesn't work. Due to those states not working, I never did a merge/pull request.

Hi errolt --> I'm busy working on your wish. get in touch with me.

PatrikRindlisbacher avatar Feb 19 '23 20:02 PatrikRindlisbacher

The first version is ready. --> grbl-Status-light-tower-M5-Atom-Matrix

https://github.com/PatrikRindlisbacher/grbl-Status-light-tower-M5-Atom-Matrix

PatrikRindlisbacher avatar Feb 20 '23 18:02 PatrikRindlisbacher