Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: sshneider on April 19, 2006, 01:17:58 AM

Title: What's the best way to determine motor velocity?
Post by: sshneider on April 19, 2006, 01:17:58 AM
Just kinda curious what your take on this is?

When I tune my motors on the config screen, I get then going till they start missing steps (around 130 in/min), then back it off untill they run without missing (120 in/min).

This works fine assuming I don't Feed Rate Overide more than about 120%.  If I go above this FRO then I miss steps.

So what's best, tune your motors to a velocity that takes into account a max FRO of 290% (which would then cause everything to run super slow at 'normal feed rates).  Or just forget about FRO's above a certain ceiling level?  Is there a way to set the max FRO someplace?

Thanks,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 19, 2006, 08:09:13 AM
If it was me I would have it set to 100IPM for the max rate...
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 19, 2006, 08:29:49 AM
Hey Brian!  ok 100 IPM but then if I use a FRO ove say 200% that will cause the motors to miss steps.  So, how to prevent this?  Is there a way to set a limit to the max FRO or is it something that just has to be remembered manually?

Thanks,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: fer_mayrl on April 19, 2006, 10:40:20 AM
correct me if i am wrong,
but i think that if you tune your motors for 100 ipm in the motor tuning dialog, then that would be the max speed for that motor, you wont be able to go over that speed even if you have a F4000 on your gcode, or yo have a F100, and feed rate override to 300%, the speed should be limited to the 100 imp that you set on the tuning dialog.
Hope this helps
Fernando
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 19, 2006, 10:51:11 AM
Fernando,

Thanks for your reply!

One one think that this is the case, but it does not seem to be true.  I could be mistaken but it seems to me that I iif I set the motors to 100 IPM in the tuning screen, I can make the motors move faster (& miss steps) than 100 IPM by runing a program using an FRO of F200. 

That's why I asked the original question because it seems this is either a bug or I am doing something wrong (which wouldn't be the 1st time  ::) )

Perhaps most 'seasoned professional CNC-ers, don't even bother with FRO above 100%.  But if that's the case why even have that as a feature?
Sid

Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 19, 2006, 09:30:12 PM
I have (in the past) redone the buttions for the FRO... I have made buttons that will not go past 125% because I program with the right rate and don't ever need more than 125%... If you would like I can give you a hand with that.
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 20, 2006, 01:08:37 AM
DUDE!!!  Now were cookin' with Gas!  Yeah, I would like to create some kind of limit to the amount of FRO.  Lemme play with the machine a little and let you know what my max is.  Thanks Brian!

Regards,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 22, 2006, 02:22:03 AM
I have a Dream....

Hey Brian,

After messing around a bit, I was able to determine my max velocity before missing steps but, there is another consideration. 

I cut different types of materials, sometime wood, sometimes foam, sometimes casting resin.  Each of these materials will use different feed rates and, of course, only allow for a certain FRO before things get 'hairball'.

That being said, is there a way to create some kind of a user definable "Max FRO" input box someplace (maybe on the settings page)?  Then if someone was runing the program and they tried to run the FRO up, they could not go past the Max FRO?  (kind of like those stupid govenors they put in all the rental trucks)

The absolute best would be if somehow, someway you could use a Gcode to set this limit and could write that limit/Gcode into each program.  I know that this idea is probably not realistic but hey, I said it was a dream.

Lemme know what you think we can do?

Thanks,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 22, 2006, 08:04:04 AM
it is all doable ;) Now we just need a programer...

I will see if i have time in the next few days
Title: Re: What's the best way to determine motor velocity?
Post by: DAlgie on April 22, 2006, 10:51:49 AM
I use Surfcam for program generation, in this, and I'm sure all CAM programs, you set the material to be cut when you generate the Gcode. You can play with the material specs to make it automatically generate the feeds and speeds you want. Example, for aluminium, it will generate a fast spindle rpm and feedrate, with hard steels a slow rpm and feedrate, and you adjust these to suit your particular machine. Unless you machine very simple parts, you need CAM, might as well use this feature as well.
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 23, 2006, 09:04:44 AM
I have been thinking about this and I can do this in the Macro Pump... So here is a quick little bit of code to fix the max FRO problem...

'This is to set the MAX FRO to 125%
If(GetDRO(21) >125) Then
   Call SetDRO(21,125)
End If 

This should fix the problem
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 23, 2006, 06:06:13 PM
Brian,

Thank you for thinking about this and offering a solution!

2 things... idon't know what a macro pump is.  I'm going to crack open the manual and see if I can learn about it.

The second item is, I think this programming tweak does resolve my request to place a limit on the max FRO but, if I understand how you propose to do it, I forsee it as being done in a restrictive way.

A 125% max FRO might work for a certain program cutting a specific material but what happens if the material changes and you want more (or less) FRO limit?

Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 23, 2006, 07:37:05 PM
Try this and see how you like it... after that we will see if there is more that we can do.

