Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: lakeguy2 on January 11, 2010, 11:55:15 PM

Title: Spindle won't run, flashes yellow?
Post by: lakeguy2 on January 11, 2010, 11:55:15 PM
 >:(    I have tried everything to make the spindle work, the x-y works fine. I set up spindle the same way but nothing. flashes the speed for a second then goes yellow  nothing .I have spent all day on this and nothing! I do not have any encoders or switches hooked up so everything is pretty much off except the x-axis and spindle, set up,  I am trying to use a 1.8 deg stepper to run at about 100 rpm
enabled  and active step/dir. does mach 3 2.0 need encoders and start/ stop switches? whats the deal, I thought i disabled it all? What is the procedure from start to finish, the only thing i could find was how to use a relay going through output pins

what about direction and step outputs ? thats what i need! 1.8 deg stepper motor running at 100 rpm, no ramp up-down no dwell. no encoders no start stop buttons , just to make it run when i program m3 s100 run my g-code then m5?
 
what am i doing wrong or not doing? if I were to do another fresh install or reset everything to factory, what would i need to check-uncheck and change to make this work? after spending 10 hours on this I have tried everything and am at the end of my rope.

if I have to I will just use the x axis and do all the conversions and enter all the distances to make it turn, but that seems stupid. when m3 s100 is all i need?

thankyou, steve



thankyou in advance for your help.
Title: Re: Spindle won't run, flashes yellow?
Post by: ostie01 on January 12, 2010, 12:43:37 AM
Hi.

You will not be able to run a stepper that way.

Stepper needs step to run and with command like M3, nothing will happen

You will need an external clock to get step to the motor driver or since it is hook up as an axis motor, try something like x or y or whatever is hook up to that input, X 10000 and maybe you get some turning from you spindle motor.

When you use the command M3 S1000 it only turn on or off the input, and as I said, stepper motor needs step, many step.

If you have a small Ac or DC motor, replace the stepper with it and try to control it with the relay.

Jeff
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 12, 2010, 04:45:25 AM
Stepper should work fine as a spindle, well as long as you understand the limitations of torque and speed that a stepper will have.
Attach your xml and I will have a look but basically you just set the spindle port and pins up to the the step/dir pins that you are using for your spindle and then set the spindle steps per unit/ velocity and accell for spindle in motor tuning.
Hood
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 12, 2010, 04:47:14 AM
Oh BTW you will have to have some delay in getting to full speed but that will be determined by how fast you can get the accel set in motor tuning for the spindle.

Hood
Title: Re: Spindle won't run, flashes yellow?
Post by: lakeguy2 on January 12, 2010, 10:26:49 AM
It will run at less than 100 rpm with little to no torque. I did all the settings the same as the x-y set the output pins set the pulses per all that, spent 10 hours setting re-setting, searching, standard protocol does not work. I need to know what boxes to check or uncheck
and what values to put where for what i need. and if this program will or will not run on spindle mode without encoders and or external
start switches, it seems to be waiting for something? my actual spindle motor ha
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 12, 2010, 11:10:38 AM
Can you attach your xml and I will look and see your settings and probably find what you are missing.
Hood
Title: Re: Spindle won't run, flashes yellow?
Post by: lakeguy2 on January 12, 2010, 11:29:15 AM
my mill xml
Title: Re: Spindle won't run, flashes yellow?
Post by: RICH on January 12, 2010, 12:56:02 PM
HI ALL,
I will jump in here as a newbie since i never set up a stepper motor to run a spindle until 5 minutes ago!
Just so you know i have a stepper attached to a gear reducer which dirves the lathe spindle.
Don't have any encoders or feedback, so basicaly just like yours.It works fine here and here is some info:
CONFIGURATION:
PORTS &PINS>MOTOR OUTPUTS- enable the spindle and assign the pin out and state just like any other  stepper.
                      >SPINDLE SETUP - check the Use SPindle motor Output and Step/Dir Motor
                                                   - Check use spindle feeback in Sync Modes, for now you can uncheck spindle speed averaging
                                                   - i have Disabled Spindle Relays checked
                                                   - used 0 for all the General Parameters
To get an RPM display you need to have at least an single slotted index via Opto or whatever, else you will not get an
RPM display. Associated with this are a few other settings which affect how fast the rpm will display, but for now lets just get
the spindle moving.

                       >Motor Tuning - You can have the steps per unit set up a number of different ways for the spindle......
                                                IE; steps per rev, steps per degree, steps per inch and depending on what you
                                                do requires an appropriate velocity setting and acceleration. Hood can enlighten us more on this.
                       BUT.....no matter what you choose your spindle will turn on a commanded S but it could be so slow
                       that you would think it is not turning, just listen to the stepper later on and you will hear the pulses being sent to it.
                       I didn't use step per rev ( 270000, specific to my machine) or steps per degree ( 750)  but used inches per rev
                       which happens to be 21352 for me based on a 4.025" diamter vel at 60 and accel 12 and the stepper dosn;t skip
                       with those setting for me.
GENERAL CONFIG> DEBOUNCE Interval is 600 Index is 10  ( affect index / rpm display )
                             > Shuttle accel is .005
In the MDI:
type in - S5000 ( Start  low say S5, S100, S1000, S5000 )
type in  M3 (rotate spindle CW)  or M4 ( CCW) - the spindle will start turning......
type in M5 to stop the spindle

At least the spindle should turn for you,  :D

HOOD, lots of places you can commnent on in my reply, feel free to do so......  ;)

