PP for relative coordinates? (instead of absolute)

This forum is for requests and queries about machine tool support for Vectric Products
Post Reply
Roelli
Vectric Craftsman
Posts: 181
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

PP for relative coordinates? (instead of absolute)

Post by Roelli »

Hi.

Is there any Postprocessor available for vcarve which does relative coordinates?

I guess it doesn't make much sense for most cases but:

I need the g code for some shapes. But I want to add the positions for the cutted shapes later in the cnc machine.

So I would like to let vcarve calculate a 2mm circle... save the gcode to a text editor
then add G00 to move to another position
then calculate a 3mm circle in vcarve and save the gcode to another position in the text editor
then add G00 to move to another position
... and so on...

Any Ideas?

Thanks!

Roelli.
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html

4DThinker
Vectric Wizard
Posts: 1701
Joined: Sun Sep 23, 2012 12:14 pm
Model of CNC Machine: CNC Shark Pro, Probotix Meteor 25" x 50"

Re: PP for relative coordinates? (instead of absolute)

Post by 4DThinker »

On all the CNCs I have access to, you can do what you want by simply resetting where x=0 and y=0 are for every position you want the parts cut at. I do this often with common shapes that I cut out repeatedly. I have in the toolpath file name a hint of the overall size and origin location used (bl, br, tl, tr, c), and thickness needed. The toolpath has absolute coordinates in it, which are cut at whatever relative position I need them on the CNC bed.

User avatar
highpockets
Vectric Wizard
Posts: 3667
Joined: Tue Jan 06, 2015 4:04 pm
Model of CNC Machine: PDJ Pilot Pro

Re: PP for relative coordinates? (instead of absolute)

Post by highpockets »

I agree with 4DThinker.

All the coordinates in the G-Code are relative to your XY Datum Position defined in VCarve.

On parts that I cut out of scrap I use a template of the parts outline with a hole the size of the bit I use to cut the part out in the center XY Datum Position. That way I can put the template on the scrap where i want then move the router with the correct bit over the hole in the center of the template and Zero the XY.

Keep in mind your part will be cut according to the calculated orientation defined in VCarve.
John
Maker of Chips

Roelli
Vectric Craftsman
Posts: 181
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

Re: PP for relative coordinates? (instead of absolute)

Post by Roelli »

Yeah, you're right. I can reset the zero point and mill the part at another position.

But in this case I need to cut holes with different diameters at different positions.
I do have a dxf with all hole diameters and positons but the holes needs to be cutted on a printed panel. And the printing is stretched or shrinked. So if I would start the cnc program all holes will be a bit off. And also the printing isn't parallel to the X or Y axis.

So the idea is to use the "teach-in" function of the machine... move manually to every hole position (there is a cross at the center where the hole needs to be cutted).
Then save all positions. After that add all different hole diameters manually between the G00 moves.

Hmm... I think I would need a "set XYZ axis to zero" macro function in the cnc control software.

Roelli.
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html

User avatar
Leo
Vectric Wizard
Posts: 4082
Joined: Sat Jul 14, 2007 3:02 am
Model of CNC Machine: 1300 x 1300 x 254 Chinese Made
Location: East Freetown, Ma.
Contact:

Re: PP for relative coordinates? (instead of absolute)

Post by Leo »

Have you considered work coordinates for the locations.

Generally the default work coordinate system is G54

I know in Mach3 and all of the industrial machines they have at least 6 work coordinates G54 thru G59. Some machines more. If you have the ability to use macroB programming you may be able to get away with one work coordinate system and reprogram the system variables for "X" - "Y" - "Z". Then you can have unlimited positions. I have written code like that a few times. It all depends on the machine and your knowledge of G-Code programming.

I use the work coordinates frequently.

I don't know your machine and I don't know if it has the capability for any of this stuff.

Each of the work coordinates can be set to its own unique "X" - "Y" - "Z" coordinates and saved.

