Hello Guest it is April 25, 2019, 06:23:30 AM

Author Topic: Help with multiple passes  (Read 7798 times)

0 Members and 1 Guest are viewing this topic.

Offline Sage

*
  •  365 365
    • View Profile
Help with multiple passes
« on: July 16, 2008, 01:56:47 PM »
I'm just geting started with this so I hope it's not a silly question but...

I have been quite sucessfull in transferring a file from AutoCad to DXF and getting it set up with LazyCam. I transferred it to Mach3 to demo it just watcing it on the screen for now. The file cuts a short small arc 1/4"wide with a 1/4" cutter. The material is 1/2" thick so I have the parameters set up to do only .010 deep per pass. I have the tool lift to 0.1" above the work piece and I have the plunge speed set pretty slow at the start of each pass because it's a small enough cutter I don't want to get too agressive. It all looks pretty good as it runs except:
 After it does the tool lift and the rapid to the start of the arc again the plunge speed is used to get back to the un-cut material again which is pretty slow considering there is nothing there to cut more and more with each pass until it gets as deep as it was in the last pass.
 I don't think I can have no tool lift becasue I assume it does a straight line back to the beginning of the arc which would be a disaster. So the question is, is there a way to either rapid plunge the first bit of the depth to the new material or perhaps trace back along the arc to the beginning without a tool lift and then plunge from there?

I know zero about G-code. I'm just using LazyCam to generate it (so far)


Sage

Offline Chip

*
  • *
  •  2,057 2,057
  • Gainesville Florida USA
    • View Profile
Re: Help with multiple passes
« Reply #1 on: July 16, 2008, 04:06:20 PM »
Hi, Sage

LazyCam is lazy and still a Bata version.

You'll need to edit the G-code, Edit G-code Button will open the g-code to a text editor.

Put a ; in front of the ;G00 Z.1 within the pockets Only, It won't be seen when running the G-code file .

Or just take a brake and let the machine do it's Work.


Each Pocket will have repetitive code.

Prog. Start,

G00 Z.1
G00 X## Y## ; move to first pocket location.....

G01 Z-.01 ; first cut depth

G-code follows to end of first pass then you'll have a

;G00 Z.1 ;rapid hight Put a ; in front of the ;G00 Z.1

G01 Z-.02 ; second cut depth

G-code follows to end of second pass then you'll have a

;G00 Z.1 ;rapid hight Put a ; in front of the ;G00 Z.1

G01 Z-.01 ; third cut........this will continue till pocket is finished.


Then you'll have a,

G00 Z.1 ;rapid hight, Don't put one hear, your moving to the next pocket location

G00 X## Y## ; to next pocket to be cut.


G01 Z-.01 ; first cut depth

G-code follows to end of first pass then you'll have a

;G00 Z.1 ;rapid hight Put a ; in front of the ;G00 Z.1

G01 Z-.02 ; second cut depth

G-code follows to end of second pass then you'll have a

;G00 Z.1 ;rapid hight Put a ; in front of the ;G00 Z.1

G01 Z-.01 ; third cut........this will continue till pocket is finished.

and so-on.................

Hope this Helps, Chip
« Last Edit: July 16, 2008, 04:08:37 PM by Chip »

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Re: Help with multiple passes
« Reply #2 on: July 17, 2008, 03:31:42 AM »
Chip - I was going to suggest a macro - but I saw your post.

Can you explain how the ; in front of a line works - you say it is repetative.

What Sage was saying - and is is a fairly common thing - is having cut a groove, and then moved the tool up to go to the start again, how do you G00 the tool back down through what you have already cut, to get to the meat again.

I have looked at your code, but I can't see how it works, and I'd love to find out, because it iwould be so useful. I would have thought GCode catered for this becasue it is a very common thing.
Not me driving the engine - I'm better looking.

Offline Graham Waterworth

*
  • *
  •  1,851 1,851
  • West Yorkshire, England
    • View Profile
Re: Help with multiple passes
« Reply #3 on: July 17, 2008, 04:25:10 AM »
Hi Sage,

post your g-code, I will have a look.

Graham.
America gave us powered flight, England the steam train and Germany the car.  Who invented the first boat?

Offline Sage

*
  •  365 365
    • View Profile
Re: Help with multiple passes
« Reply #4 on: July 17, 2008, 07:58:52 AM »
Attached is the G-code with the repeditive passes to make a 1/4" sloted arcs through a 1/2" plate.

