Hello Guest it is March 18, 2024, 11:30:01 PM

Author Topic: Gcode questions pt2  (Read 11399 times)

0 Members and 1 Guest are viewing this topic.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Gcode questions pt2
« on: October 16, 2009, 08:57:38 AM »
I have a small aluminum L shaped piece. Imagine a capital L.
The longest side is 8.75"
The bottom is 4.25"
The inside cut of the upright is 7.5"
The upper side of the bottom is 2.75"
I would only like to cut the X sides 7.5" length in incremements of say .005 (it is a Sherline, I need to be cautious)
I would also like to cut the Y sides 2.75" the same amount til a 1/4" is removed, 50 passes?
Can both sides be cut in 1 pass? I do this thru the MDI with a calculator, its tedious and there has got to be a better way. I have never written anything but single lines.
So if I started the part cutting on x0 y0 with the z side milling only
Surface of part is z-3 as z home is at top of mill column.
Part is 1/2" thick
%
G00 X0 Y0 Z-2.95
G01 Z-3.30 F5
G17 X7.5 Y2.8 ? How do I get incrememntal cuts M98? P? L50? I would love to see a few steps done automatically. Thanks
Nobody has any advice?
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Gcode questions pt2
« Reply #1 on: October 16, 2009, 01:30:07 PM »
This is what I would do:
Do the relevant part of the code as one passage only. Try the passage. This will be your subprogram after you tested it.
Use incremental mode to lower the Z axis at each passage.
Call your sub program the number of times needed to accomplish all the depth that you want (Your program will only be calls to your subprogram)

That is all.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Gcode questions pt2
« Reply #2 on: October 16, 2009, 02:25:02 PM »
Thank you, I am sure that would be the same if it was x or y as the moving axis? I have never used a subprogram or am I sure how to set 1 up. I typically input into the MDI exactly what coorcinate I want to go to and it cuts that plane. I then subtract given amount and repeat. I have used a g code for probing but that is it really.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Gcode questions pt2
« Reply #3 on: October 16, 2009, 02:49:03 PM »
Thank you, I am sure that would be the same if it was x or y as the moving axis? I have never used a subprogram or am I sure how to set 1 up. I typically input into the MDI exactly what coorcinate I want to go to and it cuts that plane. I then subtract given amount and repeat. I have used a g code for probing but that is it really.

Something like this:

G90 (Set absolute mode)
G0 Z0.000
G98 P0001 L50 (Call subroutine O0001 50 times)
G0 Z1 (Pull Z clear)
M30 (Done)
O0001
G91 (Set incremental mode)
G1 Z-0.005 F5 (Step down 0.005 in Z)
G90 (Set absolute mode)
(Put G1 moves to cut your profile here)
G99 (Return)
M30

Regards,
Ray L.
Regards,
Ray L.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Gcode questions pt2
« Reply #4 on: October 16, 2009, 05:05:36 PM »
ftomazz & Ray again thank you. I am seeing more of the pattern in the suggestion you made. However I would rather have my incremental in both x & y axis and not z. If I am side milling only to finish the interior edge I would prefer not to step.
Wouldnt it be more like ?
%
G90
G0 X0.000
G98 P001 L50
G0 X1
M30
00001
G91
G1 X0.005
G90
G1 Y0 Y7
G99
M30
%
Wouldnt that be moving my cuts on the x axis incrementally by .005 while cutting down the Y side? From Y0 to Y7?
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Gcode questions pt2
« Reply #5 on: October 16, 2009, 10:09:01 PM »
Ok this is what I entered
G90
G0 Z0.000
G98 P0001 L50
G0 Z-2
O0001
G91 (Set incremental mode)
G17 X0.005 F25 (Step down 0.005 in Z)
G90
G1 X1
G17 X7
G99 (Return)
M30


It ran in the right direction, spindle stayed where I wanted it (or at least I put it where I wanted for this test) though I dont understand why it only made 1 pass? I am trying to cut along the x travel X0 thru X7 stepping .005 into the piece each pass. It didnt cycle at all.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Gcode questions pt2
« Reply #6 on: October 16, 2009, 10:17:42 PM »
You don't want G17s in there.  Those should be G1s.  Also, all your moves are in X.  Where are the Y moves?

Regards,
Ray L.
Regards,
Ray L.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Gcode questions pt2
« Reply #7 on: October 16, 2009, 10:42:32 PM »
That is part of where I am confused. I wanted the cuts to happen along x but adding to Y. Such as the first cut starting at Y0 & X0 cutting to X7 returning to X0 then stepping over to Y.005 cutting from X0 to X7 and so on. Dont mind if it cut both ways until the finish pass. Btw the feedrate would have been fast for my sherline but who could wait to see what it was going to do? Thanks again Ray, your not going to be awake til I understand are you ? LOL
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Gcode questions pt2
« Reply #8 on: October 16, 2009, 10:55:09 PM »
OK, try this:

G90
G0 X0 Y0
G0 Z0.000
G0 Z-2
M98 P0001 L50
M30
O0001
G91 (Set incremental mode)
G1 Y0.005 F25 (Step over +0.005 in Y)
G90 (Set absolute mode)
G1 X7 F50  (Cut from X0 to X7)
G0 X0 (Return to X0)
M99 (Return)
M30

 I gave you a bum steer.  The G98/G99 should've been M98/M99.

Regards,
Ray L.
Regards,
Ray L.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Gcode questions pt2
« Reply #9 on: October 16, 2009, 10:56:33 PM »
You ask about Y cuts, I was settling for repetition on any axis. If I could cut both From X0 to X7 say .005 a pass and then Y0 to Y2.5 at the same rate .005 that would be great but as you can see I dont really have an idea how to implement it. I would think there has to be a final destination though 50 passes @.005 indicates 1/4".  
 
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)