Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Vogavt on January 01, 2011, 02:51:39 PM

Title: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 02:51:39 PM
Using Mach 3, Version R3.042.020
Using xylotex XS-3525/8S-4
Using cnc4pc C11 board
Using Harbor Freight Mini-Mill (44991) with stock DC motor


I'm attempting to calibrate the spindle speed after discovering the speed was way off following the purchase of a hand-held tachometer.

Checked the "Spindle Pulleys" from the Configuration Drop down.
      Set to Pulley Number 1, min 500, max 1800, ratio 1
      Select Okay

Went to the settings tab and verified on Pulley 1.

Went to Function Cfg's, Calibrate Spindle
      Set the control to 500
      Pressed Spindle on/off and checked speed with tachometer
      Getting a reading of 2000 rpm!

Went back to "Spindle Pulleys" from the Configuration Drop down.
      Changed the ratio to 0.25
      Select Okay

Went to Function Cfg's..> Calibrate Spindle
      Set the control to 500
      Pressed Spindle on/off and checked speed with tachometer
      Still getting a reading of 2000 rpm!

I've restarted Mach3, I've saved settings, etc., but I can't seem to get the changes to take place.

Not sure how the AutoCal works since I don't have any feedback to system regarding RPM. I did note that when selecting AutoCal the software does in fact cause the speed to increase gradually, but I always stop before it ends due to the latter reason.

On the motor tuning of the spindle, I have:
      Steps per:  1000
      Velocity:     1500
      Accel:        161.25
      Step Pulse: 4
      Dir Pulse:    4

Odd thing is, I can't change the Velocity. I can type in new numbers but when I click somewhere else on the dialog, the number reverts to 1500.

On the Ports and Pins, Spindle Tab:
      Motor Control is set to Use Spindle Motor Output and Step/Dir. If I disable it, I can't get the spindle to turn at all.
     "ModBus Spindle - Use Step/Dir as well" is disabled
     "Special Functions - Use Spindle Feedback in Sync Mode" is disabled

Any help would be appreciated!

Happy New Year 2011,
Vogavt
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 03:00:45 PM
Can you attach your xml please.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 03:09:15 PM
See attached.

Thanks!
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 03:20:46 PM
Ok first thing is the reason you cant get a higher velocity than 1500 is because you are running the kernel at 25KHz and with a step per unit of 1000 that equates to a max velocity of  25000/1000 = 25 units per second or 1500 units per minute.

What kind of motor do you have for the spindle?
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 03:31:04 PM
Stock Harbor Freight mini-mill DC motor, which is rated to 6000 rpm.

I am actually able to get the spindle to turn to 4600 rpm, but didn't want to push that high for any duration.
This is with the mill in high gear and telling the spindle calibration to run at 1750 rpm (yields 4600 rpm on spindle).

Which brings me to another point. I want to be able to select either gear speed and then tell Mach which "pulley" I'm using and the numbers come out right when I give it a M3S??? code.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 03:32:53 PM
What speed control board do you use?
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 03:33:39 PM
Also, I modified my original post and provided some additional information since I first posted it. You may need to reread it. Sorry, just trying to capture everything here for future reference.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 03:35:42 PM
What speed control board do you use?
Hood

Icon Health & Fitness Inc. From Surplus Center (tread mill controller): Model MC-60
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 03:46:39 PM
I have no experience with anything other than true Step/Dir spindles but will try and help.
When you command max speed what voltage do you get from the CNC4PC board?
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 03:52:02 PM
Just to make sure I don't blow something, do you know where I'm supposed to take that measurement?

I would assume what's coming out of the controller, but since you reference the cnc4pc - c11 board I'm confused.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 03:56:33 PM
On the output of the c11, there's a 0-10v connection that goes to the P2 pin on the controller board, the GND wire goes to the P3 pin.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 04:01:56 PM
Okay something's really wrong here. I disabled the Joy stick plugin and closed Mach a few minutes ago and saved settings. I just restarted it and it gives me the error message, "no Shuttle detected of type selected". Looked at the config plugins and see that it's back.  Weird.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 04:13:11 PM
I just checked it with the "current" (pun intended!) configuration and with the Mach spindle setting at 500 rpm, I get 7.5 volts.

