Hello Guest it is April 18, 2024, 10:40:19 AM

Author Topic: Problems with losing position  (Read 28167 times)

0 Members and 1 Guest are viewing this topic.

Problems with losing position
« on: January 22, 2014, 11:23:46 AM »
Hi,

I have an 1842 PCI controller setup to a CNC servo wood router.  In GalilTools I have the PID set so that I can bore a 1/4" hole move 6" bore another 1/4" hole and repeat this loop 300 times in X or Y axis.  I only gain .001 in hole size and the distance between holes is exactly right, which tells me my mechanical is very good and my PID is very good (of course I did a BN).  In Mach3 I get up to .125" off just boring 6 holes on a grid, the first is in location, the 3rd off by .02", the 6th by .125.  How much it is off is not consistent either.

When I run Gcode in Mach3 I might get way out of position when I click Stop, hit a limit, press escape... I have read of this on other Mach3 forums, I understand it is a limitation due to Mach3s open loop nature... Ok I can avoid doing those things, so in my above bore Mach3 bore test I was careful to not do any stop event.

I have run my Galil DMC bore test in SmartTerminal vs old ST Mach3 plugin and with the GalilTools vs the new Mach3 GT plugin.  I get spot of perfect results in the Galil DMC but very erratic results thru Mach3.  All my Mach3 speeds, ac and dc are set below what they are in GalilTools.  I am at a loss for what can be causing this, any advice is appreciated.  My theory is the open loop nature of Mach3 is causing these errors.

As a test I set my ER tighter to 20 and now Mach3 won't move much at all before the drive goes into an error state.  In GalilTools I scope no more than an Error of 1 to 2 counts while moving, none when arriving at location.  So for some reason Mach3 is getting quite far off.

Thank you in advance for any advise!

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Problems with losing position
« Reply #1 on: January 24, 2014, 10:28:47 PM »
Well...  Mach3 with a Galil is not the same as Mach3 controlling a stepper system.  Mach3/Galil is a closed loop system!  The servo PID loop is closed on the Galil.  And there is another important distinction; Mach3 gets its position from the Galil!!!  This is in contrast to a stepper system where Mach3 has it's own notion of where it thinks the table should be.  What is displayed in the Mach3 DROs comes from the Galil (which comes from the encoders).  This can be verified by disabling the servo drives and turning the motors by hand.  You will see the position updated in the Mach axis DROs.

So something is amiss here...  Are your motor tuning counts set right?

While all of the issues you described above might throw a stepper system for a loop, I have never seen any of them get my Galil and servo system out.  I can hit e-stop, escape, hit a limit, stop and everything in between and Mach always knows where the motors are.  I find it VERY repeatable and reliable.  If I set a part zero, then slam into a limit, all I have to do is hit GOTO 0 and I'm back to my part 0 with amazing accuracy.  If I hit e-stop and blow my axis reference away, all I have to do is home the machine and hit GOTO 0 and I'm right back at my previous part 0.  Again, with amazing accuracy.  (I do use index homing.)

What you are describing sure sounds like a mechanical issue to me.  Another fellow just had similar issues and he found his slip.  (http://www.machsupport.com/forum/index.php/topic,25998.0.html)  It may work in Galil Tools for a bit and then start acting up.  My advise is to take a hard look at the motion system.  Because I have never seen what you are describing come from any other source.  Mechanical issues can be tricky.  I have seen a slip in one direction and not another.  Inconsistent slips.  Slips more on direction sometimes and then reverses, etc...  Very frustrating.  But I really think this is your problem.  For several reasons...

1) I don't experience what you are describing at all. 
2)  There are a LOT of Mach3 Galil users and they are not experiencing this (or else I would be flooded with complaints!).  We have a customer that sells engine block boring machines that use Mach3/Galil.  If things were not as they should be, there would be a bunch of ruined engine blocks laying around.
3) I have solved a LOT of mechanical motion issues in the past that were deemed "impossible".

