Hello Guest it is April 25, 2024, 06:36:02 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - smurph

191
Rob has an ESS machine at the shop that has backlash that he said he could test with.  You could try disabling the backlash comp on the ESS and see if there is still a strange movement with Single Block. 

I have it on good authority that Cycle Stop will cancel cutter comp and trying to recover from that just by hitting Cycle Start will be disastrous. 

Cycle Stop used to stop things rather abruptly.  And people complained about it which made me want to ask why they were pressing cycles stop in the first place, hence my rant.  So...  I added a setting that basically does a feed hold before the stop.  THAT takes time.  It also made cycle stop more recoverable, unfortunately (for me).  :)  So check your settings on the general tab and untick that setting.  Cycle Stop should be pretty instant that way.  Oh, and abrupt, crude, rude, and obnoxious.  The way it was meant to be.  If that happens quickly, then we know it was the feed hold portion taking so long.  If so, check that the ESS motion buffer isn't exceptionally large, that will affect how long Feed Hold takes.

Typically, with Mach 4 and a decent PC, you can run motion buffers as small as 30 milliseconds, which to us humans, seems instant.  Anything under 100 milliseconds for most people, actually.  But even the people with the fastest sense of time considers 50 milliseconds instant.  Just to give you an idea on where a good buffer depth is.

I have never seen an issue when using Run From Here.  I'm get it tested again though. 

Steve

192
Well, I don't know why that would affect anything having to do with backlash.  All Mach does is provide the trajectory plan to get from the start position to the end position of the move.  The plan should never change just like the distance between your door and your mailbox never changes.  How you get from your door to your mailbox is the motion controller's job. 

As to Cycle Stop.  I don't like it because it is not recoverable.  My YASNAC control that was on my Matsuura mill had Cycle Start, Reset, Feed Hold, and an e-stop button.  If I wanted to stop the machine and walk away for a bit, I hit feed hold.  On my YASNAC control, Feed Hold was a yellow button.  On most Fanucs, it is a red button but it is labeled "Feed Hold".  I kind of like the red button because most people associate red with stop.  Neither has a Cycle Stop button.  When I converted my mill from YASNAC to Mach 4, it still has no Cycle Stop Button.  Not on the panel and not on the screen.  I believe this is correct for for most milling applications.  I'm not a lathe or grinder guy, so I just don't know.  But a Cycle Stop button has been a Mach feature for nearly 25 years now and people just expect it to be there, for better or worse.  Worse, IMHO.

But anyway, pressing cycle stop USED to be semi-recoverable on Mach 3.  But with Mach 4 and its' MACRO B, better cutter comp, and more advanced Fanuc compatible interpreter, Cycle Stop is just not recoverable.  Especially if you are using cutter comp.  You need to use "Run From Here" to restore the state of the machine to restart.  If you don't use cutter comp or Macro B, you may be able to get away with just pressing Cycle Start.  But your mileage may vary.

Steve

193
Now I'm confused as to what you are calling single stepping.  Single Block?

Steve

194
Well, when someone rants, that's usually a pretty good sign that they're agitated.
My rant was purely to clear up a misconception.  Being one of the authors of the Mach 4 software, I am in a unique position to do that because nobody else can claim to have a better understanding of what is under the Mach 4 hood.  And I simply don't mind explaining it from time to time.   

I have several such rants on different subjects.  Clearly, the backlash issue is one.  Another is the total misuse of constant velocity.  Still another is the myth that a 2000 line look ahead is needed.  And my total and unforgiving hatred of the Cycle Stop button.  Software e-stops.  Machines without limit switches.  Not checking the return codes of the API function calls, etc...

None of these get me really upset.  Well...  with the possible exception of the Cycle Stop button.  :)  But I will get on a soapbox and rant all day about them if I feel the need. 

Am I right in thinking that Mach3 implemented backlash compensation in software?
In Mach3, Art did implement it with the parallel port.  I'm not sure if ESS did or what other external motion controllers did.  I'm certain that the Galil plugin didn't implement it.  So it was pretty much just like Mach 4 where it depended on the motion controller and was not universal.

