Y to Z and Z to -Y?

This forum is for requests and queries about machine tool support for Vectric Products
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"

Y to Z and Z to -Y?

Post by 4DThinker »

I'm working on mounting a router horizontally under my gantry to eventually be able to cut joinery (tenons/fingers/etc..) on the ends of 8' or longer 2x4/2x6/etc.. construction lumber.

My goal is to draw up the end view of the 2 x whatever in Aspire, create the toolpaths as though this board would be standing vertically under my CNC. I need a post processor that will swap Z for -Y and Y for Z to effectively rotate it for my horizontal router and cuts.

I have 5" of Z travel which I'd like my Y commands mapped to, and need all my Z commands mapped to Y.

I've thought about simply swapping cables, and that would work. My router mount goes quickly from vertical to horizontal and back, and I don't want anyone having to swap cables every time. It would be easier to have a separate post processor for horizontal cutting.

I know we can swap X or Y to A or B for rotary work. I've perused the post processor editing doc (from 2009) here, but don't see an obvious way to swap -Y with Z during processing.

Love to hear any ideas you post processor experts might have on this challenge.

Thanks!
4D

User avatar
Adrian
Vectric Archimage
Posts: 14542
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Y to Z and Z to -Y?

Post by Adrian »

The most up to date Post Processor editing guide is on the Help menu in Aspire/VCarve/Cut2D.

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: Y to Z and Z to -Y?

Post by 4DThinker »

Thanks for that info, Adrian. The link to the 2009 one ought to be removed or updated. JMHO.

PaulRowntree
Vectric Wizard
Posts: 1687
Joined: Sun Oct 24, 2010 7:28 pm
Model of CNC Machine: homebuilt 4'x2' (Mach3+G540)
Location: Guelph, Ontario
Contact:

Re: Y to Z and Z to -Y?

Post by PaulRowntree »

Could you just load a different controller config file (which would be like swapping cables)? Mach3 should be able to do this
Paul Rowntree
WarpDriver, StandingWave, Topo and gadgets available at PaulRowntree.weebly.com

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: Y to Z and Z to -Y?

Post by 4DThinker »

PaulRowntree wrote:Could you just load a different controller config file (which would be like swapping cables)? Mach3 should be able to do this
I'm running LinuxCNC, and the CNC came with that already configured. Not familiar with how to how to create a new configuration, although I'm sure it is possible.

I've been studying the Post Processor help file, although I'm learning more by examining actual PP files. I believe if I can create my own temporary variable then I can have the PP parse through the Y and Z coordinates, mapping Y to temp (temp=Y), Z to Y (Y=Z), then temp to Z (Z=temp). Throwing in a negative sign where I need it.

4D

User avatar
IslaWW
Vectric Wizard
Posts: 1402
Joined: Wed Nov 21, 2007 11:42 pm
Model of CNC Machine: CNC Controller Upgrades
Location: Bergland, MI, USA

Re: Y to Z and Z to -Y?

Post by IslaWW »

4D...
You should not need to work with temp variables for your special purpose postP. You can simply change the following in the "format for variables" section:

Examples of original:
VAR X_POSITION = [X|A|X|1.6]
VAR Y_POSITION = [Y|A|Y|1.6]
VAR Z_POSITION = [Z|A|Z|1.6]

Examples of changes you require:
VAR X_POSITION = [X|A|X|1.6]
VAR Y_POSITION = [Y|A|Z|1.3|-1]
VAR Z_POSITION = [Z|A|Y|1.6]

Note... the changes are subtle I tried to bold them. Test in air of course, but this should get you close

You may have to change the output order for G0 and/or G1 moves. If so use the following example:

begin FEED_MOVE

" G1 [X] [Z] [Y]"
Gary Campbell
GCnC Control
ATC & Servo Controller Controller Upgrades
GCnC411 (at) gmail.com

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: Y to Z and Z to -Y?

Post by 4DThinker »

Thanks, Gary. My programming skills are extremely rusty, but I think I've got the gist of what you've done there. Just curious if the 1.3 is a typo or there is some reason you want to limit that output to 3 decimal places?

4D

User avatar
IslaWW
Vectric Wizard
Posts: 1402
Joined: Wed Nov 21, 2007 11:42 pm
Model of CNC Machine: CNC Controller Upgrades
Location: Bergland, MI, USA

Re: Y to Z and Z to -Y?

