Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: NormB on January 17, 2010, 09:32:03 AM

Title: Stragen events question
Post by: NormB on January 17, 2010, 09:32:03 AM
I am running G-Code developed by Vcarve things are ruining normal.  Someplace in the middle at the end most anywhere the Z axis just goes off in no mans land.  I can raise an inch or more ) is now 1" above the work piece and I am cutting in the air.  I stop the program and reset the Z to real 0 then back up and repeat the cut.  This is a real pain and I am not able to find what is happening.  Something is causing this but I have no idea what to look for.  X and Y axis are all fine only the Z is messed up for some reason. 

Any ideas what I can look for to eliminate this problem  It's hard to reset the Z in the middle of a run.  To say nothing of finding your place in the code to start from here.

Norm
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 09:57:05 AM
If you could attach the code and say where in that code that you are having issues, someone may see a problem there.

Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 10:30:17 AM
That really is the problem, the same job one time it will run just fine no problems the next time multiple  Z Odysseus and then other times maybe only one issue it's just not consistant and that tell me it's not a code problem it's something in setup or a mechanical problem of some sort that when certain conditions are met off we go.  I just am at a total loss on this.
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 10:32:46 AM
Just for kicks I am attaching the code file so you can see.
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 10:40:05 AM
Oh yes, one more thing, My Z axis is set to move at 30 IPS is this too fast?  I guess as I think about this it's after a plunge of 1/8 single cut I see this happen, I can't say for sure it's every time though.  It will always catch me when I am not looking.  At this point I feel like I just can't leave the machine to do it's thing and move on to t=other things prepping the next job etc.
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 11:07:24 AM
Ok if its the same code which is OK one time but not another its a different matter.
30Inch per second? Mach uses inch per min but no matter what it is it will depend on your hardware as to whether its too fast or not. If its a stepper system then usually the problem will be seen when the Z is doing a rapid positive movement rather than a negative. That is not to say it wouldnt happen the other way as there may be factors in your machine that put more stress on the Z as it is moving negative or could even be you are doing only small positive moves at rapid but longer ones in a negative direction.
Try lowering the Acell a bit and see if that helps. The other thing to look at would be if the cutter is getting pushed into the collet but that is doubtful with your problem as you are talking 1".

Hood
Title: Re: Stragen events question
Post by: ger21 on January 17, 2010, 11:38:56 AM
Cut your Z axis acceleration in half.

I had been running my machine for several months, and it had never lost position a single time. The first time I did a detailed 3D carving, within 10 minutes, the Z axis was above the part.

Lowered the Z accel by half, restarted the job, and it ran flawlessly for 2 hours until the job was done.

Bottom line, is that all jobs are different, and some put a higher load on the system.