I'm not ruling out some strange occurrence though.  Also, hacked versions of Mach3 do strange things.  So make sure your license is valid.  Some users have gotten bilked by purchasing Mach through less than ethical people.  They may have a bad license and not even know it! 

Good luck hunting.  Seek and destroy!  :)

Steve
Re: Problems with losing position
« Reply #2 on: January 27, 2014, 04:40:03 PM »
Thanks for your great and useful reply Steve  8)

I am pretty confident the mechanical is correct, although was willing to take it all apart if the following test failed...

I have access to another Galil system with the same wiring schematic, so it is was a simple matter to take my computer/controller, power suplly and amps to this other machine and plug it it.  I BN the PID, AC, DC, SP this machine usually uses.  I placed a mark on both lead screws, I then in Smart Terminal ran a 5" square 100 times, it came out spot on.  I programmed a 5" square in Mach3, ran it 100 times it came out perfect.  Ran it 3 more times, perfect!!!  At this point I was strongly suspecting it must be mechanical.  Then I started pressing stop while G code was running in Mach 3, rewinding and starting over, the first time no error, the second 1/8" off in Y, the 2nd time 1/2" off in Y.  X was perfect but it was moving in Y every time I pressed stop.  Next I reset 0,0 and pressed stop while moving in X, Off 1/4" the first time.  To summarize pressing Stop while an axis is moving almost always makes that axis "off".  Also the the problem traveled with my PC and controller, so is independent of the mechanical.  While at this location I had an electrical engineer review my setup and it seems good.  I was using daily production mechanical, motors and wiring in the above test, so those are good.

You said "Also, hacked versions of Mach3 do strange things.  So make sure your license is valid.  Some users have gotten bilked by purchasing Mach through less than ethical people.  They may have a bad license and not even know it!"   Is there a way to check if the license is legit?  I have upgraded Mach3 and Galil plugin both without issue,seems that would catch an illegal license?

Thank you for any help :-)

Offline Tweakie.CNC

*
  • *
  •  9,198 9,198
  • Super Kitty
    • View Profile
Re: Problems with losing position
« Reply #3 on: January 28, 2014, 03:02:05 AM »
Quote
Is there a way to check if the license is legit?  I have upgraded Mach3 and Galil plugin both without issue,seems that would catch an illegal license?

Check with licensing http://www.machsupport.com/contact-us/

Tweakie.

PEACE
Re: Problems with losing position
« Reply #4 on: January 28, 2014, 10:31:09 AM »
Thanks, I just sent a note with my license info, hopefully they will get back to me soon.

Update: Also I did more tests in Smart Terminal where I moved in a 5" square repeatedly. Then I made it stop using ST, AB, and obstructing the movement causing Abort due to obstacle.  I did this a dozen times it never lost position this fairly well narrows it down to Mach3.  So maybe a bad license or maybe something got corrupted and I need to reinstall, I have seen this help on other applications.
Re: Problems with losing position
« Reply #5 on: January 28, 2014, 02:12:08 PM »
Update: I very quickly heard back from Mach3 support (thank you!), my license is valid.

I am going to format the drive and start over installing XP and doing everything from Step 1.
Re: Problems with losing position
« Reply #6 on: January 29, 2014, 12:30:27 PM »
Seeking and Destroying as ordered!!!  ;D  My next steps:  I formatted the PC, installed XP pro, DMC-ST, connected  (Note: my firmware was one revision out so updated that and reset my PID and BN).  Installed Mach3 and Galil plugin, did not use my old XML (in case there was something wrong)  Went thru and set up the Galil config and the Mach3 settings pages.  Ran my 5" square 100s of times no error.  Press stop and it is off every time in the axis that I hit stop. 

For these tests the Galil, PC and Mach3 are connected to a known good production machine with good mechanical.  Running a 5" square pattern in DMC-ST works great. In ST Pressing ST, AB, causing an OE all has zero position loss.  In Mach3 position is lost every time I press stop, when I go back to DMC -ST the TP is off.  I am 100% sure that pressing stop in the Mach3 is resetting the Machine Coordinates, I confirm this in DMC-ST by checking TP.

I note that when I press stop the machine decelerates violently. As a test I set the Mach3 AC/DC really soft so that it is nice and lazy around the corners (even rounds them), but when I press stop it really jerks hard, now this should not cause a Galil position loss but it is.  I reviewed the Galil Plugin Log and note a ST then an AM, but see no indication of other cause.  I also note the AC and DC are set to the default of 30,000,000, lowering this does makes the Stop smooth, but position is still lost (but by even more).  Again with the Galil you can stop it with a sledge hammer and it still knows where it is thru any other software.

I have worked with Galil controllers for almost a decade now, I know they do not exhibit behavior like this, they are in my opinion the best controllers in the world!  I know that many many people use Mach3 successfully with the Galil.  Is there any setting that might be BNd into my controller that could cause this behavior?

Ahhh reviewing the log I think I found the cause!!!  After I press stop this is the string of commands the Plugin is sending: ST, AM, CS S, CS T, ST, AM, "DP -8421, -19672, 0, 0"  ***This DP is bad, the DP should Never Ever happen unless the user presses "Ref All Home".  I can see on Steppers this may be desireable but on Servos it is not good.  As you said Steve the Galil always knows where it is, Mach3 should never ever change that except after the home move.  I never once pressed home in the attached log.  I have attached the log for your review, so you can see what I am seeing.  The only cause for this that I can think of is on the 1st page "Motor Options" (both are unchecked), 2nd page (all set to Servo).  I am anxious to see what you find out.

Here is my Gcode just in case:
%
O0000
N100 G20
N102 G0 G17 G40 G49 G80 G90
N108 G0 G90 G54 X0 Y0 S8556
N116 G1 X0 Y-5 F300
N120 X-5 Y-5
N122 X-5 Y0
N124 X0 Y0
M30
%

I reduced it to this, still got out with a stop press:
%
O0000
N116 G1 X0 Y-5 F300
G4 P.1
N120 X-5 Y-5
G4 P.1
N122 X-5 Y0
G4 P.1
N124 X0 Y0
G4 P.1
M30
%

Highest regards, thank you for any help that can be provided.
Re: Problems with losing position
« Reply #7 on: January 29, 2014, 12:50:52 PM »
Here is my Mach3 config, perhaps that will help see if a setting I have done is causing the DP.

Thank you.
Re: Problems with losing position
« Reply #8 on: January 29, 2014, 03:22:28 PM »
For further testing I tried a CNCs Mill with a DMC2132 that is normally run in production using Galil Tools. I installed Mach3 with the GT plug in, (the other tests are with a 1842 ST plugin).  I ran a small square successfully, every time I press stop I lose position slightly in the axis that was moving, just like the other CNC.  I went into the log and I see a DP sent everytime I press stop.  The way I think it needs to be is Mach3 needs to be asking the Galil,  "After that stop I just told you to do, where are you?" (TP) "Thanks I will use that to update my DRO", not the way it seems to be going of "Hey Galil stop... Here is my DRO" (DP).  I also see every time the reset is pressed a DP is sent. It is looking to me like the Plugin needs a tweak, commenting out all the DP commands should do it, other than the DP associated with the home move.

Please do not take offense to what I am saying above, I have been a Galil developer for many years, so have a fairly high experience level with Galil commands.  I am just trying to be as helpful as I can be for troubleshooting this issue.  I am really hoping  that I have a basic setting wrong and the problem is on my side, that would be awesome. 

Highest regards!
Re: Problems with losing position
« Reply #9 on: February 10, 2014, 12:55:58 AM »
I have a large 3axis mill I retrofitted to Mach3 myself. It runs very accurate as long as you don't hit the stop button. If I use the stop button like you the axis its traveling in will loose position.
I get a harsh stop that I feel causes a delay between Mach and the actual servos. The Mach DRO's stop instantly the servo's stop a few miliseconds later causing a loss. You will also find they don't like
to hear anything bad about the Mach software.
Try your same test with a feedhold stop instead of stop, bet you won't get any loss that way.

Steve
 
I have this ultimate set of tools I can fix it.