Hello Guest it is March 19, 2024, 07:20:25 AM

Author Topic: Lathe making moves not in Gcode  (Read 1381 times)

0 Members and 1 Guest are viewing this topic.

Lathe making moves not in Gcode
« on: February 05, 2019, 09:15:38 PM »
I have a piece of code that I run. The tool change is just a way for me to clear the tool to do a little manual work. I hit cycle start again and the remainder of the code is executed then the lathe should move to G0 X0.020 Z0.005 and the program ends. Problem is X is moving to X1.000

Is there somewhere in mach3 that I am telling the x axis park at 1 inch after executing code?

 The attached piece of code is the only one I have noticed it doing this with. I would like to figure out whats up with the mystery move because I am soon going to make 4 pieces and the material is 125 bucks each and is larger than 2 inches. I would hate to cut for an hour and a half on a 5 inch diameter piece only to have the lathe move to 1 inch when finished. That would not be good.

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Lathe making moves not in Gcode
« Reply #1 on: February 06, 2019, 07:05:19 AM »
Post the complete gcode file.

RICH
Re: Lathe making moves not in Gcode
« Reply #2 on: February 06, 2019, 06:19:12 PM »
That is the complete file.
Re: Lathe making moves not in Gcode
« Reply #3 on: February 06, 2019, 06:25:23 PM »
It makes the little brass cap at the top of the sparkplug. The pause is to center drill and drill the hole through the center. The tool change has been changed to an M0.

Thank you!

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Lathe making moves not in Gcode
« Reply #4 on: February 06, 2019, 07:54:27 PM »
Vince,
Cute little spark plugs your doing............... :),

The code you posted does exactly what the program called for, except it never changes the tool because you
need an M6 to do whatever you want to do for the tool to be changed, thus it just runs through the complete program
program and ends on X0.020 Z0.005.

Don't know how you are setting up the job, even the modes you are in, as the program just seemed incomplete.

Now you say you inserted a M0 and removed the T2 and the program stops.
So the controlled point would ne located per the code  G0 X1.000 Z-0.100.

RICH
Re: Lathe making moves not in Gcode
« Reply #5 on: February 06, 2019, 09:17:19 PM »
Vince,
Cute little spark plugs your doing............... :),

The code you posted does exactly what the program called for, except it never changes the tool because you
need an M6 to do whatever you want to do for the tool to be changed, thus it just runs through the complete program
program and ends on X0.020 Z0.005.

Don't know how you are setting up the job, even the modes you are in, as the program just seemed incomplete.

Now you say you inserted a M0 and removed the T2 and the program stops.
So the controlled point would ne located per the code  G0 X1.000 Z-0.100.

RICH

the program runs right up to the t2 (now M0) and stopped at X1.000 Z-0.100 as expected.
I then manually center drill and drill the part.
Hit cycle start after drilling and the machine finishes the part at X0.020 Z0.005.
Then the machine moves to X1.000. Unwanted movement is when it parks at X1.000. That move does not exist in the gcode but it happens every time i run the program.


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Lathe making moves not in Gcode
« Reply #6 on: February 07, 2019, 03:22:24 AM »
Runs fine here and stops at x0.02 z0.005
I am not often here now but if you attach your xml I will see if I can find the issue.

Oh and BTW you do not need an M6 call as  this is Turn, your tool call should however really have the TXXYY format.

Re: Lathe making moves not in Gcode
« Reply #7 on: February 07, 2019, 05:26:01 PM »
Ill send it this weekend when i get out in the shop and get a copy.

Thanks