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 Enable #62

Open
schutzero opened this issue May 25, 2022 · 1 comment
Open

Spindle Enable #62

schutzero opened this issue May 25, 2022 · 1 comment

Comments

@schutzero
Copy link

Hello,
I am having trouble controlling the enable pin for the spindle.

I am currently using the MKS SBASE platform and the CPU map is configured accordingly, the pins to control the enable for the spindle should be P1.30 (en) or P1.31(dir), I am sending commands: M3 S500 (and moving) and M5 through UGS platform and there is no change on both pins, both are sending a voltage around 2.4v and stays like that. The PWM signal for controlling the speed is working fine and gets activated and deactivated by this commands, I still need a separate enable pin (from the pwm speed pin) for the spindle controller board that we are currently using.

VARIABLE_SPINDLE is enabled (config.h, line 363).

USE_SPINDLE_DIR_AS_ENABLE_PIN is enabled (config.h, line 408).
(disabling this by commenting it generates an error:

//grbl/cpu_map.h:612:37: error: 'TCCR2A' was not declared in this scope
612 | #define SPINDLE_TCCRA_REGISTER TCCR2A
| ^~~~~~
grbl/spindle_control.c:76:17: note: in expansion of macro 'SPINDLE_TCCRA_REGISTER'
76 | if (SPINDLE_TCCRA_REGISTER & (1<<SPINDLE_COMB_BIT)) { // Check if PWM is enabled.
| ^~~~~~~~~~~~~~~~~~~~~~
grbl/cpu_map.h:615:37: error: 'COM2A1' was not declared in this scope
615 | #define SPINDLE_COMB_BIT COM2A1
| ^~~~~~//

so its not possible for me to test with this disabled)

I also tried inverting the state for the enable by uncommenting INVERT_SPINDLE_ENABLE_PIN (config.h, line 226) but nothing changes.

Any advise would be much appreciated.

Thanks,

Wilhelm

@cprezzi
Copy link
Owner

cprezzi commented May 26, 2022

When we ported grbl to LPC, we did it primarily for laser cutters, because it is much faster for laser engraving than smoothieware, but not all features was ported or tested (like spindle direction). For CNC Mills with VFD spindle I would suggest to use Smoothieware, as it is easIer to configure and supports more machine types.

To get this working on grbl-LPC, it would need a bigger effort to expand the port with additional features like spindle direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants