M3 Does Not Behave as Expected
- reynolds087
- Offline
- Junior Member
Less
More
- Posts: 35
- Thank you received: 2
18 Feb 2023 18:51 #264767
by reynolds087
M3 Does Not Behave as Expected was created 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?
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.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19430
- Thank you received: 6517
18 Feb 2023 21:18 #264773
by tommylight
Replied by tommylight on topic M3 Does Not Behave as Expected
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!
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.
- PCW
- Online
- Moderator
Less
More
- Posts: 17900
- Thank you received: 4783
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
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.
- reynolds087
- Offline
- Junior Member
Less
More
- Posts: 35
- Thank you received: 2
19 Feb 2023 05:16 #264793
by reynolds087
Replied by reynolds087 on topic M3 Does Not Behave as Expected
PCW,
You helped me with my offset and scaling recently. Do you think there is anything in that code that would cause this behavior?
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.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7766
- Thank you received: 2056
19 Feb 2023 06:16 #264794
by cmorley
Replied by cmorley on topic M3 Does Not Behave as Expected
What version of linuxcnc? The behavior was changed in 2.9 I believe.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.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23314
- Thank you received: 4861
19 Feb 2023 19:42 #264825
by andypugh
Replied by andypugh on topic M3 Does Not Behave as Expected
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.
- PCW
- Online
- Moderator
Less
More
- Posts: 17900
- Thank you received: 4783
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.071 seconds