Hello Guest it is March 28, 2024, 12:04:18 PM

Author Topic: Spindle speed buttons  (Read 1161 times)

0 Members and 1 Guest are viewing this topic.

Offline Vivek

*
  •  13 13
    • View Profile
Spindle speed buttons
« on: November 07, 2018, 01:07:52 PM »
Hi

I am trying to figure out how the spindle override slider works and how to make spindle over ride buttons for specific speeds. I have attached the screen I made to this post but it is not working as expected. I want the following done.

1) Use the slider to override the spindle at any point in the code and keep the range from 6000 to 18000 (what it does right now is it ranges on the rpms depending on the current spindle speed of the g-code program, I don't want it to be dependent on the program speed.)
2) Have buttons with specific rpm that when clicked it goes to that rpm and overrides the g code program. (what it does now is it ranges on the rpms depending on the current spindle speed of the g-code program and it doesn't over ride the program.)

My max speed is 18000 rpm and Min is 6000 rpm, so when coding it uses 100 as the 6000 and 300 as 18000

Here is the code I am using for the buttons under the left up script:

scr.SetProperty('slideSRO', 'Value', tostring(100));         <-- this is for the speed or 6000
scr.SetProperty('slideSRO', 'Value', tostring(133.3));      <-- This is for speed of 8000
scr.SetProperty('slideSRO', 'Value', tostring(166.6));      <-- This is for speed of 10000
scr.SetProperty('slideSRO', 'Value', tostring(200));         <-- This is for speed of 12000
scr.SetProperty('slideSRO', 'Value', tostring(233.3));      <-- This is for speed of 14000
scr.SetProperty('slideSRO', 'Value', tostring(266.6));      <-- This is for speed of 16000
scr.SetProperty('slideSRO', 'Value', tostring(300));         <-- This is for speed of 18000
Re: Spindle speed buttons
« Reply #1 on: November 07, 2018, 07:28:54 PM »
Vivek,
I'm pretty sure your Base Spindle RPM is totally dependent on G Code.
You can override the RPM from 50% - 150% .

That being said, I don't think you can change commanded spindle speed with a button while G Code is running.  I just tested this and it kept locking up the GUI. 

What you can do is make buttons that do math in them to get your desired spindle speed or at least up to 150% of commanded.

What do you mean by Coding 100 = 6000
You mean Commanded S100 is an actual RPM of 6000?
Chad Byrd

Offline Vivek

*
  •  13 13
    • View Profile
Re: Spindle speed buttons
« Reply #2 on: November 08, 2018, 02:37:14 PM »
Thanks Chad,

I just meant that when giving spindle command to run at 6000 rpm I need to input it as 100 in the over ride dro. or when I code the spindle buttons.

Vivek
Re: Spindle speed buttons
« Reply #3 on: November 08, 2018, 04:14:31 PM »
Vivek,
Okay.  You can only go to 150 percent. That being said, If you make 12,000 RPM is at 100% then 50% is 6,000 RPM and 150% IS 18,000 RPM. 
Would that work? 
That would allow you to add buttons to reach your min and your max RPM.
If that works I can help you get the buttons to work correctly.
Chad Byrd
Re: Spindle speed buttons
« Reply #4 on: November 08, 2018, 04:28:30 PM »
Vivek,
You can use the following code inside your buttons.
In your G Code, have a commanded Spindle RPM of 12,000.

mc.mcSpindleSetOverride(inst, 0.500)  -- This is for speed or 6000
mc.mcSpindleSetOverride(inst, 0.667)  -- This is for speed of 8000
mc.mcSpindleSetOverride(inst, 0.833)  -- This is for speed of 10000
mc.mcSpindleSetOverride(inst, 1.000)  -- This is for speed of 12000
mc.mcSpindleSetOverride(inst, 1.167)  -- This is for speed of 14000
mc.mcSpindleSetOverride(inst, 1.333)  -- This is for speed of 16000
mc.mcSpindleSetOverride(inst, 1.500)  -- This is for speed of 18000
Chad Byrd

Offline Vivek

*
  •  13 13
    • View Profile
Re: Spindle speed buttons
« Reply #5 on: November 08, 2018, 04:32:14 PM »
Yes That would work. Now will the 100% stay set at 12000 RPM or will it be replace with the gcode RPM when its running a program.

Thank you.
Re: Spindle speed buttons
« Reply #6 on: November 08, 2018, 05:29:39 PM »
Whatever spindle speed you command in G Code will be the RPM at 100% Spindle Override.
So when you post your G Code, just be sure that RPM is set to 12,000. 
Will that always be what you want your Spindle RPM to be set at?
Chad Byrd

Offline Vivek

*
  •  13 13
    • View Profile
Re: Spindle speed buttons
« Reply #7 on: November 09, 2018, 10:33:50 AM »
It wont always be 12,000 rpm but I understand how it works. Thank you for all your help. :)

Vivek