Hello.
I'm new to this field when it comes to CAM and Fusion 360 so I have a nub question.
I have a box that sit perfectly on my CNC machine table and on that box I need to mill some holes on one side. I know that the best was to place that box facing up with the side I want to work on but then it will not fit my CNC machine. I can rotate my spindle 90 degrees so the milling tip points to back of the machine (y+). (Basically I want to plunge the tool on Y axis and move it on Z and X axis instead of the normal way - plunge on Z and move on Y and X).
I've created the model in Fusion 360 but I do not know if I can do this as I do not find the tool orientation that will allow me to basically "swap" Z and Y axis in generated gcode. Is this possible from code and not from changing the wire on the CNC machine to swap Y and Z axis ?
Best regards and thank you for any information.
Solved! Go to Solution.
Solved by djowen40. Go to Solution.
No, there isn't a post or software solution for what you are looking to do. This has been requested from time to time, but never really seemed to go anywhere.
Your best bet would be to swap the wires to your motors.
Thank you for your reply.
I was hoping on not to do that but if there is no software solution I will have to go and to that :(.
I see others have suggested no.
From my point of view the answer is yes it can in theory be done in code but you will require some heavy post processor customization. This is a lot of coding and a lot of testing.
Even then it will be tricky. You wold need to swap the Z and Y axis outputs in you post. You would need to do everything in G0 or G1 moves. Canned Drill cycles will not work as your CNC controller is will go back to using the Z axis.
This could be done but would require some extensive testing. I am not sure if anyone here has done it. I have some ideas on how one might do it but i am just spit balling. I haven't fully thought it through
These two line in the post processor control the output of the Z and Y coordinates
var yOutput = createVariable({prefix:"Y"}, xyzFormat);
var zOutput = createVariable({prefix:"Z"}, xyzFormat);
modifying them to below would effectively swap the Z and Y output as far as your controller is concerned. However this will only work with G0 and G1 type moves anything involving an arc (arc planes G17 etc. will be wrong) or a drill cycle will not work . You might get around this by making a simplified post that linearizes all arcs and expands drill cycles.
Note the prefixes are swapped.
var yOutput = createVariable({prefix:"Z"}, xyzFormat);
var zOutput = createVariable({prefix:"Y"}, xyzFormat);
If you have no idea about post processors then tread with caution.
What CNC controller are you using?
Thank you for your answer.
This one is more to my liking as I'm a programmer at my core so I'm more into writing software code/modules than tinkering with the hardware as it is more prone to destroying my CNC wires and boards.
My CNC machine is controlled using LinuxCNC trough parallel port. The electronics after parallel port are just a opto-isolated board and motor drivers.
Starting from your suggestion I will start digging into post processor customization and do some learning about G codes.
Happy to offer guidance.
If you are familiar with coding then you will find that the post processors are actually quite simple. Post processors are written in java script. You can use you currently working post as a starting point. I haven't put much thought into it but the arcs are definitely going to be the problem.
Swapping the Z and Y axis is also going to cause the G17, G18 and G19 planes to move/rotate/mirror. Its 11pm here and my brain hurts to much to figure out how things are going to change. I suspect there will be some strange mirroring of arcs.
I would start by just swapping the Z and Y axis and output some simple linear moves (straight line 2D contour with lead-in and lead out turned off) and check that everything move in the right direction. Once you happy with the straight line out and in some simple arcs in a single plane and see what happens.
This will help.
http://cam.autodesk.com/posts/reference/index.html
You can also use the dumper post from the fusion installed library to see all the raw parameters that re passed out of fusion and into the post processor script. Start by CAMing up some simple straight line moves and then run the dumper. Then add in some arcs etc. you will pretty quickly see how the parameters are built up.
You could try setting
allowedCircularPlanes = 0; // disable all circular planes
near the start of the post. this will force Fusion to linearise all arcs to straight line moves using the global tolerance (i.e. convert to arch to G1 moves). however again i am not sure how the arc plans will mirror etc.
quick guidance
function onSection() is called at the start of each new CAM operation
function onRapid(_x, _y, _z) for rapid moves
function onLinear(_x, _y, _z, feed) for feed rate moves
function onCircular(clockwise, cx, cy, cz, x, y, z, feed) for arcs (this will be the tricky one to figure out)
Final thought for the night.
I have no idea how Linux CNC treats canned cycles. However, if you just replace all the cases in function onCyclePoint(x, y, z) with expandCyclePoint(x, y, z) [or just remove the switch case all together and call expandCyclePoint(x, y, z)] then it will convert the drill cycles to G0, G1, G2 and G3 moves. Assuming you manage to get the arc plans sorted then this will let you use the drill cycles. Caution the expanded code for some cycles e.g. chip breaking requires a lot of moves and may choke you motion controller.
Brain dump over. Have fun.
I forgot about StepConf from LinuxCNC package 🙂 That is a good solution. This way I can make 2 configurations, one for normal use and one for swapped Y-Z axis.
Thank you for the valuable info and hints.
In my spare time I will also play with the post files just to see if I can do this directly from fusion 360 😄 ... Just for fun