Go under Config/State and check Run Macro Pump  take the Macro pump file that I sent to you and put in the Mach3/Macro/Mach3mill. once you have done that close the program and restart Mach3. you should be good to go after that....
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 24, 2006, 11:07:48 PM
 :'(  It didn't work.  I followed your instructions.  Do I need to call out the macro in my Gcode?

Thanks,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 25, 2006, 06:45:31 AM
Where did you place the macropump.m1s file? Did you turn it on under Config/State? If that checks out okay Post your XML and I will see if there is a setting that you need to have set.

Thanks
Brian
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 25, 2006, 01:02:35 PM
OK, I figured it out and got it to work.  Here's what happened...

When I clicked on the link for the macro you posted, the "SAve As" dialog popped up and the default file type was set to .txt

So, when I copied that file into the Mill Macros folder it had a .txt extension and therefore was not being recognized as a macro file.  Now it works good. THANK YOU!

So, next question.  Is there a way to make the 125 value in your macro a variable field value?  Could we then create an input box on the settings screen in which this variable value could be plugged in- kinda like the way you can type in a Safe Z value?

Obviously my comprehension of the programming capabilities in this area are limited so please forgive me if this is a Lame question.

Thanks again Brian.

Regards,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 25, 2006, 02:20:51 PM
Sid this is a simple change but I am going to have to make a new screen set where you have a place to set the value... I will post a new set and Macro pump in the next few days.
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 25, 2006, 03:48:51 PM
Brian,

You are the Man! 

I have played around with Screen4 and can do some basic modifying and would like to be able to learn more about what you are going to do.  Is there something I can do to help? 

Thanks!

Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 25, 2006, 06:53:06 PM
You need to add an LED with an OEM code for the DRO. The OEM code should be 1000 to 1250, I will put the value in the Macropump. See if you can add it to the screen set.
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 26, 2006, 12:03:32 AM
Yo Brian!

OK, I think I added the LED.  It's next to the Feed % DRO.  Do I need to create a DRO to input the max number for the F???

I used OEM code 1000.  Check it out and let me know what's next

Thanks,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 26, 2006, 07:53:15 PM
I was thinking DRO and typed LED :( Sorry about that... it needs to be an DRO for the Max F that you would like to have.
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 26, 2006, 09:22:09 PM
Hey,

OK, Well I put a LED there.  What's next?  How do we tie it into a user defined parameter?

Thanks,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 28, 2006, 09:11:11 AM
bump
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on April 28, 2006, 07:43:44 PM
Here is a quick Macro

'If the FRO rate is over the Max set the FRO % to the right val
FMax = GetOEMDRO(1200)
If (FMax = 0) Then
   Exit Sub
End if
FRO = GetOEMDRO(55)
If(FRO > FMax) Then
        Value = FRO / (GetDRO(21)/100)
        NewFRO = (FMax / Value) * 100
   Call SetDRO(21,NewFRO)
End If 

And I changed the screen set too...


That should get you going
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on April 28, 2006, 08:53:23 PM
THANK YOU BRIAN!  It's Awesome!

Regards,
Sid
Title: Re: What's the best way to determine motor velocity?
Post by: jpeter on May 03, 2006, 05:38:38 PM
In my case its the rapid that takes it over the top. Wouldn't it be nice if the FRO only affected feed rates below the max. For example, I decide because of a light cut I can up the rate so I F11 the FRO. Now in a rapid my z is skipping steps. I hate that.

Jim 
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on May 03, 2006, 08:15:37 PM
Jim,

I don't get it.  Isn't Rapid always the same or does the FRO effect rapid also- I never really noticed that.

Sid
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on May 03, 2006, 09:12:25 PM
it will not make the rapids faster but under 100% FRO will slow them down..
Title: Re: What's the best way to determine motor velocity?
Post by: jpeter on May 04, 2006, 02:32:46 PM
I may be wrong about the rapids but here's my situation. My mill will slide at any speed I program. If the speed's  over the maximum the slide goes to its max and continues to move. But, if I FRO above 180 percent  no matter what speed's been programed I skip steps. I assumed it was skipping during the rapids because they're the fastest, most of the time.

Something I need to set differently?

Thanks,

jim
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on May 04, 2006, 03:21:28 PM
Jim,

I'm not sure if you need to set something differently.  To be honest the whole issue of feed rates and motor tuning is a tad bit mind boggling to me.  I think this is due to the fact that some basic principals need to be established in order for me to understand exactly what is going on.

That being said, either I need to just play around with my machine here and have a little 'discovery' time or perhaps Mr. Barker (or others) could help to clarify. 

1.  My Impression is that on the motor tuning screen that the Velocity represents the MAXIMUM VELOCITY THE MOTORS WILL TURN ON A RAPID G0 command.  MAXIMUM meaning that regardless of how high you set your FRO that the motors will never turn faster than this.

2.  If #1 is true then if one sets the max velocity on the motor tuning screen and does not miss steps, it should never be possible to miss steps during the course of a cut (unless the cutter is being restricted from moving but, this is another issue and not related to trying to run the motors too fast

If #1 is NOT true, then measures need to be taken to insure that #1 IS, in fact, true.  I would venture to guess that the measures one would take would be.... BEFORE you go to your motor tuning screen, set your FRO at the MAX (I think it's 290%).  Then do your motor tuning/set your max velocity

So, which is it gang?  Is #1 true or not?

Thanks!

Sid
Title: Re: What's the best way to determine motor velocity?
Post by: chad on May 04, 2006, 05:14:24 PM
sshneider, #1 is not true.

My understanding is (Brian correct me if i am wrong) fro will go beyond the motor tuning max. The motor tuning will dictate what a GO speed is. I think the conventional wisdom dictates that the fro is used primarily to slow down a job, or speed up a little bit. I think the way the pros use it is to fine tune a running program and not as the global speed knob. In other words set your F rate at the speed at, or faster than you want to cut and use the fro to adjust down.
If you are at 290% then you should have set your F much higher, this way you are still within the tuning.

I would tune to the skip point then back off 15% for safety and crank up your F to match, or back off another 20% and you can go higher on the FRO.

?!? 

chad
Title: Re: What's the best way to determine motor velocity?
Post by: Brian Barker on May 04, 2006, 06:56:59 PM
I Like to post my program VERY close to the cut rate that I wish to use... I never go over 150% because there is no need... That is just me.
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on May 04, 2006, 07:09:18 PM
AHA (Said the Blind Handyman as he picked up his hammer & Saw  ;)  )

