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

Stepper_enable_control causes issues #6

Open
JomerDev opened this issue Dec 12, 2024 · 2 comments
Open

Stepper_enable_control causes issues #6

JomerDev opened this issue Dec 12, 2024 · 2 comments

Comments

@JomerDev
Copy link

Hello. I've compiled grblHAL to use Stepper_enable_control since I need that functionality in a project and it seems for larger files the plugin causes issues. Most of the time if I have a file with the M17 and M18 in them and start it (via ioSender) some of the steppers never start or only start and run once and no longer after that. I've checked the order and placement of the added commands multiple times to no avail. Interestingly, even if the motors are nor actually running their position changes as if they ran just fine.
If I run the same code in multiple parts it usually works without issue. I first thought that it was a buffer issue, but changing the buffer sizes didn't change anything.

I've attached one of the broken files here: gerade.zip
Note, I've tried swapping M17 and M18 around since I wasn't 100% sure which was enable and which was disable, neither version made a difference

@terjeio
Copy link
Contributor

terjeio commented Dec 13, 2024

M17 is enable, M18 (or M84) is disable. M17 is only in effect until the next set of motions is completed (basically until next IDLE status) unless $1 (Step idle delay) is set to 255.
M18 takes effect immediately, even if there are queued motions, unless a delay is specified. And if a delay is specified then after the delay - again even if there are queued motions at that point in time. One could add a G4 delay after M18, but this will not work since a transition from IDLE to CYCLE will reenable all motors. This means that currently it is not possible to switch motors on/off while motion is ongoing. And since M17/M18 only controls the motor enable signals steps will still be sent and positions updated.

If you want to mask which axes step pulses are sent to a different plugin has to be made.

@JomerDev
Copy link
Author

Ok, so I either need to use M17 255 every time or add M17 before every command where the motor should run?
And I probably need to put M400 before M18 so any move still running is done fore the motor gets disabled.
Thank you, thats good to know

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