RICH
Title: Re: Spindle won't run, flashes yellow?
Post by: RICH on January 12, 2010, 01:14:53 PM
Oh I forgot,
CONFIG>SPINDLE PULLEYS- set the min and max speed and gearing ratio if any.
RICH

MODIFIED: Input of a ratio caused loss of RPM display .  ???
               
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 12, 2010, 04:36:10 PM
To me a spindle should only be set up as steps per rev or the S word would be kind of meaningless but up to the user I suppose.

RPM display should not disappear with a ratio set, possibly that could be due to the 035 revision?

Hood
Title: Re: Spindle won't run, flashes yellow?
Post by: RICH on January 12, 2010, 04:53:35 PM
I will repost later on the motor tuning and settings, got to go.
Amazing what you find after RTFM, but then depends on what manual you read. ;)
Later,
RICH
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 12, 2010, 05:38:32 PM
I have no experience with the PP and spindle setup, I do know it said to set Vel as revs per second but when I did that with the SS it was 60 times to slow ;D

Hood
Title: Re: Spindle won't run, flashes yellow?
Post by: RICH on January 12, 2010, 10:52:51 PM
READING THE MANUAL:   :) I can write but not read !  :D

In the Mach3 CNC Controller - Software and Installation Configuration Manual section page 5-29 section 5.5.5.3 you will find instructions on how to set the steps per unit. For a 1.8 degree stepper ( 200 steps ) and 10u steps you
would have a "steps per unit" ( pulses required  for one rev of spindle ) of 2000 x 135 (total  gear reduction in my case )=270000 for the input in motor tuning.

The velocity setting in motor tuning should be in "revs per second"  at full speed as Hood mentioned. I know the max reliable rpm for mine is around 10 rpm, then 10/60= 0.1666. When tried, the spindle turned extremely slow.  :-\
So input 10 ( 10 revs per minute) and spindle speed was correct.
Is the manual wrong?  ???

CONFIG>Pulley Selection - there is only one pulley, so to speak, for this kind of setup, so for pulley number 1
                                     O min   10 max   ratio 1

