Hello Guest it is April 19, 2024, 10:37:43 AM

Author Topic: reset home with G code  (Read 38046 times)

0 Members and 1 Guest are viewing this topic.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: reset home with G code
« Reply #20 on: December 17, 2008, 10:12:08 PM »
could you just clarify the problem here, are you loosing position on rapid moves or what?

Graham
Without engineers the world stops
Re: reset home with G code
« Reply #21 on: December 17, 2008, 10:28:08 PM »
Hi Graham,

My machine is a CNC fabric Cutter using a rotary knife attached directly to an A axis. I'm running the machin in Tangential mode.

I'm using a Smooth Stepper with Gecko 203v for the Y + A  and a 320 for the X.

My problem is with some files my A axis gains steps  on One file it is +3 deg and on others is +10 deg on a dry run ie no load on the A axis. I have been adjusting feed rates and motor tuning etc with similar results on the same files. I have also tried DXF and Iges drawings to enhance the feedrates of F10000mm/min.

I'm now runing the machine in Plasma mode as it has the most smoothest and fastest movement at F10000.

My table size is X1500 x Y1200mm and we basically cut the same shapes continuously.

So towards the end of a file run as the A axis is getting out of position it starts to drag the knife. So I'm thinking that I can add a M code after each part is cut to realign the knife before the next cut.

I have tried the G28.1 A0 and what happens is Mach excutes the A axis home and re-zero's however it then haults until the cycle start is enable again.

I have tried adding a P command before and after the G28.1 A0 to allow for the knife to home in time before the next move and also to seperate it from the previuos lines G00 move. I read that as it is a Group 0 it can have confilcts with group 1 code. Still however the runing file pauses at the G28.1 A0.

if I type G28.1 A0 in the MDI all is oK, Just aproblem when implemented in the Gcode.
Attached is the gcode file where I have added the G28.1 A0 after the first part is cut.

C

vmax549

*
Re: reset home with G code
« Reply #22 on: December 17, 2008, 10:44:12 PM »
It would be best to correct the problem(;-) If you are sure it is gaining steps not loosing steps then the 2 areas to check are incorrect steps per unit setting or Noise.

To test step settings dry run a program to just ref all  then rotate the head 10 times and see if it physically ends back at zero. you can also check for error after you have rotated the A 10 times by then going to the MDI page and press the verify button. Mach will then return to home and recheck the position and display the error in the message bar. If it does not come back to zero recheck your steps per unit settings. If it comes back to zero you may have to hunt down the noise that is getting in the drives cables while running.

IF you are acutally loosing steps then that is another chapter in the book(;-)

Hope that helps, (;-) TP
« Last Edit: December 17, 2008, 10:46:17 PM by vmax549 »
Re: reset home with G code
« Reply #23 on: December 18, 2008, 12:35:51 AM »
I have just done some tests.

The MDI test with verify confirmed sucessfull?? Basically I ran A 180 to A360 approx 20 times and verified. It all looks Ok as far as position and DRO.

My Steps/mm on the A are 5.55555555555 calculate @ 200 x 10 micro step / 360 deg. I did change this to 5.5555 and ran one file with 70 parts. All was OK with this meaning the A DRO at zero  the knife position was at zero deg at the finish

I ran another file with 20 x parts and at the end set a A0 command and knife position was + 8 deg

Regarding noise the cables to the motor are not sheilded or the pairs from the SS to the G203V.

The question is why is it ok on some files and not on other files

Will a reference A macro that I can drop into the Gcode after each item do the trick. The G28.1 A0 command worked but would not continue running the file

Thanks again for the fault finding tips
« Last Edit: December 18, 2008, 01:56:19 AM by XLR84x4 »

vmax549

*
Re: reset home with G code
« Reply #24 on: December 18, 2008, 06:24:17 PM »
YES a macro will do what you want. the gcode file runs until it gets to the Macro, then mach references A then continues on with the file uninterrupted.   Just tested it here(;-)

(;-) TP
Re: reset home with G code
« Reply #25 on: December 18, 2008, 08:51:50 PM »
Nice one TP,

I would be keen to give your macro a try

vmax549

*
Re: reset home with G code
« Reply #26 on: December 20, 2008, 11:04:41 AM »
Here it is M1099

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: reset home with G code
« Reply #27 on: December 20, 2008, 12:27:38 PM »
This macro is not the answer, all it will do is home the axis when you insert it into the code.

Would it not be better to correct the fault, if its a rounding error in the step count, which it looks as if it is then driving the A axis at 1.8:1 ratio will remove the error and the step count will be perfect and the guess where to put the macro in the code is eliminated.

Just my opinion.

Graham
Without engineers the world stops

vmax549

*
Re: reset home with G code
« Reply #28 on: December 20, 2008, 01:28:59 PM »
I agree with Graham, it would be far better to "fix "the problem then try to make a software crutch. BUT if this keeps you going until you can correct the hardware problem then it is an appropriate patch.

It seems that on a static test the stepps are correct.  SO that leaves either losing steps or gaining steps. I would almost bet you are losing steps due to the  vel and accel rates. IF it were gaining steps due to noise it would show up almost all the time and be very random in the overstepping amount.

Losing steps on the other hand would mostly show up in certain conditions such as high cut load, high accel rates or trying to keep up with high velocity cuts.(;-)

Just a thought (;-) TP
« Last Edit: December 20, 2008, 01:33:54 PM by vmax549 »
Re: reset home with G code
« Reply #29 on: December 23, 2008, 04:24:36 AM »
Thanks for your info,

I have ran some tests today adjusting steps/mm etc.

Yes my machine is gaining deg on the A axis. On MDI A code tests like AO to A180 back to A0 etc the A axis works great. When I run different Gcode files the results at the end are varied when sending an A0 at the finish ie +3deg to +10 deg gains depending on code. Modifying steps/mm isnt the solution as I can adjust these to suit one file and then the A home is out after the completion of another

I did try the M code however it homes the A axs then pauses until cycle start is depressed

My thoughts is that the tangental A code that Mach outputs is where the problem lies.

Thanks
Jason