Way back in the beginning, we actually tried implementing backlash compensation in Mach 4 to make it universal no matter what motion controller was used.  But I was never happy with it.  It still depended on the motion plugin being preprogrammed in a specific way so it was never a true application layer solution.  I considered it a kludge back then and nobody has been able to convince me otherwise up to this point.  Hell, the tool pressure can push the system back into the lash!  So what then?  Tighten the gibs up to create massive drag?  Yuck!  Having built and commissioned numerous machines with the dual encoder feedback, I just don't accept anything less. 

But I'm an analog servo guy from way back and I'm not fond of steppers either.  I can't count the number of servo systems I have tuned.  So maybe I'm just guilty of being a motion system snob?  I dunno...  I'm JUST now warming up to the position controlled (step/dir, digital or whatever) servo drives.  For a long while, only Yaskawa could do them right.  Now everyone else seems to do a decent job of it.  But I still look at these drives without load feedback with a bit of contempt as they just don't seem measure up. 

But back to the KFLOP, I sure do wish there was a KFLOP plugin for Mach4.  I always liked that controller.  Probably because it is capable of controlling analog servo drives.  :) 

Steve

195
Roger,

I'm sorry that you find this upsetting
1. I'm not upset.

2. You made some assumptions and labeled something a Mach bug when Mach doesn't even implement backlash compensation.  The backlash entry field on the motor tuning is simply a storage location for motion controllers to have a one stop shop to go to for pertinent motor information.  It keeps them from having to look in two different places.  Now, I agree that a reasonable person might confer or assume that Mach is implementing the backlash.  That is why I spoke up on the issue.  To make it clear.  So now knowing that Mach has ZERO backlash compensation code in it, are you still going to call it a Mach bug?  Is anyone reading this going to make the same assumption and call it a Mach bug?  I think not.  And THAT was my goal.  Nothing else. 

This is also exactly analogous to rigid tapping or lathe threading.  Mach has G code for those functions.  But does the motion controller support it?  If a person didn't do his research, they may assume (there is that word again) that Mach in combination with ANY motion controller is capable of doing these operations.  If the motion controller does a crappy job at implementing the threading op (not that any do), it that considered a Mach bug?  I would think not. 

Since I don't have access to your code, I can't see what's been done.
3. Again, there is ZERO backlash compensation code in Mach.  This is what I wanted to make clear.  I'm not even sure if ESS implements any backlash compensation code.  You will have to ask them about it.  So I'm not going to call what they may or may not do a bug either. 