And btw, my Z velocity is 30, and I lowered the accel from 10 to 5.
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:08:33 PM
Okay, I just5 got back in from the shop, cut the Accel in half to around 5-6 now started a job, same job posted cutting the S lost in space.  Head moves up an additional move looked to me "I actually caught it this time" then moved back down and began to cut in the air.  I am just not sure what can cause this sort of problem.  I checked the mechanical on the Z axis for ease of movement and it's fine no obstructions nothing.  I cut at least 7 jobs similar without a problem then all at once this starts and in the last four Jobs I have lost at least four pieces. 

Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 03:12:40 PM
did you note where in the code it happened? was the Z meant to be moving at that point but just did a wrong move?

Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:14:20 PM
I did run the driver test too.  I saw an occasional spike of around 60 once in a great while other than that totally flat.  
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:16:48 PM
Yes the Z was retracting to move to the next spot on the letter this would have been a 1/5 move up toy relocate same cut then down to start again it was carving the letter.  It has cut the back side of the s and the bottom and was moving to cut the top and join the bottom for opening the letter. 
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 03:18:50 PM
Ok thats good, now do you recall if the DRO was still showing it being at the correct position or was the DRO showing it to be out?
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:21:14 PM
the dro showed it to be in the correct position.  However it was at least a 1/2 inch too high.
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:23:18 PM
I actually watched the Z move up stop move up and then down to begin again.  That is how I knew we were in the weeds so I ran and stopped the program looked at the DRO and it said I was cutting .062 deep and was about a 1/2 inch above the work piece.
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:25:58 PM
I need to give you the exact steps it did.  Thehead moved up above the work piece.  relocated to the next position x-y then the head moved up again then down at this point I was above the work.
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 03:27:17 PM
Ok so looks like Mach is seeing things correctly. From what I have gathered from Art, Mach counts the pulses going out of the parallel port and puts them into the DRO, so if the DRO shows correct then it should be unless there is a problem further out, ie hardware or noise issue.
 Do you have separate drives on your machine so that you can easily swap them out, say swap the X for the Z and vice versa and then see if the Z still misbehaves or see if the problem goes to the X.

Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:30:41 PM
Yes I can do this, Three separate Gecko drives one for each axis.  Are you thinking it might be the drive? 
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 03:35:55 PM
This might sound stupid but here goes, My motors steppers have four wires from them and are for about 6" not shielded.   Just bare wire connected to a plastic terminal strip that joins a four wire shielded cable to run on to the controller.  My controller uses plastic terminal strips that plug into the board they are green and l shaped so they can only be connected one way.  the wires feed into the screw terminals at the back side of the block and then is plugged into the connector on the controller board.    With all that said I have about 6" of bare wired exposed to any noise that might be around.
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 04:39:09 PM
Sorry Norm, just home from the workshop.
 It could be anything really, seems it is more likely hardware than software and swapping out drives to see if the problem follows is the first and usually the easiest step.
 Noise is probably unlikely unless you have recently added something or moved things around so motor, drive or bob is more likely.
Hood
Title: Re: Stragen events question
Post by: ger21 on January 17, 2010, 05:37:41 PM
Have you lubricated the screw?

95% (probably more like 99%) of the times that people lose position on the Z axis, it's because their machine is being pushed too hard for it's capabilities.

Can you gice us some info on your Z axis? Drive, motor, screw, voltage?
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:13:10 PM
I am afraid I do not know that.  I know I have recently and usually monthly when in use lubricate the screw all of them XY & Z axis.  They are all equipped with anti backlash nuts mounted to the mechanism.  The screws are 4 turn per inch that I know and the motors are 270 ox 1/8  pretty standard stuff there. 