Simply adding the corresponding coordinate shift at the beginning of the code you want to run and that will be the new machining location. From there you can use the relative (point to point) programming. That is not so uncommon.
Imagine the Possibilities of a Creative mind, combined with the functionality of CNC

Roelli
Vectric Craftsman
Posts: 181
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

Re: PP for relative coordinates? (instead of absolute)

Post by Roelli »

Leo wrote: Simply adding the corresponding coordinate shift at the beginning of the code you want to run and that will be the new machining location. From there you can use the relative (point to point) programming. That is not so uncommon.
Cool.
I looked at the DIN66025 (Gcode) interpreter of the cnc machine controller and G54 is available!
Never used this but it seems like this:

Code: Select all

G54 X30
will move the zero point of the X axis +30mm.

Good! So I can experiment with it and see if that helps.
I think G54 should work in general.

Alternatively... it seems that I can write a macro (never did this, seems to be written in C#) which sets X=0 and Y=0. And I can add this macro to every position in the G-Code Editor. So I could import the positions (which I previously saved as teach-in points [X/Y coordinates]) then add the "zero X,Y" command right after each G00 movements.
Even better... I could save sub-macros... for example "3mm hole" and add teh "zero x,y" to the beginning of this g-code.

8) 8) 8) Thanks guys! You're great. The idea with setting the axis to zero seems to be a good workaround. So simple that this did not came into my mind. :mrgreen:

Thanks so much!

Roelli.
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html

User avatar
Leo
Vectric Wizard
Posts: 4082
Joined: Sat Jul 14, 2007 3:02 am
Model of CNC Machine: 1300 x 1300 x 254 Chinese Made
Location: East Freetown, Ma.
Contact:

Re: PP for relative coordinates? (instead of absolute)

Post by Leo »

Look to see if you have G55 - G56 - G57 - G58 - G59

Those would be the additional work offsets - it would be easier that additional macroB programing. I am not talking about C+ or anything like that.
Imagine the Possibilities of a Creative mind, combined with the functionality of CNC

Roelli
Vectric Craftsman
Posts: 181
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

Re: PP for relative coordinates? (instead of absolute)

Post by Roelli »

Seems to work:

https://www.youtube.com/watch?v=YbFyTYXCaTs

(the idea with C+ was to add a little script that will zero the x and y axis of the machine)
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html

User avatar
Leo
Vectric Wizard
Posts: 4082
Joined: Sat Jul 14, 2007 3:02 am
Model of CNC Machine: 1300 x 1300 x 254 Chinese Made
Location: East Freetown, Ma.
Contact:

Re: PP for relative coordinates? (instead of absolute)

Post by Leo »

I don't know how to use c+, but I do know a little basic. I also do a lot of advanced G-code with logic. It is all the same logic. I have reset the zeros on many occasions. Works well.

By the way - I just noticed that Mach3 has 257 unique work offsets.
Imagine the Possibilities of a Creative mind, combined with the functionality of CNC

User avatar
martin54
Vectric Archimage
Posts: 7339
Joined: Fri Nov 09, 2012 2:12 pm
Model of CNC Machine: Gerber 48, Triac PC, Isel fixed gantry
Location: Kirkcaldy, Scotland

Re: PP for relative coordinates? (instead of absolute)

Post by martin54 »

Leo wrote:I don't know how to use c+, but I do know a little basic. I also do a lot of advanced G-code with logic. It is all the same logic. I have reset the zeros on many occasions. Works well.

By the way - I just noticed that Mach3 has 257 unique work offsets.
It does Leo, you probably noticed, G54 - G59, then G59.1 to G59.256

I went a bit mad when I first started using Mach3 setting up new work co-ordinates for just about every job I thought I might do again at some point until I calmed down & realised that just one start point would be suitable for almost all of the jobs I had assigned their own work co - ordinates :lol: :lol:

I started to learn C+ 30 odd years ago but didn't really get very far with it before deciding I didn't really need to be able to write code for what I wanted to do, at odd times since I wish I had kept at it :oops:

Post Reply