M3 Does Not Behave as Expected

More
18 Feb 2023 18:51 #264767 by reynolds087
I am curious whether anyone else can confirm this behavior, because it caused me some significant headache while I was troubleshooting my spindle. This is my first experience with LinuxCNC. Originally I was using GRBL, which behaves in the following way. When "M3" is asserted, the spindle is enabled. If an S code is asserted on the next line, the spindle will output the corresponding speed.
Example:

M3
S1000 (Spindle will rotate at 1000 rpm)

This is not the case in my experience with LinuxCNC. The only way I can get the spindle to initialize is to issue the speed command on the same line as the "M3" command. After that first command, you can then assert individual spindle speed commands, but if the speed is omitted on the first line, you will not get any output from the spindle. So only this works:

M3 S0
S1000

Was this by intent, and if so, does anyone have an explanation for why?
 

Please Log in or Create an account to join the conversation.

More
18 Feb 2023 21:18 #264773 by tommylight
Not using mills so i might be off, but i am sure that LinuxCNC will enable the spindle without the S value only if there is nothing related to PWM or PDM and direction in the hal/ini files.
Otherwise it does require the S value.
Later versions of LinuxCNC may require also an $n as there is support for multiple spindles implemented now, so
M3 S3000 $1
should run the second spindle at 3000 RPM.
Please do double check this, as i said, i do not use mills, yet! :)

Please Log in or Create an account to join the conversation.

More
18 Feb 2023 21:31 #264774 by PCW
Replied by PCW on topic M3 Does Not Behave as Expected
I don't see this issue.

If I start LinuxCNC and run this gcode:

m3
s200
g4 p5
s1000
g4 p5
m2

The spindle is enabled and runs at 200 RPM for 5 seconds and
then runs at 1000 RPM for 5 seconds, then is turned off by M2

Please Log in or Create an account to join the conversation.

More
19 Feb 2023 05:16 #264793 by reynolds087
PCW,

You helped me with my offset and scaling recently. Do you think there is anything in that code that would cause this behavior?

Please Log in or Create an account to join the conversation.

More
19 Feb 2023 06:16 #264794 by cmorley

I am curious whether anyone else can confirm this behavior, because it caused me some significant headache while I was troubleshooting my spindle. This is my first experience with LinuxCNC. Originally I was using GRBL, which behaves in the following way. When "M3" is asserted, the spindle is enabled. If an S code is asserted on the next line, the spindle will output the corresponding speed.
Example:

M3
S1000 (Spindle will rotate at 1000 rpm)

This is not the case in my experience with LinuxCNC. The only way I can get the spindle to initialize is to issue the speed command on the same line as the "M3" command. After that first command, you can then assert individual spindle speed commands, but if the speed is omitted on the first line, you will not get any output from the spindle. So only this works:

M3 S0
S1000

Was this by intent, and if so, does anyone have an explanation for why?

 

What version of linuxcnc? The behavior was changed in 2.9 I believe.

Please Log in or Create an account to join the conversation.

More
19 Feb 2023 19:42 #264825 by andypugh
Did you say that you have modified LinxCNC to enable M3 remapping, and are running a remap routine? Or was that someone else?

Please Log in or Create an account to join the conversation.

More
19 Feb 2023 22:03 #264831 by PCW
Replied by PCW on topic M3 Does Not Behave as Expected
ahh, I was testing with 2.9 so that may be the issue.

Please Log in or Create an account to join the conversation.

Time to create page: 0.141 seconds
Powered by Kunena Forum