4.  Mach 4 now has the concept of movement filters (For a couple of years now?  I can't remember).  This is how the surface mapping plugin works.  We put this in to handle kinematics at some point and some OEMs use it for different purposes too.  But it could also be used to implement backlash compensation, either single value or table based mapping.  Get in touch with Todd and get setup with a developer key if you think you can build a better mousetrap.  I'll be your biggest fan! 

Steve

196
What I've described by way of the behaviour of the Mach4 software implementation of backlash compensation, shows a bug, not what you can get with a software solution. It's clearly not implemented correctly, at least when it's single stepping.
I don't know from where this came, but you are NOT correct about this.  I feel I must address this because this is how bad information starts circulating. 

[rant]
There is NOTHING in Mach 4 that implements backlash compensation.  What you described as a "bug" is precisely WHY we don't do backlash compensation.  Because it is a kludge!  (Hint: it is implemented in the motion controller, not Mach 4)  It is not a perfect solution and it never can be.  What you are wanting can NEVER be accomplished with "backlash compensation" with only one encoder on the motor/drive/screw. 

Quote from: striplar
There are only two ways to help overcome the problem. One is to apply a load thats always on one direction so there's no load reversal on the leadscrew. This is used on some Contact Lens turning lathes. It's not appropriate for large machines though. The other is to directly measure the table position with some kind of Linear Encoder.

So why are you calling it a bug when it is clearly a compromise?  It isn't a bug.  It is a feature that doesn't work they way you want/wish.  Right?  I mean, to be honest, you plainly point out the two ways to solve this problem.  And I completely agree.  This so called backlash compensation isn't one of the two ways to solve this. 
[/rant]

The rest of this post/thread is is for other people that might be reading who may not understand where the motion/PID loop is closed.

1.  Mach never closes the PID loop.  It can't, as Windows is not a real-time application.

2.  No controller that outputs step and direction is going to close the PID/motion loop.  Not even a Galil in stepper mode closes the PID loop. 

3.  The PID motion loop can be closed on the motion controller (which is always a real-time device).  A Galil or DSPMC controlling analog servos is an example of this.

4.  This PID loop can be closed on the servo drive.  (newest way)  Striplar's servo drives are an example of this.

So #4 above, step/dir, digital control, position mode, or what ever any servo manufacturer calls it today really makes things nice by closing the PID loop in the servo drive.  If the ESS or equivalent controller tells the servo to go 5 steps, the PID loop in the servo drive makes sure that the motor hits its' numbers.  So why would ESS ever want to close the PID loop?  How could a controller like ESS close a PID loop with a digital input servo drive that also has a PID loop?  There can be only one PID.  (Kind of sounds like the Highlander movie, right?)  So implementing dynamic position correction based on feedback from (again) a single encoder will never happen with a servo drive that ALSO has to have a PID loop to implement a step/dir control interface.

Some common methods of backlash/motion system flex compensation:

A.  Galil has a feature called step and correct.  And several other motion controllers that work with Mach have talked about implementing it.  This is where the motion plan says go from point A to point B but the stage never makes it to B because of the inherent flex in the motion system.  So once the motion controller gets to point B on the motor encoder, it then looks to the load encoder to see if it made it.  And if not, the motion controller issues more steps to to the servo drive to try and get it there.  So at the end of the move:

1. step once
2. did we make it?  If no, go to 1,

Sounds good, right?  But this step and correct takes TIME at the END of the move to implement.  It works really well for single axis/stage applications.  However, what if the movement is in combination with another axis/stage to interpolate a hole?  Now we are back to the problems of so called "backlash compensation" with a single encoder on the load.  Only worse because nothing happens until the end the move.  Sure enough, your interpolated hole will be oval.  But the table would have stopped at that correct place.  Big whoop.  Did we solve the problem?  I don't think so.

B.  Then there is the so called backlash compensation that we all know and hate, which is actually a derivative of the machine in one direction only paradigm.  Only with a twist.  It relies on a lash in/lash out computation based on direction.  So you have to establish a direction first.  Usually, this is done by homing the axis.  When you back off the switch, the lash is taken out in the direction opposite the switch.  So from that point on, the lash is taken out or put back in based on the direction of travel.  But guess what?  Taking the lash in or out doesn't happen instantly.  It takes time.  Which is why I consider it a huge compromise.  Not to mention the fact that it doesn't/can't take into account differing load situations with may increase or decrease the "lash" (really motion system flex) depending on the table position/condition.  What you get is striplar's complaint about single stepping in tenths of a thousands not "feeling"/marching/incrementing correctly.  A static preset "compensation" amount is NEVER going to be perfect because the motion system is NEVER perfect.  If it were, we would not be having this conversation.  This static compensation method is good (relatively) for machines with flex/backlash in the range of .004" - .006".  But we could never work in "tenths" on such a machine. 

C.  Then we can take this static compensation one step further by "mapping" the flex of the motion system based on the measured lash at any give position.  This certainly gets better results, but it is tedious (at best) to fully and precisely "map" a table or screw.  Most people simply do not have access to the equipment to do it correctly.  Again, this is a static compensation method, albeit more granular, that can't account for changing load or table conditions.

So we should really only consider a dynamic solution to fully eliminate the 11 micron (or 4 tenths) flex of a machine like striplar's. 

I can certainly understand wanting software that costs $200.00 to fix a hardware problem that can potentially cost $5K or more to fix.  Who wouldn't?  We joke about that all of the time.  Our saying is "Fixing hardware in software since 2011".  :)  So for the many that read this, it is important to understand the difference between a dream and reality.  But that isn't always easy todo because there always seems to be lot of grey area between the two.

Steve

197
What you described is what the compromise of software backlash compensation gives you.

So your end goal is backlash elimination.  To do that with dual feedback, you will need to go to lower than a micro resolution on you motor encoder and keep the micron scales on the load.  And go with one of the two following options:

1. Galil with analog control (requires servo drives that are capable of analog control, obviously).
2. Servo drives (and possibly new motors) that will take dual encoder feedback.

No step/dir output controller will give you dual loop control simply because that needs to happen where the PID loop is closed.  This would be your servo drives, presently, as it is not done on the ESS. 

Here is a short synopsis from Galil on the subject:
https://www.galil.com/news/dmc-programming-feedback-devices/dual-loop-mode-hints-galil-motion-controllers

Like it or not, you want big boy accuracy, so you might have to step up to the price range of a Galil.  I don't know of any other controller that will give you what you want.  Maybe the Vital Systems DSPMC?  You would have to ask them and see.  But I think that controller is deprecated now.  Otherwise, can you preload your ball screws? 

Steve

198
Mach4 General Discussion / Re: Y axis is jumping
« on: March 30, 2021, 04:01:04 PM »
Hmm...  I would say if the error is inconsistent that there is a mechanical issue.  Look for screws binding or couplers slipping.  I had a screw started binding as the nut wore on my little Joyo desk machine that we always used as a demo at the shows.  All of that air cutting wore the nut.  :)  It was especially noticeable when it did a rapid move.  If my "air" part was all done at feeds speeds and then it did a rapid to get ready for the next part, I would see the error right of starting on the new part.