Post by IslaWW »

4D...
For your purposes it was a typo, but in reality came from a postP that I had for a rotary machine where 3 places was used for degrees on the 4th axis.

Don't forget to change both the Windows file name and the interior "POST_NAME= xxx"
Gary Campbell
GCnC Control
ATC & Servo Controller Controller Upgrades
GCnC411 (at) gmail.com

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: Y to Z and Z to -Y?

Post by 4DThinker »

I believe I've got the Post Processor set to take care of switching Z to Y and Y to -Z values. I had to change both the X/Y/Z_Position and the XH/YH/and ZH around. Now I'm waiting on some hardware to actually remount my router to horizontal so I can do a few test cuts using the new PP. Thanks for everyone's help!

4D

User avatar
IslaWW
Vectric Wizard
Posts: 1402
Joined: Wed Nov 21, 2007 11:42 pm
Model of CNC Machine: CNC Controller Upgrades
Location: Bergland, MI, USA

Re: Y to Z and Z to -Y?

Post by IslaWW »

4D...
Glad you got it working. Enjoy!
GC
Gary Campbell
GCnC Control
ATC & Servo Controller Controller Upgrades
GCnC411 (at) gmail.com

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: Y to Z and Z to -Y?

Post by 4DThinker »

Got the aluminum angle I needed. Cut off 4" of it for the bracket. Drilled 8 holes, tapped 4 of them. I have run a few of my files through the new PP and let the CNC air them. Looks like it is doing what I want. Now all I need is a Tiny House project to build.

4D

mschoonmaker
Posts: 36
Joined: Mon Feb 25, 2019 4:58 pm
Model of CNC Machine: Onefinity X-50 Woodworker

Re: Y to Z and Z to -Y?

Post by mschoonmaker »

IslaWW wrote:
Sun Jan 10, 2016 3:06 pm
4D...
You should not need to work with temp variables for your special purpose postP. You can simply change the following in the "format for variables" section:

Examples of original:
VAR X_POSITION = [X|A|X|1.6]
VAR Y_POSITION = [Y|A|Y|1.6]
VAR Z_POSITION = [Z|A|Z|1.6]

Examples of changes you require:
VAR X_POSITION = [X|A|X|1.6]
VAR Y_POSITION = [Y|A|Z|1.3|-1]
VAR Z_POSITION = [Z|A|Y|1.6]

Note... the changes are subtle I tried to bold them. Test in air of course, but this should get you close

You may have to change the output order for G0 and/or G1 moves. If so use the following example:

begin FEED_MOVE

" G1 [X] [Z] [Y]"
I know this is a really old post, but Gary's note "You may have to change the output order for G0 and/or G1 moves" evades me as to when/why this _might_ be needed, and if there is a downside to swapping these whether or not "needed"

Thanks in advance for any insight on this.

User avatar
IslaWW
Vectric Wizard
Posts: 1402
Joined: Wed Nov 21, 2007 11:42 pm
Model of CNC Machine: CNC Controller Upgrades
Location: Bergland, MI, USA

Re: Y to Z and Z to -Y?

Post by IslaWW »

This was posted as a note of caution, mostly for G0 motion. For example in the Initial Feed move:

You may want the horizontal axes to position prior to lowering of the Z...
begin INITIAL_RAPID_MOVE

" G0 [X] [Y]"
" G0 [Z]"

With swapped axes, you would not want the X and (physical) Z to position, then rapid the 3rd axis.
Gary Campbell
GCnC Control
ATC & Servo Controller Controller Upgrades
GCnC411 (at) gmail.com

mschoonmaker
Posts: 36
Joined: Mon Feb 25, 2019 4:58 pm
Model of CNC Machine: Onefinity X-50 Woodworker

Re: Y to Z and Z to -Y?

Post by mschoonmaker »

OK, I think I understand. Since my "swaps" were for X/Y versus X/Z, this is probably a non issue, wouldn't you think?

User avatar
IslaWW
Vectric Wizard
Posts: 1402
Joined: Wed Nov 21, 2007 11:42 pm
Model of CNC Machine: CNC Controller Upgrades
Location: Bergland, MI, USA

Re: Y to Z and Z to -Y?

Post by IslaWW »

In most cases, yes. But....
Gary Campbell
GCnC Control
ATC & Servo Controller Controller Upgrades
GCnC411 (at) gmail.com

Post Reply