Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] When coolant flow is zero, laser stops but stays ON #22317

Closed
Fusseldieb opened this issue Jul 8, 2021 · 14 comments
Closed

[BUG] When coolant flow is zero, laser stops but stays ON #22317

Fusseldieb opened this issue Jul 8, 2021 · 14 comments

Comments

@Fusseldieb
Copy link

Fusseldieb commented Jul 8, 2021

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

While using Marlin on our 60W Laser Cutter I implemented a coolant flow meter and used the magic of Marlin to handle it.
It shows the flow properly, however as soon as as I turn off the chiller and the machine is midprint of an SD file, it stops, starts to buzz and the laser stays on the whole time until I forcefully turn the entire machine off.

This is probably critical, since another tube literally exploded the last time we used the Laser and forgot to turn the chiller on. I then purchased the flowmeter, but since this bug exists, it wouldn't help much.
Since it burns a deep hole when the coolant flow is NOT present, it might be only a matter of minutes until that happens.

Bug Timeline

Since I used the feature

Expected behavior

Machine should stop and turn off the laser "immediately"

Actual behavior

Machine will stop, buzz and laser will stay on indefinitively

Steps to Reproduce

  1. Generate GCODE file with "Lightburn" and put on SD card ("Laser inline" mode, if that matters)
  2. Start file on laser and wait until its in the middle of a cut
  3. Stop coolant flow
  4. Observe

Version of Marlin Firmware

2.0.x

Printer model

60W Laser, adapted

Electronics

SKR 1.4 Turbo

Add-ons

FLOWMETER

Your Slicer

Other (explain below)

Host Software

SD Card (headless)

Additional information & file uploads

I looked at the code that handles the safety routine and everything seems fine, it explicitly tells the laser to turn off:

#if ENABLED(LASER_COOLANT_FLOW_METER)
    cooler.flowmeter_task(ms);
    #if ENABLED(FLOWMETER_SAFETY)
      if (cutter.enabled() && cooler.check_flow_too_low()) {
        cutter.disable();
        ui.flow_fault();
      }
    #endif
  #endif

However, this doesn't seem to do anything while the laser is midprint. It just somehow makes it ... worse (Since it stops and stays on)?

@descipher
Copy link
Contributor

Inline mode does matter, the laser is disabled via cutter.disable(), this does not control inline mode at the moment. Inline mode has a separate control. I am addressing that problem in another issue

@descipher
Copy link
Contributor

Also the laser does not always turn off when pausing.

@descipher
Copy link
Contributor

See #22152

@thinkyhead
Copy link
Member

Inline mode has a separate control…

If there is a simple ON/OFF state that the inline code uses to decide whether the laser is on or off —and to ignore further inline power blocks— then that flag should be set OFF as part of the coolant safety thing.

@descipher
Copy link
Contributor

Yes, I have read the other PR that deals with this issue. Not sure thats the best method. I have resolved the current issues but there is more to fix.

@thinkyhead
Copy link
Member

I had planned to go through all that code and study it and try to understand how it all works, taking lots of notes, then doing some cleaning up and re-writing…. But there has just not been the time, and I no longer have a laser here to test with.

@descipher
Copy link
Contributor

I will do testing on my laser in about 2 weeks. We can go over the functional elements once I verify what I have done so far. I think we can add dynamic power like GRBL as an inline option. I did fix the flag to control enabling inline mode and can now address the coolant safety control issue with inline mode. Right now I am just using leds to validate function. I am not near the laser right now which means I can’t do real timing validation with the stepper/planner pwm output control.

@Fusseldieb
Copy link
Author

I will do testing on my laser in about 2 weeks. We can go over the functional elements once I verify what I have done so far. I think we can add dynamic power like GRBL as an inline option. I did fix the flag to control enabling inline mode and can now address the coolant safety control issue with inline mode. Right now I am just using leds to validate function. I am not near the laser right now which means I can’t do real timing validation with the stepper/planner pwm output control.

Do you want me to test anything? I have access to the laser monday onwards...

@descipher
Copy link
Contributor

I will submit a PR this week to address the flow sensor safety and the M3/4/5 compatibility issue. Testing will be appreciated, thanks.

@descipher
Copy link
Contributor

Update, my preliminary testing resulted in more work on my end. Most of the laser mode compatibility issues have been addressed. There are multiple calls that do the same function and to many features that have zero adoption by control software products e.g. Lightburn, LaserGRBL, LaserWEB etc. so I am prepping a PR to do a discussion of the current features and what we can consider to do with them. Should be in this week

@github-actions
Copy link

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

@descipher
Copy link
Contributor

descipher commented Oct 10, 2021

#22690 Should be merged soon, all tests passed, update docs in progress.

@github-actions
Copy link

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants