What's new
What's new

5-axis machine, how do I force shaper head to be on side I specify?

Prome

Plastic
Joined
May 17, 2017
I run a MAKA BC570, and I use mastercam router 2017. I have programmed 2 dimensional routering before, and I have used the saw before, but only in 2 dimensional.

Right now I am trying to cut an end off of a beam. Please see the video below.
MAKA | BC 57 | CNC Machining Center - YouTube

The time between 1:20 and 2:10 is similar to what I want to do. However, in my case imagine that the beam extended farther, and it would collide with the yellow part. I have the CNC making two separate cuts, on per side of the beam. I meant for the yellow part to be away from the stock.

In mastercam I program the tool, but I don't program the spindle's location. I do not know how to specify where the rest of the machine goes.

Is this a common problem? Does anyone know how to fix it?
 
Hi Prome, I used to run a very similar Maka HC57R with a Siemens 840D control. What control does yours have? Do you have a 5-axis postprocessor for mastercam that is known to work well?

The head configuration is difficult to wrap your mind around until you understand how the control can work with a properly configured CAM post to drive it. Mine had a nutating head which was even more annoying, but the principles of programming are similar even if the kinematics are different.

I also programmed the Maka I ran with Mastercam. You'll have to forgive me since it's been a couple years since I used Mastercam, so I don't remember all the detailed steps and terms. Basically, you set up a work plane/origin in Mastercam for the 5x (technically it's a 3+2 axis) operation, in addition to the plane/coordinate system that the job calls at the beginning (which would be G54 etc). This operation specific plane would be oriented so that its coordinate system is what you would want the machine to be in during the 5x operation (in otherwords, Z colinear with the spindle axis, Z+ going the right direction). My post was configured so that when an operation specified a different work plane like this, the resulting code would have some plane transformation command that would rotate the currently active work offset into the correct orientation. Once the coordinate system is transformed, you then use a command like CYCLE800 or TRAORI (both are Siemens specific, no idea what equivalents are in other controls) to actually bring the physical axes into orientation with the now transformed coordiantes. If you are using an 840D control I can point you to some manuals that explain the G-code further. Unfortunately I don't think I have any example code around anymore. Someone who is current on mastercam will probably chime in with the correct nomenclature for this whole process, or a more efficient way, but this worked for me.

You may have to manually program some movements to make sure the head is out of the way of the workpiece/fixture when the physical reorientation occurs. Likewise, you may need to wind that 4th axis (C?) all the way to one end of the travel (if yours is like the one i ran, the 4th went ± 270º) so it doesn't hit travel limits trying to get into the right orientation. Don't manually rotate that 4th beyond soft limits to get it into position- twisting that wiring harness apart in this machine would SUCK majorly, not to mention you might rupture a spindle chiller line. Even just kinking the chiller line can be real annoying.

Good luck, the Maka I ran was a cool machine but also extremely frustrating at times, especially when something needed fixing. Feel free to PM me if you need any more advice on that machine specifically.
 
Last edited:
Thank you for replying. I am not efficient at explaining myself, but I will try to use pictures, and I will try to give more information on your suggestions.

I also use a Siemens 840D control. The post processor was given to me by mastercam. It is the only post processor I have ever used, and I have had no problems with it until now, but I am not very experienced.

The mastercam I use always starts with an original workpiece coordinate system at the beginning (G54). I have to make a new plane for doing things at an angle, like the cut I am making. Please see the picture below. The Z-axis is co-linear with the spindle. I am using a mastercam contour function with the saw to cut across that plane.

The plane.jpg

I assume this is the correct way to do this, but I am not sure.

Below is part of the post processor;

N170 WZW
N180 D1
N190 S2200 M3
N200 TRAORI
N210 G54
N220 G0 G90 C0. A0.
N230 TRANS X-65.983 Y67. Z198.006
N240 X108.601 Y603. ;TOP MAPPED APPROACH POINT
N250 AROT X71.57 Z90
N260 ORIWKS
N270 G0 A3=0. B3=0. C3=1.
N280 X603. Y-342.711 Z.268
N290 G1 G94 Z0. F1000.

The tool itself is cutting exactly where it needs to, but the column that holds the spindle is going to collide with the stock. I was thinking about using mastercam to add a code to instruct it to rotate the C-axis in the other direction and ask the A axis to go in the other direction as well. However, I don't know how this will effect the rest of the program. The program is using absolute values instead of relative, so in my head it should work, but I am not experienced enough to know.

What I was thinking about doing was the following

N220 G0 G90 C0. A0.
N221 G0 G91 C90 A71 ;my addition to force the head to go in the direction I wan
N222 G90 ;to get the program back into absolute
N230 TRANS X-65.983 Y67. Z198.006

I would actually use the "manual entry" function in mastercam, but I really am not experienced enough to know exactly how this will effect the program.

In any case, thank you for your response. I will try to do a few things, and maybe I can get something.
 
Ok looking at your code and remembering, it all seems what I would expect as far as post processor output. I'm sure that's the identical post I used- I had lots of back and forth with the reseller to get that one dialed in.

So from your explanation I could see potentially two options for what is going on:
1. The saw kerf is correctly positioned but the Z+ direction needs to be reversed?
like the saw and arbor is in this orientation (where the = sign is the spindle and the | is the saw blade, seen edge-on):

=|

when it needs to be in this orientation:

|=

In this case, maybe you could reverse the Z direction of your operation's plane in mastercam and get what you want?

OR is it
2. That the saw/arbor is oriented right but the big yellow butt of the C axis is swinging around on the wrong side, thus colliding with your workpiece? If so, your instinct is correct to move it over near to the position it should be in after the tranformation (TRANS,AROT) and ORIWKS is called. The 840D will move the physical axes in what it thinks is the most efficient path to get to the correct orientation for ORIWKS, but in the situation where there are multiple physical configurations of axes for a single tool/spindle orientation you need to "pre-suggest" which orientation is right by moving it towards that position before the transformation and re-orientation is called. IIRC this is known as/related to a "gimbal lock" situation due to how C can flip 180degrees at this orientation but not travel through that range while maintaining the tool orientation. If C is sitting at 0 when the ORIWKS is called, I'm not sure how the control chooses whether to go positive or negative in C- I suspect it defaults to positive but I always would pre-move it towards whatever direction I desired to be sure.

There should be no ramifications on the rest of the program from your suggested example, but I'd strongly suggest proving it out before doing it for real, with no tool chucked up, no workpieces to collide with, and slooow rapids and feed. I'm too rusty with 840D flavor code to call it 100% good.

I don't know if there is an easy way in the code or CAM to suggest how C should move for positions like this, other than just calling a move towards the desired direction. Maybe there's a clever way to integrate it with mastercam's understanding of the kinematics but that's above my knowledge level.


EDIT: I have a full set of programming manuals in PDF format for this control, PM me if you want them
 
It is scenario 2. The yellow part of the c-axis is colliding with the stock. The C starts at 0. I did what you said, I told the machine to rotate the C axis 10 degrees in the direction I want. The machine now always moves the C-axis in that direction, stopping the C-axis from colliding. Thank you. I think you are completely right how it takes the most efficient orientation, but defaults to positive if the two are equal.

The cut I wanted to make worked exactly as I wanted it to. I changed the post processor as follows

N190 S2200 M3
N200 TRAORI
N210 G54
N220 G0 G90 C0. A0.
N230 TRANS X-65.983 Y67. Z198.006
N240 X108.601 Y603. ;TOP MAPPED APPROACH POINT
N250 AROT X71.57 Z90
N260 ORIWKS

I changed line N220 from N220 G0 G90 C0. A0. to N220 G0 G90 C10. A0.

The cut after that was in the wrong orientation again, but I just have to figure out how to guide the orientation like above. Ran out of time today unfortunately. The second cut doesn't have a trans, arot, or oriwks. The change for the first cut was put in prior to the trans, arot, and oriwks. I think I'll have to think about these functions more and figure out if I need to repeat them after I change the C axis again.

Thank you very much.
 








 
Back
Top