Convert X axis to A axis?

More
20 Aug 2016 05:34 #79114 by chucktilbury
Hi everyone,

I have a 4 axis engraver/router and I want to engrave my logo on a piece of tubing. I have successfully done that by swapping the X and A axis wires and changing the setup. What I would really like to do is to change the G code to support the A axis. I tried simple edits but that didn't work at all. I am guessing 2 things: 1) that the wrong coordinate system is selected and that's why linuxcnc is unhappy, and 2) several people have solved this in a much better way than I can. ;)

If anyone has any pointers on how I might get unstuck on this, I would appreciate hearing about it.

Thanks,
Chuck Tilbury

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 13:16 #79121 by tommylight
There are several ways of dealing with that, depending on your setup, but some of the easier and usable solutions is to make another config for your machine and just change the output pins from X to A axis, so when you need normal machine start the normal config, when you need the rotary just start the other config. The best thing is : it takes all of 5 seconds to switch from one to another ! the bad thing is you have to always calculate the radius of the part you are using so you the dimensions for the X and ultimately for A axis. Example: you have a bottle with a 10 cm diameter so that is 314 mm of surface that you can use for whatever.
The other way of doing it is editing gcode and changing X with A in it, again easy and works and same math.
You can also configure the rotary as a rotary ( available in the stepconf wizard), but you would need a 4 axis CAM software to do the math, since rotary axis use degrees not mm.
I always use the first option, at least until i need some actual 4 axis stuff.

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 19:44 - 20 Aug 2016 19:46 #79163 by chucktilbury
I tried just changing all of the X's to A's, but I get errors in the I's and J's. I have attached an example file that I want to cut on a piece of tube.

File Attachment:

File Name: logo.ngc
File Size:14 KB


I switch between round and flat fairly often. I am a pretty fair hand with Python, so I could write a post processor pretty easily if I could find out what is really needed to do it. There is a bunch of other stuff I want to do on round tubing, such as cut accurate holes in it.
Attachments:
Last edit: 20 Aug 2016 19:46 by chucktilbury.

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 20:02 #79164 by tommylight
Forgot to mention, changing the X to A axis in gcode will not work for radii, just straight lines.
That was the main reason i do not use it, but i could not remember at the time of post. I make another config and in it i change the X with A axis, so i do not have to do anything to gcode. Linuxcnc thinks it is a linear joint and works it's magic, the only magic i have to do is calculate the radius ( actual length of the surface of the round object ) during drawing.
Give it a try, you'll be surprised at how simple and easy it is.
Regards

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 20:23 #79168 by chucktilbury
Ya, That's how I do it now. I tune the radius by specifying the "lead screw pitch" in the config. It does work very well.

I would still like to know how to post-process for stuff like this. I suspect that it's simple with no math. Or maybe I just don't understand. Either way I would like to know.

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 20:29 #79170 by tommylight
nononononooooooo !!! :laugh: :laugh:


Nothing like it, just make another SAME config, and just change the output pins for X and A axis.

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 20:37 #79172 by tommylight
Yeah you need to have a fixed starting point, be 1cm or 10 cm but you need that so you can calculate the drawing ( multiply or divide as needed), and you end up with stretched drawings, but when the machine is done, everything will look OK. You need a reference point ( i set mine at 31.413, so if i have a 10cm dia, i change nothing, 5cm dia ==> just multiply everything in X with 0.5 in inkscape during drwaing)

Sorry haven't used it in quite a while, so having trouble finding the info inside my head ( lots and lots of voids there ) :laugh:
The following user(s) said Thank You: chucktilbury

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 20:38 #79173 by chucktilbury
LOL! :laugh: That's what I do. There are 2 configs, but the pins for X and A are swapped at the parallel port is all.

I know I am being a little persnickety. I am still pretty new to CNC and I am exploring. The Gcode language is a new one for me.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 22:20 #79180 by tommylight
Sorry, i had a feeling we where not on the same page ! Sorry ma man and thank you for clearing that up for me, as i always assume i did not explain it in a manner that is easily understandable by others.

Please Log in or Create an account to join the conversation.

More
20 Aug 2016 22:59 #79187 by andypugh
Replied by andypugh on topic Convert X axis to A axis?
If you are able to always set things up so that the centre of rotation is Z=0 it is possible to create a config that converts Y (in G-code) to A (on the machine). That means you can engrave XY patterns on any solid of revolution.

But, the point is that it will always be XY G-code unless you get a 4-axis CAM system.

For simple cylindrical work, you could create a system where the working radius is set in a GladeVCP or PyVCP control on the screen, and a simple scaling in HAL converts Y positions to A-angles.

For more complex solids of revolution you probably need to consider doing the "magic" in the kinematics.

Please Log in or Create an account to join the conversation.

Time to create page: 0.148 seconds
Powered by Kunena Forum