In high gear I'm getting 3800 rpm at the spindle.  I don't really want to push the bearing much over this since it's supposedly rated for 2500 rpm (some say they will take up to 6000 rpm, but not sure about the plastic gears).
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 04:18:13 PM
Ok from the reading I did the CNC4PC C11 has spindle control output on it, it should output between 0 and 10v depending on what speed you command. Have a look at page 18 of its manual.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 04:24:29 PM
Ok from the reading I did the CNC4PC C11 has spindle control output on it, it should output between 0 and 10v depending on what speed you command. Have a look at page 18 of its manual.
Hood

So I'm okay there, but still can't figure out why my config changes aren't actually taking place.  Makes me wonder if I might need to reinstall Mach, which I don't really want to have to do unless necessary.

Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 04:32:26 PM
What config settings are you meaning, if the Velocity then I have explained why you can not set any higher.
From my reading of the CNC4PC manual this is what you want, ie when a full speed is commanded the pin puts out a pulse of 25KHz to the C11 which then converts that to 10v.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 04:41:57 PM
The fact the when I change the pulley ratio for either pulley I can't get a change in rpm at the spindle, i.e., the actual voltage going to the DC motor isn't being affected no matter what ratio I give it in the "Config - > Spindle Pulley" dialog.  I was assuming that when you make a change in the ratio, the actual spindle speed (more succinctly, the DC current going to the motor) would change based upon the ratios from the motor pulley size to the spindle pulley size.

The second oddity as stated earlier, is when I make a change in the plugins I'm not using (disabling Shuttle) and save settings I would also assume that however I've configured my plugins will stay that way even after closing the application and restarting.

Am I missing something here?
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 04:46:02 PM
I am not sure how the ratio affects the actual output, it was my thinking that it was to  scale the input, ie your index pulse is on the motor but you have a reduction of 2:1 so if motor is turning at 1000 rpm the spindle would actually only be 500 so Mach would scale the index pulse by half and the reading in Mach would show what the spindle is actually doing rather than what the index pulses are.

I will have to go back and read what you are meaning regards plubins as I must have skirted over that.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 04:51:26 PM
Ok the shuttle message is normal, just goi to C:\Mach3\Plugins and delete the shuttle plugin or if you dont want to delete change the extension from dll to m3p. When you restart Mach you should not get the message any more.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 05:20:57 PM
Ok the shuttle message is normal, just goi to C:\Mach3\Plugins and delete the shuttle plugin or if you dont want to delete change the extension from dll to m3p. When you restart Mach you should not get the message any more.
Hood

I respectfully disagree. I would think that simply disabling the plugin would keep the error message from appearing. Oh well, I can certainly delete/rename the dll, but I'm not having issues with the others.  See attached.


I really need to figure out how to correctly set the speed at the spindle. I don't savy putting in bogus speeds in the G-Code to make it come out correctly at the tip of the spindle. There has to be a way to make this work.

Thanks for all your help so far,
Vogavt
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 05:26:08 PM
The shuttle seems to be hard coded into Mach for some reason so even disabling in the plugins config has no affect as you have found out ;)

If you command the max speed that you have set in the spindle pulleys page do you get 10v out?
Hood

Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 05:58:26 PM
Didn't know it was hard coded. Will rename per your advice.

I see you're bound and determined to break my gears! LOL!

Okay, I have the Pulley Number 1 selected which has min 500 and max 1800, ratio 1.

When I start off with M3S500 the spindle moves, go to S60 (5v), go to S1200 still okay (10v) , go to S1500, spindle shuts down.

The odd thing is I can input on the Motor tuning for the spindle anything <= 1500.  If I put a value higher than that it just reverts to 1500 as stated earlier.

Do I need to set this value to 1200 since that's what producing 10v?