It's actually the whole code to cut a Z-axis motor mount plate for my mill-drill CNC conversion. Best run it in MACH3 to see what' s going on becasue the first part drills a bunch of 1/4" holes in the plate including one at the each end of the arcs. I figured this would be a good way to make the ends of the arcs clean - well really they were in the DXF and I didn't now what else to do with them.
Then comes several hundred lines of code to do the three arcs.
I'm not claiming it's the best Gcode. I just took what I got from LazyCam.

And you are correct. Maybe I shouldn't care what it does. After all I can walk away and do sometihng else. I'm not turning the handles anymore. But I'm also using this as a learning tool. I'm almost ready to turn on my machine. I have the X&Y axis done and sort of got carried away with the excitement and neglected to make the Z-motor mount. I plan to figure out enough about G-code to put a pause in for tool changes and adjustment of the Z-feed manually on this code enough to get the plate done. If not I'll just do it manually. I still have handles on the machine.


Sage

« Last Edit: July 17, 2008, 08:00:56 AM by Sage »

Offline Sage

*
  •  365 365
    • View Profile
Re: Help with multiple passes
« Reply #5 on: July 17, 2008, 03:02:24 PM »
Chip:

Thanks for your suggestion, but putting in the semi-colon (which I guess comments out the line eliminating it from the code) did not work. MACH3 didi not like it and even the tool path display does not completely load when the G-code is loaded. It seems to stop loading with the highlight bar in the gcode display window on the first line after the modified line.

It may be becasue the generated code uses a G2 to do the arcs. I'm not sure. Perhaps you can figure it out from the code attached to my previous post with the explaination. The arc code starts at N130 where it says it changes to a 1/4 center cut endmill.

Thanks so far.

Sage

Offline Graham Waterworth

*
  • *
  •  1,851 1,851
  • West Yorkshire, England
    • View Profile
Re: Help with multiple passes
« Reply #6 on: July 17, 2008, 04:25:07 PM »
Sage,

this is how I would do the same program.

Use Lazycam to give you the cutter path and then use subs to repeat the moves as many times as you like.

Graham.
America gave us powered flight, England the steam train and Germany the car.  Who invented the first boat?

Offline Chip

*
  • *
  •  2,057 2,057
  • Gainesville Florida USA
    • View Profile
Re: Help with multiple passes
« Reply #7 on: July 17, 2008, 04:38:46 PM »
Hi, Sage

Try loading the Post below, You need to put it in your C:\Mach3 Folder and load it as the lazycam post to use.

Post your dxf file for this part.

Hi, Jim

Nothing repetitive or automatic, Just editing out the G00 Z0.1000 as needed.

I've asked Brian for the Post "default" var. list's used in LazyCam so we can modify them as needed.

The LazyCam examples and master document (Postvar List) is not complete and outdated.

Thanks, Chip
« Last Edit: July 17, 2008, 04:40:46 PM by Chip »

Offline Sage

*
  •  365 365
    • View Profile
Re: Help with multiple passes
« Reply #8 on: July 18, 2008, 03:06:22 PM »
Graham:

You're the man. I guess that's why they made you administrator !!
Your code seems to do exactly what I wanted. Rapids down to the old depth, adds a bit more depth and off it goes!!
Now all I have to do is figure out what you did. I'll have to study the code. A good learning exercise.


Chip:

Sorry if I misunderstood what you were asking me to do - and I'm not sure who Jim is you were "talking" to, but I put the file you attached in MACH3 folder and went into LayCam  Setup/Posting Options/Set Post Processor and browsed to and set as default the file you sent. I loaded by DXF and did the "Post Code" again. I loaded the reulting file into MACH3 again. The action looks exactly the same to me. The code also still has the lines in it that you suggest needed to be commented out - I think. I've attached the file again for what it's worth.

Sage
« Last Edit: July 18, 2008, 03:14:54 PM by Sage »

Offline Sage

*
  •  365 365
    • View Profile
Re: Help with multiple passes
« Reply #9 on: July 18, 2008, 03:30:39 PM »
Graham:

I notice when your code gets to doing the circles it does not do a rapid up and then down again before doing the next depth pass like it does for the arcs. I assume this is because the code used is dedicated circle code and it knows how to repeat efficiently - is that correct? It seems to repeat the same two lines of code. I can see the one line has the Z increment of -.1 but where is the parameter how many times to do it? I would have thought, like the arc code it would have to return from the subroutine to be told to go back and do it again.
I have a lot to learn. It may help me if you give me your take on this action.

Thanks

Sage
« Last Edit: July 18, 2008, 03:38:08 PM by Sage »