So i could measure / test the indicated RPM in the DRO ( make sure the spindle pulley is 1, lathe screen here) the configuration was changed as follows:
GENERAL CONFIG>Spindle Incr. value was changed from 10 to 1 (this allows you to step the spindle speed in 1 rpm increments and note that it must be an interger and can't input values like 0.5)

The spindle displayed rpm to set rpm agreed and was correct to within the  1 rpm value that i could measure. ( if you don't have an rpm measuring device you could always take  a time reading using a stop watch over a rev and get a fairly decent measurement.

All a user  need to do is read the whole manual to get the above posted info ........... ;D

BTW: MACH ver .033 using PP

Hope this helps,

RICH
Title: Re: Spindle won't run, flashes yellow?
Post by: lakeguy2 on January 13, 2010, 01:11:40 AM
Got 150rpm @100% speed rate with a per of 100000 vel of 10 and .1872 other value with a S1500 gcode. Im sure to someone a 1.8 deg stepper in half step these formulas make perfect sense? (1 pulley) but not to me? It does work however and that makes me very happy, perhaps when I am less stressed I will take the time to make sense of it???
thanks again for the help!!!!!
Steve
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 13, 2010, 02:52:58 AM
Rich
 Didnt know if the PP used Revs per Sec as per manual or Revs Per Min as per the SS. Actually the SS is supposed to be set up differently according to Greg but it seems to work the normal way. The way Greg says to set the SS up is Steps per is the max frequency, so for 2000line encoder servo that would be 2000 x 4 =8000 Then multiply by full speed so say 2000 in my case that would be 16,000,000 then divide by 60 to get the frequ it equals 266,666.  The Vel is then set to 60. Seems a weird way to do it but it works just the same with the SS  In the end the values work out the same as 8,000 Steps per  x 2,000 Vel = 16,000,000 pulses and 266,666.666666666666666666666 x 60 = 16,000,000 pulses just one way is easier to work out than the other LOL
 One other thing I have found out regards the SS which may or may not affect the PP is if you dont have the max pulley set to the max spindle speed it will need some crazy numbers in the steps per unit, seems the SS is also looking at that value and working things out from it and I have never heard Greg mention this or seen it written any place. No mention in the manual whether this is the case for the PP as far as I can see.

Steve, if your  spindle is direct drive try 400 for steps per 150 for Vel (if thats what the max speed will be) and then the Accel will be set to suit depending on the ramp you want. If that is not giving you the correct values make sure you have the Pulley setup to your max speed of 150 with no ratio set and make sure pulley 1 is selected on the diagnostics page, not sure if this effects the parallel port but it definitely does for the SmoothStepper.
Hood
Title: Re: Spindle won't run, flashes yellow?
Post by: RICH on January 13, 2010, 10:56:56 AM
Thanks Hood,
Interesting, in that, just a little miss interpretation of what is written, can create a lot of confusion.
You can see this through many posts on rotary / 4th axis use. Then you get into use of the rotary for indexing
or continuous rotation, add the rotation radius settings for feedrate compensation, maybe restrictions on motion in the different planes, work arounds that have been posted to do something,lack of a feedback ie; encoder or index, some recent changes to Mach ,the swapping axis and gcoding ......well, lets just say the rotary  can complex quickly!
And a bad setting in the beginning can affect things down the road.

Nothing around that puts it all in perspective ........good grief .......another write up.......How to get confused!  :)
RICH

Having fun Pete?


Title: Re: Spindle won't run, flashes yellow?
Post by: lakeguy2 on January 13, 2010, 12:51:35 PM
Hey guys, HOOD those numbers are what generated this post to start with, as far as i can tell you get you get about a pulse  a second?  what i did does work great but its a lot of zero's 00000000, I don't know why it does not work? maybe I have a setting wrong? I dunno? I just kept adding zero's untill I gor some speed, Firured 10's would work best to actually figure out why what i have done works do produce the desired results, with only one extra 0 in the speed!!!
I do have 4 pulleys set, 1 didn't seem to change anything. the max speed change did seem to create some negative problems however so I set it back to 25000. IT wont EVER go that fast anyways, and it messes with all those zero's

I think when I get serious about power and size, optical coders and a frequency drive is what this is geared towards. not a stepper motor? but it does work, but doesn't seem to be plug n play like the other axis's.

If someone gets bored feel free to recheck these results, at least I will know for sure. I am using the parallel ports to drive a step direction controller. I think the first response had some merit saying an external frequency generator, using
1 pulse as 1 revolution would produce better results?

Steve
Title: Re: Spindle won't run, flashes yellow?
Post by: Hood on January 13, 2010, 01:15:58 PM
Rich
 as said I have never used the PP with my servos so not sure if it is indeed RPM rather than RPS as the manual states, certainly looks like it though.
With your readout problem when you set a ratio, can you try 032 as that is fine for me with the readout/ratio. Ver 4 that I have been testing has no readout but afraid I have been working away today so not had a chance to try setting 1:1 to see if that is the problem.

Steve,
 I have AC servo spindles on the lathe and mill and they are superb, it is the way to go if you can afford them or manage to pick them up like I have for a reasonable cost. Continuous torque from zero RPM up to rated RPM and plenty of speed.


Hood