Slow the max speed down and drop your accel in the motor tuning and see if it starts hitting the numbers.  This might tell you if you are losing steps.  I say might because some of these mechanical issues can be VERY hard to diagnose.  Because it might not be readily apparent if you are losing steps because of an overload situation or losing position because of a lose coupler, etc... 

Steve

199
I do not believe there is a Mach 4 plugin for the KFLOP.  I don't know why they haven't made one, as they had one for Mach 3.  I really like the features of the KFLOP.  I thought it was one of the better Mach 3 controllers.

The best thing to deal with backlash is to just not have backlash.  Fixing hardware with software is always a compromise. 

The second best method for dealing with backlash is dual feedback where you have an encoder on the load and one on the motor.  The Galil motion controllers are capable of doing this.  Also, some of the newer servo drives can do this as well and it is seamless.  However, there are some limitations and conditions that apply.  Such as the load encoder can't have more resolution than the motor encoder.  On my machine, I have a Galil and motors with a resolution of 12700 counts per inch.  So if I wanted to use the dual feedback capabilities of the Galil, I would need a table/load scale with a resolution LESS than 12700 counts per inch.  Say 10240 counts per inch.  But in any case, BOTH feedback encoders need to be above 10000 counts per inch in order to have .0001" resolution.  So you have to work within those parameters or you have to change something.  For instance, you may need to increase the resolution of the motor encoder, etc... 

If I couldn't get rid of backlash with preload or new screws, I would do the new servo drive that has the dual feedback capability.  As I said, it is seamless.  Much easier than tuning an analog servo controller. 

What you do need to watch out for is trying to control a machine at one resolution and use feed back at another resolution.  In other words, the step counts is the resolution that WILL control the machine on any digital servo drive.  In later Mach builds, we do have auxiliary encoder support that can be used as feedback for the DROs and tool path and the aux encoders can have a different resolution than the step count.  However, this gives you nothing in regards to a resolution increase and will not solve any backlash issues.  Say you motor encoders are 5 micron and the table scales are 1 micron.  In that scenario, you still have a 5 micron machine. 

The ESS is certainly capable of providing auxiliary encoder feedback.

So do your research and figure out exactly what you are trying to accomplish.  Higher resolution or backlash elimination? 

Steve

200
Mach4 General Discussion / Re: ShuttlePro Losing Setup
« on: March 30, 2021, 01:03:07 PM »