One thing I did not mention and it just slipped my mind.  This last time when things went into the weeds, I was trying to move the Z axis down and down was up  did that several times then all at once it moved correctly.  I am not sue that says anything but now you have it.
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:18:49 PM
It sounds to me like there is an issue with your Direction signal, this could be as simple as a bad connection but could also be a bad output on your breakout or even a bad drive.
 One thing to do is have a look at the Dir Prechange in Motor tuning and see what its set to, usually Geckos will run fine at 0 but some find they need as much as 5 for both pulse width and Dir Prechange so its worth looking and trying.
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:24:48 PM
Mine are both set to "0" Well maybe ................ I can try that easy enough but what to set it for.  It is so strange tough can act up once then run all the rest of the program and then next time can act up many times in a row...........???  This is strange...........  I can surely switch the drives around and also increase the Dir Pulse should the step pulse change too?
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:31:50 PM
Would just try at 5 for the Prechange and see if it helps. Do one thing at a time as then you will know what cured the problem. If that doesnt work then check the wiring from your breakout to the Z drive, paying particular attention to the  Dir output as that could well be the culprit if it is not making good contact, will work sometimes and others not. If thats all ok then try the drive, if its still not right then swap outputs on the breakout for Z step and Dir (remembering to change also in Mach) and see if the problem then is with the stepping rather than the Direction. If it does change to ste problems then your breakout is the issue.
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:32:33 PM
What really does the step and dir pulse do?
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:34:27 PM
Are you asking about the settings in motor tuning or the actual pulses themselves?
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:35:52 PM
in the motor setting..............or motor tuning........what do those setting really do
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:38:53 PM
I might add this is a problem that has come since Mach3 not daying it's the software but I think being more flexible things that Mach2 assumed and were hard wired three requires you choose the setting.  I think that is O>E> operator error...........or lack of knowledge...........
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:39:20 PM
The pulse one widens the pulse as some drives require slightly wider pulses to react properly. The Dir Prechange just gives a slight bit more warning to the drive that the dir is changing, again some drives require a wee bit more than others.
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:40:50 PM
I understand, it's a timing issue and letting the drive have time to receive the information correctly. 
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:42:24 PM
I really appreciate all your help............I have at least a plan of attack, I would have wandered around in that woods a long time trying to figure that out.........  It will be nice to find the problem.......even if it is the drive at least I know how to fix it.......
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:43:21 PM
Yes thats about the strength of it :)
To be honest though I dont think that will be your problem as normally I think you would be pushed to notice that the Dir was slow in reacting and you are clearly seeing it move the wrong way for a bit. It will certainly do no harm in trying it but I suspect a bad breakout board output or a bad connection on your Dir signal.
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:46:04 PM
I sm so much better off now at least knowing what to look for.............first I will check the connections that should be obvious fix if a problem..............next I can try the pulse.............. then last switch the drive from X to Z or Y to Z on my board they just plug in.......so switching is a pice of cake........
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:49:13 PM
Hopefully its a bad connection as thats the cheapest and easiest fix. If it turns out to be a bad output on the breakout you may have a spare output you could use instead and that would save having to get another breakout board.
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:52:33 PM
Yes this is a breakout board with four outputs only three drives so the A could become the Z ..  If a drive it's a new drive that is a bit expensive but not all that bad..........I think around $100.00........... mighht be a bit more at this point that is a cheap fix for me.........  At the rate I am loosing material I think I have bought a new drive...........*L*
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 06:55:47 PM
good luck with your fault finding :)
Hood
Title: Re: Stragen events question
Post by: NormB on January 17, 2010, 06:56:26 PM
Thank you for all your help.................:)
Title: Re: Stragen events question
Post by: Hood on January 17, 2010, 07:11:19 PM
Not a problem, just hope you get it fixed quickly and cheaply :)

Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 05:39:37 PM
Okay just got back in from the shop,  Set up a program to run.  First I checked all the wires on the Z axis found one suspicious so I fixed it made sure i was solid connection.  Started the program and right off Z moves up and up.  I stopped the program reset Z rewound to start over.  Started the program and all was well for about 15 min.  about 1/2 way through the program oh yes, I did set the dir and step pulse on the Z axis to 5 each.  Again the Z moved up two times then started to try and cut in the air.  At one point the Z went up three times then all at once down ....... 

Now to the question, I am using Gecko G201 drives three one for each axis, would a drive act like that or more likely the breakout board?  This board has embedded on it #D Routers he is The Guy I bought this from and of course he is out of Business today I cannot even get this board again not sure where it came from.

Logic tells me might be wrong here that is why the question, if the drive is bad you would think it would just go nuts and stay nuts.  This acts to me more like a chip on the board controlling data flow to the port or something maybe even a bad solider job on one of the pins.  I had one drive fail and I can tell you it just stopped working alltogether.  Nothing just stop and that is all she wrote.

Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 05:44:17 PM
I would say the breakout is the most likely after a bad connection in the wiring, as you have eliminated that it seems breakout is next on the list to check.
Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 05:49:28 PM
How in the world do you go about checking the breakout board?  I am sort of afraid to switch the drive from x to y etc.  moving up twice or three times is one thing but to traverse x or y could be a disaster.  might even hit the side of my machine with the bit.  Oh, yes reason for so much concern limits do not work on this board never did and probably never will.  I do not understand it but that is the way of it.  Oh, the name I typed wrong it's 3D Routers he was located in southern Illinois.  Not that it matters today. 
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 06:14:22 PM
I have maybe an idea that might work.  If I remove the bit from the router just move a drive from either x or y into Z then run the program without installing the suspicious drive in the other axis I can see if the Z continues to act up.  Does that make sense?
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 06:15:24 PM
Best bet is to swap pins for the Z to the spare ones you have or even swap with X and see if X starts misbehaving
Hood
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 06:17:03 PM
That would do, there is of course another way to test, you could have a voltmeter on the Dir pin on the Z Drive and see if it changes when its supposed to or if it stays the same way while its not meant to be.
Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 06:18:30 PM
I can try that just reassign the pin number from A to Z and see what happens.
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 06:19:43 PM
I will try that shortly.  We will see what happens I will be back out in the shop in a few to check this out.
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:36:18 PM
Okay her is what happened. I swapped the Y for the Z removed the bit ran the program and watched very closely for a double move in one direction.  NOTHING............I mean NOTHING...........that program ran perfectly, so I thought not twice it won't so I ran it again same results not a single error?   

