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

Spindle Coolant Unexpected UI Behaviour #142

Closed
AustinSaintAubin opened this issue Mar 2, 2017 · 7 comments
Closed

Spindle Coolant Unexpected UI Behaviour #142

AustinSaintAubin opened this issue Mar 2, 2017 · 7 comments
Labels

Comments

@AustinSaintAubin
Copy link
Contributor

AustinSaintAubin commented Mar 2, 2017

The Coolant Buttons in the Spindle widget do not behave as expected.
I have two separate cooling / chip removal systems.
One is connected to GRBL's Flood Coolant, the other is connected to the GRBL's Mist Coolant.
I am able to enable/disable them independently or have them both on, which is good, I want the ability to have both on/off/or just one on.

screen shot 2017-03-01 at 11 07 31 pm

The issue is that the UI buttons do not reflect the state of the Flood Coolant, and Mist Coolant properly.
If I enable Flood Coolant, then also enable Mist Coolant, both show on the UI as off.
They Flood Coolant and Mist Coolant should be able to be toggled independently of each other in the UI.

[cncjs@v1.9.0-alpha.4]

@cheton
Copy link
Collaborator

cheton commented Mar 2, 2017

@AustinSaintAubin

May you show me the result of your $G command?

I just traced the code at https://github.com/gnea/grbl/blob/master/grbl/report.c#L321, I guess it may report M78 when both mist and flood are on.

 report_util_gcode_modes_M();
  #ifdef ENABLE_M7
    if (gc_state.modal.coolant) { // Note: Multiple coolant states may be active at the same time.
      if (gc_state.modal.coolant & PL_COND_FLAG_COOLANT_MIST) { serial_write('7'); }
      if (gc_state.modal.coolant & PL_COND_FLAG_COOLANT_FLOOD) { serial_write('8'); }
    } else { serial_write('9'); }
  #else
    if (gc_state.modal.coolant) { serial_write('8'); }
    else { serial_write('9'); }
  #endif

@cheton
Copy link
Collaborator

cheton commented Mar 2, 2017

Hi @chamnit

I uncommented ENABLE_M7 from config.h and found something strange. The $G parser state reported M78 when both M7 (Mist) and M8 (Flood) are turned on, may I ask if this is a desired behavior? Thanks.

image

@chamnit
Copy link

chamnit commented Mar 2, 2017

@cheton : It should say M7 M8. Thanks for letting me know. I'll fix it asap.

@cheton
Copy link
Collaborator

cheton commented Mar 2, 2017

It looks great. Thank you for your prompt assistance.

gnea/grbl@8491225

@AustinSaintAubin
Copy link
Contributor Author

AustinSaintAubin commented Mar 3, 2017

Awesome!
Testing GRBL code now.

@AustinSaintAubin
Copy link
Contributor Author

CNCjs UI still needs work, if both M7 & M8 are on UI shows only M8 is on.
But output looks good.

> $G
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S40
ok
> M7
ok
> $G
[GC:G0 G54 G17 G21 G90 G94 M5 M7 T0 F0 S40]
ok
> M8
ok
> $G
[GC:G0 G54 G17 G21 G90 G94 M5 M7 M8 T0 F0 S40]
ok
> M9
ok
> $G
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S40]
ok
> M8
ok
> $G
[GC:G0 G54 G17 G21 G90 G94 M5 M8 T0 F0 S40]
ok

@cheton cheton added the 🐛 bug label Mar 3, 2017
cheton added a commit that referenced this issue Mar 5, 2017
@cheton cheton mentioned this issue Mar 5, 2017
40 tasks
@cheton
Copy link
Collaborator

cheton commented Mar 9, 2017

Fixed in 1.9.0-alpha.5

@cheton cheton closed this as completed Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants