Having problem with code - Z axis

171 views
Skip to first unread message

Bryanbdp p

unread,
Jun 3, 2016, 2:19:23 PM6/3/16
to Pocket NC
Hi all. I've been trying to get the attached code to run for days, but after finding and fixing a host of problems with assistance from Mastercam, I am stuck and the guy from MC isn't back til next week.

I have attached the Mastercam X9 file, and the G code it generated.

The MC file runs fine on the machine simulator, but I get an error code about exceeding joint on Z axis when I run the code.

There isn't a lot of room between the work piece and the bit, so I shortened up the bit and minimized the retracts to just over the stock height.

Really hoping to cut some chips this weekend, if anyone can take a look that would be great!

Thanks,
Bryan
receiver with jigs v1.0.mcx-9
receiver with jigs v3.NC

in...@pocketnc.com

unread,
Jun 3, 2016, 7:52:47 PM6/3/16
to Pocket NC
Hi Brian,

Will you post your tool offset for tool one.  You can get this information two ways.  

1.1  Home the machine, 
1.2  Switch to MDI mode 
1.3  type "g43 H1"  TLO Z  will display the number you are looking for (should be -2.something)

2.1  Open the tool table using the file menu option.

Thanks,
Matt

in...@pocketnc.com

unread,
Jun 3, 2016, 8:19:04 PM6/3/16
to Pocket NC
Bryan,

I just looked at Michelle's email and saw that you have a TLO of 1.083".  To get your TLO take the number -3.6 and add the distance the tool sticks out.  Again, the number should be -2.something.  The number will most likely be close to -2.6ish.

-Matt


Bryanbdp p

unread,
Jun 3, 2016, 8:38:41 PM6/3/16
to Pocket NC
The 1.083 is the stick out, so 3.6 - 1.083 = 2.517

Bryanbdp p

unread,
Jun 3, 2016, 8:40:04 PM6/3/16
to Pocket NC
Or -2.517

Bryanbdp p

unread,
Jun 3, 2016, 8:42:26 PM6/3/16
to Pocket NC
But with the A axis at 90 degrees, I think it would be 2.517 + .885 = 3.402
Which should be enough to cut the 3" high part if my feed and retract heights are, say, 3.2"

Bryanbdp p

unread,
Jun 4, 2016, 11:56:46 AM6/4/16
to Pocket NC
Here's something I don't understand- in machinekit when I move the Y axis in the positive direction, the B table moves down. But in the impeller tutorials Y is shown positive in the up direction. Is this because moving the Y down is the same as moving the spindle up?
Or is there some other reason?

Xander Luciano

unread,
Jun 5, 2016, 4:05:13 AM6/5/16
to Pocket NC
Positive Y means the spindle is moving UP, or the table is moving DOWN for the exact reason you stated. It's all relative to the spindle.

-Xander Luciano

Pocket NC

unread,
Jun 7, 2016, 10:56:48 AM6/7/16
to Pocket NC
Hi Bryan,

The offset would be (-3.6) + (1.083) = (-2.517)

The offset it to the center of rotation of the A axis.  So no matter the angle of A, the offset will always be -2.517.  

If you have set up the part in Mastercam according to the center of rotation, the cam software will handle the math.  

-Matt 

Bryanbdp p

unread,
Jun 7, 2016, 1:20:19 PM6/7/16
to Pocket NC

Finally got to the root of my problems this morning.

Because you set the tool holder and bit projection in Mastercam, I figured I was all set.

 

It turns out, that a few things have to happen.


1)      The same tools need to have the same numbers in Mastercam and in the PNC tool table

2)      The tool setup in Mastercam is for backplotting and machine simulation only

3)      Ultimately, the G code Mastercam writes looks for the tool offset information in the PNC tool table to calculate the tool position.

4)      Unlike the values in Mastercam, the values in the tool table for tool projection were negative. (in some cases)

 

I guess rather than output G code with machine specific tool offset, the code references the tool table for a given machine. This is because the same tool but on different machines may have slightly different tool offsets or wear compensation.






Xander Luciano

unread,
Jun 7, 2016, 6:08:27 PM6/7/16
to Pocket NC
As per your last comment, yes machinekit will automatically apply the tool offset from the tooltable that way you don't have to hard code your tool offsets into your Gcode. However, you could still hard code them in, so long as you leave them at 0 in machinekit, but I wouldn't recommend this. If you were to break a tool and replace it, it is far easier to update the tool table that your gcode.
Reply all
Reply to author
Forward
0 new messages