Slowly things are becoming clearer.  Chad & Brian Thank you for helping me to understand.

Sid
Title: Re: What's the best way to determine motor velocity?
Post by: ger21 on May 04, 2006, 07:40:55 PM
I'm pretty sure FRO DOES speed up rapids. If you don't want it to, check "NoFRO on queue" in Config>State. The downside to that is that FRO will not respond immediately because the moves are buffered.
Title: Re: What's the best way to determine motor velocity?
Post by: jpeter on May 04, 2006, 09:37:28 PM
My x and y are pretty fast but my z tops at 6 in/min. This morning I took on milling some wood. Not knowing much about milling wood I f'd in the speed at 10 in/min. Everything worked as expected but I was in a hurry and the wood was cutting pretty good so I FRO'd to 180% because I know that's my FRO limit, any faster and my z starts skipping steps or hanging. I finished the job with x and y speeds at 18 in/min but z never went beyond 6 because thats the limit. I know though that if I'd FRO'd to 250 or 300% my z would have skipped steps. Even if  programmed it at 2 in/min, like I do in steel, I'd be skipping steps if I FRO'd above about 200%. In the last example the resultant z speed would have only been, at FRO of 300%, 6 in/min, still within the capability of the z. Curious isn't it. Is this pretty much the way it is?

BTW, this is a great discussion.

Jim
Title: Re: What's the best way to determine motor velocity?
Post by: sshneider on May 05, 2006, 12:29:36 PM
I Agree Jim,  Great Discussion!

I think that the primary principle that I have come to understand in this thread is to write your code with an F that is close to where you want to be runing with maybe a little 'wiggle room'.  This is a great idea if you are an experienced operator but if your a newbie then I guess you're in for some trial and error time.

I think one of the things that is confusing is the wide range of the FRO.  If  most dudes only tweak their FRO 20-50% above the F rate then why does FRO go all the way to 300%?  In other words, if travel at the speed of light is impossible, why put a warp drive button on the dashboard?

That's kinda why the doo dad macro pump that Brian worked up is pretty awesome.  It's kinda of a 'governor' if you will.  It keeps one from jackin' things up too far.

In summary, I think that the best procedure (IMHO) for finding motor velocity would be to set your Feed Rate at the highest you ever anticipate runing your machine.  HIGHEST = F x FRO% (you're going to have to do a little math to figure out what this number is).  Then find the max velocity you can run without missing steps.  Then use Brian's Macro Pump and set the Max DRO so it corresponds to the the HIGHEST value.  Does that make sense?  To me it seems like if you follow this method you have a fail safe way to not overspeed your machine.

Happy Cinco De Mayo!

Sid
Title: Re: What's the best way to determine motor velocity?
Post by: ger21 on May 05, 2006, 07:35:05 PM
Just use FRO for ONLY slowing down the machine, and you won't have any problems. Our router at work goes from 0-110%. We leave it all the way up, and program fast. If we need to slow it down, we can, but we never need to go faster than we program.