I guess what I'm saying is that the max speed of the motor is what it is at 10v. Now all I have to do is equate that to the spindle speed. (I think)  But back to square one, how do I tell Mach what that speed is if it isn't through the pulley ratio.

Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 06:12:08 PM
Ok you need to output 25KHz for you to get  10v  according to the C11 manual so if using a kernel of 25KHz then you need to slide the Velocity to its max so that when commanding the max spindle speed it will be 25KHz. As mentioned earlier the max Velocity at 25KHz kernel with 1000 steps per unit will be 1500units per minute so you will never get higher than that unless you alter the kernel but I dont think you need to.
I think what you need to do is unhook your motor controller from the C11 and then connect a voltmeter instead then command full speed and then adjust the pot on the C11 so that it puts out 10v, you can then command half speed and confirm it only outputs 5v.
The manual however isnt very clear so another way would be to alter the steps per unit to get your max velocity in Motor tuning and that may work.
For example if your max spindle speed is 6000 rpm then that is 6000 units per min. At a kernel of 25KHz and a max velocity of 6000 then the steps per unit required would be (25,000/6,000) x 60 = 250

Hood

Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 06:44:50 PM
Disconnected the controller board and here's what I measured:

S500 = 4v
S1200 = 10v
S1300 = 11v
S1500 = 13v

I stopped at S1500 until further instruction as I'm not sure how much voltage I need to output before something blows.

Are you saying that I should set it to S1500 and back the volts down to 10v at that commanded speed?
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 06:55:29 PM
OK what I think I would try is set the steps per to 250 and then you should get the velocity to 6000 (think you said that was the max) then command a S6000 and alter the pots on the C10 so you are getting 10v at that commanded speed.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 07:20:18 PM
Once I set the step per to 250, I could then change the Velocity to 6000.

Now to be clear, do you want me to do the tweaking with the controller board connected and under a load or do it without the controller board connected?
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 07:26:42 PM
I would just concentrate with getting 10v out when commanding S6000 and 5v When commanding S3000 etc. Then once you have that set correctly you can hook up the controller and adjust that if there is adjustment.

Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 07:58:53 PM
Well I had to back the pot all the way down to where it wouldn't go any lower before I could get the 10v at 6000.

In the meantime, I now can't get the X-Axis to move. The Y & Z are fine. I can see the LED light up on the C11G board, but the motor's not even attempting to move. I didn't touch any of its wiring. I first noticed it would move right after disconnecting the controller board wires from the C11. I didn't say anything, just thought it would possibly pick up again on the power cycling, but no joy.

I'm going to reload my saved copy of xml and start again from there.

Also, I set my pot back to where it was before all this.

I'm about ready to call it a night. Been a long day.

Thanks again for your trouble of hanging in there with me,

Regards,
Vogavt
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 08:02:56 PM
Ok well the manual seems to say set to max velocity with a step per at 1000 but it doesnt explain much more from what I could see, so might be best going back to that.

I think Mach should output whatever you have in the spindle pulley as a max but from your earlier tests it didnt seem to do that.
Might be best contacting Arturo to see if he can advise how to set up his board.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 01, 2011, 08:12:53 PM
Loaded the saved xml........ X-axis working again, whew!!! ;D ;D ;D

Will give Arturo a shout later.

Happy New Year!!!
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 01, 2011, 08:24:08 PM
Great :)
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 02, 2011, 03:04:00 PM
Hood, Glad to see you're on at the moment.

I'm back at is again and now i have something odd going on. The spindle won't come on at S500, but does at S800 command and when it does it starts abruptly and runs at ~4000 rpm. No matter what I change the pot on the C11 to, it still sounds like its about to strip the gears when starting and while running.

To recap yesterday, all I did was play with the motor tuning and turn the pot.  I've see the steps per back to 1000 but can't get the accelleration down below 6.25. It starts off like a bat out of Hades.

Wonder now what miight be going on.  Like I said, I contact Arturo tomorrow. Just wondering if I might have missed something being set back to its original state before all this began.
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Hood on January 02, 2011, 05:16:21 PM
Can you attach the xml you have now.
Hood
Title: Re: Can't get the spindle/pulley calibration figured out
Post by: Vogavt on January 08, 2011, 07:52:11 PM
Cross posting here for the latest information:

http://www.cnczone.com/forums/benchtop_machines/119349-cant_control_my_spindle_speed.html