Now one thing did change from the standard run.  I usually have the controller next to the computer, I for convince sake moved it to a safe zone on the router table since I was not cutting.  Is it possible I am getting electronic interference from the computer being so close to the controller?  This is really strange now.
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 07:39:26 PM
Did you physically swap the plugs on the d rives or just swap the pin assignment?
Noise could be the issue.

Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:41:44 PM
I actually moved the drives.  Y went to Z and Z went to y
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:43:27 PM
I guess this is not standard but on the circuit board the drive pugs into a socket so changing drive is matter of unplugging and plugging in another. 
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:45:21 PM
Oh my, I just thoght of something.  The computer has a wireless mouse and keyboard and the ocntroller was between them.........next to the sending unit..............?????  That is a radio freq. not sure how hight but it can be noise....
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 07:48:10 PM
Could be the keyboard but  I am thinking most likely the  plugs  maybe had a bad contact. maybe a slight  bit of corrosion on them and swapping them has scraped it off, hopefully its all cured now, time will tell.
Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:51:19 PM
I hope this is not normal for these.  This will drive you wacky........I guess I need to run it as is moving the controller away from the computer and see what happens.  I suppose I can move it back to where I had it and run again to see if it acts up that would tell if it's the keyboard or not.
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 07:55:09 PM
yes thats probably what I would do as well, I hate not to know what went wrong, almost as bad as it still happening ;D
Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:56:10 PM
I also set Zero for Z with a block and at the end of the run I checked to see if it returned to Zero and yes it did.  Trying to make sure it didn't loose steps.  Can the router noise do something like this I did not have the router running for this test just the drives so I could hear them.
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 07:57:21 PM
Exactly if you know what went wrong you can fix it........but this is a devil waiting to surface again.  that is my fear........not knowing is scary.......... 
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 07:58:36 PM
Ah yes, router could well produce a lot of noise, does it have brushes? If so check to see they are good condition.
Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 08:03:41 PM
This router only has a few hours on it......it's a roybe 2 3/4 horse.......I will check but they really should be fine.  For noise you are looking for a chatter or freq. type noise right......like a bad high speed bearing and it's squeal.  Radio noise something like that brushed arching will make a lot of noise I can make sure they are tight and in good condition it's a thing to look at.......   
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 08:06:25 PM
You know that is not correct it's a bosch router but it is 2 3/4 horse........I don't think make has mch to do with it if the brushed are okay or not is the issue.
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 08:09:24 PM
Probably the best bet is do a few more tests in the same position but with the router running, if its ok then put it back where it was and try a few more, if all is still good then it would seem the likely cause was the connectors.
Hood
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 08:11:16 PM
I was just thinking the same thing run it again with the router on maybe twice if no error then move it to it's original position and run it again trying to recreate this problem
Title: Re: Stragen events question
Post by: NormB on January 18, 2010, 08:13:13 PM
Thank you so much for the help.  I think I am beginning to learn a bit of something.  I know I am using Excedrin a lot .......*L*
Title: Re: Stragen events question
Post by: Hood on January 18, 2010, 08:32:49 PM
LOL no problem, these things are really annoying and tracking them down can be a problem. This forum is usually pretty good though as lots of people who think in different ways so usually someone comes up with the answer :)
Hood
Title: Re: Stragen events question
Post by: NormB on January 19, 2010, 06:03:06 AM
This forum like the Vetric forum both are really great.  Many experienced users and they all help one another, that really makes it much easier for a newbie like myself to get started even with Te Excedrin it much less painless then if you had no help at all. 

Tonight I will continue my testing.  I am going to run the program without a change in anything with the router running trying multiple runs At least two to see if the error returns.  If we pass that test then I will relocate the control next to the computer where it was originally and run a few more times to see if that error returns.

I do believe if the error goes away you may have hit on it the oxidation or mounting of the Gecko drive being installed and reinstalled may have improved the connection enough to work properly.  I am like you a bit skeptical on that one.  More inclined to say I had two lucky runs I hope tonight I find what the problem is.
Title: Re: Stragen events question
Post by: NormB on January 19, 2010, 05:54:13 PM
Okay, this is more strange then first thought.  I swapped the drive putting the original drive to the Z axis back in place.  Ran the program with the router running three times (not one error) Okay, I moved the controller back to it's original place between the monitor and the computer, once again ran the program three times and not one error? 

This problem seems to have gone a rapidly and mysteriously as it appeared.  All I can do now is run until it happens again but by now I would have cut successfully 8 pieces. 

I just hope when I am running for real the router does not go into the weeds.  Only one way to know at this point so tomorrow off we go.

I really appreciate all your patience Hood, taking the time to try and explain all this you have been a great help.
Title: Re: Stragen events question
Post by: Hood on January 19, 2010, 06:03:11 PM
Not a problem :)
Sounds like it may well just have been a bad connection on the drive, lets hope it was and its all sorted now :)
Hood
Title: Re: Stragen events question
Post by: NormB on January 19, 2010, 07:20:11 PM
I will be able to let you know tomorrow.  I will be cutting for real just see what happens, I am now more aware of what to look for and that well may help if things go wild.  This at least was a good exercise in lubricating all the machine parts while it was practicing...*L* 

This is a bit like being sick and going to the doctor but you are not sick at the doctors office only when you leave.   I guess cutting for real will be a bit like leaving the doctors office we will see..........
Title: Re: Stragen events question
Post by: NormB on January 21, 2010, 04:23:28 PM
Okay, in the shop and think I might just have located part of my bug.  I forgot I was updating Windows on my machine and it finished an install as the program was running did a display Regen and the machine Z and x went nuts.  Fortunately this was still another attempt to make sure this thing was right before cutting more material so harm done. 

I am beginning to think some of the problem might be in the computer not the controller.  Windows print buffer has a way of playing with printer feeds.  If it is getting in the way of mach3 that might be some of the problems.  Any special setting I should be aware of in Windows XP for the printer?
Title: Re: Stragen events question
Post by: Hood on January 21, 2010, 04:29:21 PM
Just delete any printers and make sure there is nothing in the print spool and disable Windows update would be my advice. I only ever update from a service pack, by the time they come out Microsoft has sorted all the cockups that they frequently put out as updates ;)
Hood
Title: Re: Stragen events question
Post by: NormB on January 21, 2010, 04:37:01 PM
Oh, I have several printers installed here.  I do not have any connected and do not plan to connect one so That is step one delete them all.  Thank you.  Still waiting for 67 updates to install I am about half way now.
Title: Re: Stragen events question
Post by: Hood on January 21, 2010, 04:41:29 PM
Well hope the updates work for you, spent three or four evenings trying to recover my nieces laptop from a wonderful MS blunder that seemingly crashed thousands of  computers after they did a Vista update.

Hood
Title: Re: Stragen events question
Post by: NormB on January 21, 2010, 05:48:07 PM
*L* well this is service pack 3 for XP but I know what you are saying, have had my share of Bill Gates tool.  I like Windows 7 though, you see Bill got tired of hearing about the BLUE SCREEN OF DETH so in windows 7 he fixed that now the screen is white............*LOL*