Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

fixture offset macro calculator


mirek1017
 Share

Recommended Posts

2 hours ago, crazy^millman said:

Sorry, but you need some training to help get you over this hump.

 

10 minutes ago, cncappsjames said:

Depending on how the machine was set up the actual machine positions for center of rotation and top of pallet could be #19700, #19701, and #19702 in a FANUC 30i/31i  Series Control.

To access them by MACRO variable is pretty simple;

#900=PRM[19700]
#901=PRM[19701]
#902=PRM[19702]

X, Y, and Z could then be in MACRO variables #900-#902. They will be in mm units so you'll have to convert them if you need inch units. You could do it like this;

#900=[PRM[19700]/25.4]
#901=[PRM[19701]/25.4]
#902=[PRM[19702]/25.4]

or like this;

#900=PRM[19700]
#901=PRM[19701]
#902=PRM[19702]

#900=[#900/25.4]
#901=[#901/25.4]
#902=[#902/25.4]

Lots of options.

how I can check my control have option for dynamic calulation ,This is something standard on all fanuc control .or I have to pay extra for this ?

Link to comment
Share on other sites
11 minutes ago, mirek1017 said:

how I can check my control have option for dynamic calulation ,This is something standard on all fanuc control .or I have to pay extra for this ?

There are two ways;

1)Send me the following files from your machine;

  • SYS-CONF.TXT

    • System Configuration Data

  • CNCIDNUM.TXT

    • CNC ID Information (Options, functions, etc…)

  • CNC-PARA.TXT

    • Parameters (axis configuration, center of rotation parameters, etc…)

With these files I can tell all the options your machine has and what your available G-Codes are.

2. Press the Offset/Settings hard-key, right arrow soft-key and look for FACT-OFS (or somethign remotely similar)

 

"Standard" is not easily defined. Each machine tool builder adds a specific suite of functions that they make "standard" for their machines. For Example, a Matsuura 5-Axis machine purchased within the last 10 years or so has the following g-codes as "standard"; 

G00, G01, G02, G03
G04
G04.1
G05, G05.1, G05.4, G08 (covered by G131)
G09
G10
G10.8
G11
G17, G18, G19
G20, G21
G27, G28, G28.2, G29, G30, G30.2
G31
G38
G39
G40, G41, G42
G41.2, G41.3, G41.6, G42.2, G42.6
G43
G43.4, G43.5. G43.8, G43.9
G44
G49
G52
G53
G53.1, G53.6
G54-G59, G54.1P1-G54.1P300
G54.4P1-G54.4P7
G61
G63
G64
G65, G66, G66.1, G67
G68.2, G68.3, G68.4
G69
G73, G74, G76, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89
G90, G91
G92
G93, G94, G95
G98, G99

With some additional hardware like 1GB Dataserver and a few other items. That is a "standard" configuration.

[rant]A number of our competitors do not make this a standard, in fact they hide it and whan the customer goes to use their machine they find out the hard way (i.e. a a hefty quote from FANUC), then the competitor has the audacity to blame FANUC and the customer that doesn't know any better also blames FANUC and then FANUC gets the bad rap meanwhile the Machine Builder/Dealer comes out smelling like a rose in the deception. All so they could beat another company on price and the customer was not educated enough to compare apples to apples.[/rant]

 

Link to comment
Share on other sites
11 minutes ago, cncappsjames said:

There are two ways;

1)Send me the following files from your machine;

  • SYS-CONF.TXT

     

    • System Configuration Data

       

  • CNCIDNUM.TXT

     

    • CNC ID Information (Options, functions, etc…)

       

  • CNC-PARA.TXT

     

    • Parameters (axis configuration, center of rotation parameters, etc…)

With these files I can tell all the options your machine has and what your available G-Codes are.

 

2. Press the Offset/Settings hard-key, right arrow soft-key and look for FACT-OFS (or somethign remotely similar)

 

"Standard" is not easily defined. Each machine tool builder adds a specific suite of functions that they make "standard" for their machines. For Example, a Matsuura 5-Axis machine purchased within the last 10 years or so has the following g-codes as "standard"; 

G00, G01, G02, G03
G04
G04.1
G05, G05.1, G05.4, G08 (covered by G131)
G09
G10
G10.8
G11
G17, G18, G19
G20, G21
G27, G28, G28.2, G29, G30, G30.2
G31
G38
G39
G40, G41, G42
G41.2, G41.3, G41.6, G42.2, G42.6
G43
G43.4, G43.5. G43.8, G43.9
G44
G49
G52
G53
G53.1, G53.6
G54-G59, G54.1P1-G54.1P300
G54.4P1-G54.4P7
G61
G63
G64
G65, G66, G66.1, G67
G68.2, G68.3, G68.4
G69
G73, G74, G76, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89
G90, G91
G92
G93, G94, G95
G98, G99

With some additional hardware like 1GB Dataserver and a few other items. That is a "standard" configuration.

[rant]A number of our competitors do not make this a standard, in fact they hide it and whan the customer goes to use their machine they find out the hard way (i.e. a a hefty quote from FANUC), then the competitor has the audacity to blame FANUC and the customer that doesn't know any better also blames FANUC and then FANUC gets the bad rap meanwhile the Machine Builder/Dealer comes out smelling like a rose in the deception. All so they could beat another company on price and the customer was not educated enough to compare apples to apples.[/rant]

 

thank you so much for your help .I will tomorrow morning 

  • Like 1
Link to comment
Share on other sites

Fanuc Controls are like a "lego set". Some manufacturers (like Matsuura) will setup a "standard package", and will refuse to sell the machine with less options than the standard package. I'm a big fan of doing this.

Other machine tool builders will offer a stripped-down, bare-bones control as the base option, and let the customer dictate (pick-and-choose) what options they want to pay for. This keeps the cost of the machine/control combination low, but often results in certain features being missing when it comes to making the most of your machine and control combination.

The other thing which factors into this is the Post Processor, for formatting your G-Code output.

You can automate "code output" from Mastercam to your machine, but you're relying on a "perfect setup", to know where the part sits on the machine, relative to the Center of Rotation. If you have good setup skills and discipline, you can get away with a lot by doing things "manually", which is what you are currently after.

The modern way of addressing this on a CNC Control, like the Fanuc 31i-B5, is to use "Dynamic Codes". This is where a Calibration Routine is run, most often by using a Gauge Sphere in combination with a Spindle Probe, and the results are used to calculate and set "Center of Rotation" Parameters.

As James has mentioned, these would be Parameters #19700-19705 on the 31i, for a 5-Axis machine. For a 4-Axis, only the #19700-#19702 would be needed.

If you're using Dynamic Codes, where the COR is set and maintained (calibration is performed at regular intervals), you can also take advantage of Tilted Work Planes (G68.2), where there is essentially "1-line of G-Code", which takes care of the rotation, and optionally the "offset" of the XYZ location, to the Feature Coordinate System on the part.

The most powerful function for "error correction and alignment" on the Fanuc 31i-B5 is called "Workpiece Setting Error Correction" (WSEC), and this function allows you to perform "true 6-degrees of freedom" error correction for parts which aren't 100% aligned to the machine's axes, and aren't sitting "perfectly" in space relative to the machine's center-of-rotation. It is more commonly used on 5-Axis machines, and might not be the greatest option for a 4-Axis Horizontal Boring Mill, because to correct for these alignment errors typically requires at least 2 rotary axes, but I would certainly look into getting Tilted Work Plane, as this will save you time, money, and aggravation.

However, to take advantage of those codes, you'll need to purchase the options on the machine, have someone from Fanuc or the Machine Tool Builder come out and install, configure, and test those options, and you'll need a Post Processor which has been setup to output the correctly formatted G68.2 NC Code output. That will involve at least two purchases, likely a modified Post Processor, and the money to the MTB for upgrading your control functions/options. Plus the training on how to use all those options.

I've certainly seen plenty of shops who still use the "old school" methods of calculating new Work Offset Positions, using G10 lines, from within Mastercam. This can be done "for free", if you learn how to properly edit your Post Processor, but it still takes effort to physically measure where the part is located on the machine, because you have to feed that data into Mastercam as "input", to get your Post to calculate the proper "output".

  • Thanks 1
  • Like 2
Link to comment
Share on other sites

cant wait to get into this thread over break, looks like a lot of good info. I have always taken the simple approach. If I have rotations going in my Horizontals, I program from COR, set matercam up with my planes associative to a point, Go back the machine do some measuring and move my point to make up for any fixturing error. It sucks but I have always been able to get within a thou. any thing tighter I'll just set up a different work offset. If you have accurate models of your tombstones, or pallets in your case, you can get it pretty good. As for castings, God I hate castings!!! But I try to fixture to datum target points and usually don't need to shift after the initial set up. 

All of that just to say I have been doing it wrong.. lol I Just wish our horizontals had dynamic work offsets, or Work shift error enabled, probe and go would be a God Send!

  • Like 2
Link to comment
Share on other sites

Yo Pete!

No wrong way to machine a part, given your constraints. If your company is willing to invest in the options on the machine, then there are certainly newer options for making your life easier, all it takes is making the investment in a proper Post Processor, and purchasing the functions on the Control. But it does also take consistent practice in calibrating the Probing System itself, then going through and calibrating the COR (Machine Rotary Zero Point) Values.

WSEC is a God Send for machining Castings! If you are doing a bunch of that work, it may also be worth investing in Verisurf, so you can make measurements of the Castings "on the machine", and feed that measurement data back into the Verisurf model for a "best fit". This can be used to adjust your "main work offset" location on the part, to be able to "fit the features within the as-cast material". Used in combination with WSEC, this can not only make the setup of these complex parts "easy", it can help you to rescue castings where they are on the edge of not being workable by "best fitting" the finished part surface locations to the casting, and then correcting for the misalignments on the machine using the WSEC functionality.

Link to comment
Share on other sites
27 minutes ago, Colin Gilchrist said:

I've certainly seen plenty of shops who still use the "old school" methods of calculating new Work Offset Positions, using G10 lines, from within Mastercam. This can be done "for free", if you learn how to properly edit your Post Processor, but it still takes effort to physically measure where the part is located on the machine, because you have to feed that data into Mastercam as "input", to get your Post to calculate the proper "output".

Ummmm, yeah...no you don't

 

 

Link to comment
Share on other sites
4 minutes ago, JParis said:

Ummmm, yeah...no you don't

 

 

Let me qualify that John > when you are physically setting up your part "free standing" on the table, not using dedicated work holding.

Lol, you're just spoiled, because most of your parts fit in dedicated fixtures/vises on the machine, and you know where all those surfaces are located.

You're not taking a giant part, sitting on 1-2-3 or 2-4-6 blocks, and tapping it into location, then running an indicator across the part to be sure the part surfaces are parallel to the axis travel. 😉

I mean, feel free to correct me if I'm wrong here, but there is a big difference between the type of part I see the OP cutting, and what you're doing with your Horizontals...

  • Like 1
Link to comment
Share on other sites
12 minutes ago, Colin Gilchrist said:

Let me qualify that John > when you are physically setting up your part "free standing" on the table, not using dedicated work holding.

Lol, you're just spoiled, because most of your parts fit in dedicated fixtures/vises on the machine, and you know where all those surfaces are located.

You're not taking a giant part, sitting on 1-2-3 or 2-4-6 blocks, and tapping it into location, then running an indicator across the part to be sure the part surfaces are parallel to the axis travel. 😉

I mean, feel free to correct me if I'm wrong here, but there is a big difference between the type of part I see the OP cutting, and what you're doing with your Horizontals...

In a case as such, while it "can" be done the way I do thing, the dynamic fixture offsetting is EASILY the appropriate and easier way to do it...IF you have a control with that functionality..you'll get no argument from me on that point.  :)

Honestly, it I was doing that kind of work, I'd look into pin locations, stop blocks in known locations....it "would" then be a lot easier to do what I am doing...but out in speace, here sits the part...no, not really going to work well.

16 minutes ago, Colin Gilchrist said:

Lol, you're just spoiled, because most of your parts fit in dedicated fixtures/vises on the machine, and you know where all those surfaces are located.

yup, becasue I set it up that way  :)

Never used to be like that here.....

Now that build fixtures to the sizes I give them, they set the program to run a single part...run it off, many times parts are in tolerance and can be 1st piece'd....then theu turn on either OP1 or Face 1, run it, prove it...turn on face 2/op2, rinse and repeat....

A lot of work went in to getting to this point.

  • Like 3
Link to comment
Share on other sites
35 minutes ago, Colin Gilchrist said:

Yo Pete!

No wrong way to machine a part, given your constraints. If your company is willing to invest in the options on the machine, then there are certainly newer options for making your life easier, all it takes is making the investment in a proper Post Processor, and purchasing the functions on the Control. But it does also take consistent practice in calibrating the Probing System itself, then going through and calibrating the COR (Machine Rotary Zero Point) Values.

WSEC is a God Send for machining Castings! If you are doing a bunch of that work, it may also be worth investing in Verisurf, so you can make measurements of the Castings "on the machine", and feed that measurement data back into the Verisurf model for a "best fit". This can be used to adjust your "main work offset" location on the part, to be able to "fit the features within the as-cast material". Used in combination with WSEC, this can not only make the setup of these complex parts "easy", it can help you to rescue castings where they are on the edge of not being workable by "best fitting" the finished part surface locations to the casting, and then correcting for the misalignments on the machine using the WSEC functionality.

Hey Colin, Merry Christmas my man, Definitely an ezier way, but you know me love beating my head against the wall. We do more castings as of late, So I am becoming better with everyone. I try to get them Qualified and straight into a 5 axis where I have the functionality. We are using vericut, Camplete and anything else we have to. We even got a 3D scanner, to make a raw casting STL. All of that and they are still my least favorite thing in the world. Lol

  • Like 1
Link to comment
Share on other sites
18 minutes ago, JParis said:

In a case as such, while it "can" be done the way I do thing, the dynamic fixture offsetting is EASILY the appropriate and easier way to do it...IF you have a control with that functionality..you'll get no argument from me on that point.  :)

Honestly, it I was doing that kind of work, I'd look into pin locations, stop blocks in known locations....it "would" then be a lot easier to do what I am doing...but out in speace, here sits the part...no, not really going to work well.

yup, becasue I set it up that way  :)

Never used to be like that here.....

Now that build fixtures to the sizes I give them, they set the program to run a single part...run it off, many times parts are in tolerance and can be 1st piece'd....then theu turn on either OP1 or Face 1, run it, prove it...turn on face 2/op2, rinse and repeat....

A lot of work went in to getting to this point.

Oh, I'm in 100% agreement. You're doing it right, because you took the time to set it up that way, and now your company is reaping the benefits of your knowledge on how to do it right.

  • Like 2
Link to comment
Share on other sites
  • 2 weeks later...

Here's what I use for B axis coordinate rotation. I wrote this in 2002.

%
O9018(G2201 -- XZ COORDINATE ROTATION PROGRAM) (FANUC)
(PARAMETER 6058)
#10=[13980+[#4130*20]](CURRENT FIXTURE OFFSET NUMBER)
#11=[#10+1](NUMBER FOR CURRENT OFFSET X)
#12=[#10+2](NUMBER FOR CURRENT OFFSET Y)
#13=[#10+3](NUMBER FOR CURRENT OFFSET Z)
#14=[#10+4](NUMBER FOR CURRENT OFFSET
#15=[ABS[#921]-ABS[#[#13]]](Z LENGTH FROM PALLET CL)
#16=[#[#11]](X LENGTH FROM PALLET CL)
#17=SQRT[[#15*#15]+[#16*#16]](HYPOTENUSE LENGTH)
#18=ATAN[#16]/[#15](ANGLE FROM PALLET CL TO PART ORIGIN)
(NOW MAKING NEW G59 COORDINATES)
#19=[SIN[#18-#2]*[#17]](PART ANGLE + ORIGIN ANGLE X LENGTH)
#20=[COS[#18-#2]*[#17]](PART ANGLE + ORIGIN ANGLE Z LENGTH)
#5321=[#19](X G59 COORDINATE)
#5322=[#[#12]]
#5323=[#921]+[#20](Z G59 COORDINATE)
#5324=[[#[#14]]+#2]
IF[#5324GT360]THEN#5324=#5324-360
#19981=[#19](X G54P300 COORDINATE)
#19982=[#[#12]]
#19983=[#921]+[#20](Z G54P300 COORDINATE)
#19984=[[#[#14]]+#2]
IF[#19984GT360]THEN#19984=#19984-360
M99
%

 

  • Thanks 1
Link to comment
Share on other sites
18 hours ago, cncappsjames said:

Any arguments required on G2201?

What's in #921?

G2201 is the call name.

#921 = "Z" DISTANCE FROM SPINDLE END TO CENTERLINE OF THE PALLET

O5502 (OFFSET CLEARING)
#[13981+[#539*20]]=0
#[13982+[#539*20]]=0
#[13983+[#539*20]]=#921
#[13984+[#539*20]]=0
#[14001+[#539*20]]=0
#[14002+[#539*20]]=0
#[14003+[#539*20]]=#921
#[14004+[#539*20]]=90
#[14021+[#539*20]]=0
#[14022+[#539*20]]=0
#[14023+[#539*20]]=#921
#[14024+[#539*20]]=180
#[14041+[#539*20]]=0
#[14042+[#539*20]]=0
#[14043+[#539*20]]=#921
#[14044+[#539*20]]=270
M99

This is the router for a max 4 piece vise program;

O5023 (4 PART CLUSTERTOWER ROUTER)
 
(-0-)
WHILE[#[#539+600+[4-1]]EQ1]DO1 (SURFACE 1)
IF[#172EQ5102]GOTO112
IF[#172EQ5103]GOTO113
IF[#172EQ5106]GOTO112
#900=[#539+[4-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B90.
G2201B90.
G91 G00 X0 G59
M#173 P[#170+1]
GOTO112
END1
N112 WHILE[#[#539+600+[1-1]]EQ1]DO1 (SURFACE 2)
IF[#172EQ5101]GOTO211
IF[#172EQ5103]GOTO113
IF[#172EQ5104]GOTO113
#900=[#539+[1-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B0.
M#173 P[#170+2]
GOTO113
END1
N113 WHILE[#[#539+600+[2-1]]EQ1]DO1 (SURFACE 3)
IF[#172EQ5101]GOTO211
IF[#172EQ5102]GOTO212
IF[#172EQ5105]GOTO211
#900=[#539+[2-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B270.
G2201B270.
G91 G00 X0 G59
M#173 P[#170+3]
GOTO211
END1
(-90-)
N211 WHILE[#[#539+600+[1-1]]EQ1]DO1 (SURFACE 1)
IF[#172EQ5102]GOTO212
IF[#172EQ5103]GOTO213
IF[#172EQ5106]GOTO212
#900=[#539+[1-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B90.
G2201B90.
G91 G00 X0 G59
M#173 P[#170+1]
GOTO212
END1
N212 WHILE[#[#539+600+[2-1]]EQ1]DO1 (SURFACE 2)
IF[#172EQ5101]GOTO311
IF[#172EQ5103]GOTO213
IF[#172EQ5104]GOTO213
#900=[#539+[2-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B0.
M#173 P[#170+2]
GOTO213
END1
N213 WHILE[#[#539+600+[3-1]]EQ1]DO1 (SURFACE 3)
IF[#172EQ5101]GOTO311
IF[#172EQ5102]GOTO312
IF[#172EQ5105]GOTO311
#900=[#539+[3-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B270.
G2201B270.
G91 G00 X0 G59
M#173 P[#170+3]
GOTO311
END1
(-180-)
N311 WHILE[#[#539+600+[2-1]]EQ1]DO1 (SURFACE 1)
IF[#172EQ5102]GOTO312
IF[#172EQ5103]GOTO313
IF[#172EQ5106]GOTO312
#900=[#539+[2-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B90.
G2201B90.
G91 G00 X0 G59
M#173 P[#170+1]
GOTO312
END1
N312 WHILE[#[#539+600+[3-1]]EQ1]DO1 (SURFACE 2)
IF[#172EQ5101]GOTO411
IF[#172EQ5103]GOTO313
IF[#172EQ5104]GOTO313
#900=[#539+[3-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B0.
M#173 P[#170+2]
GOTO313
END1
N313 WHILE[#[#539+600+[4-1]]EQ1]DO1 (SURFACE 3)
IF[#172EQ5101]GOTO411
IF[#172EQ5102]GOTO412
IF[#172EQ5105]GOTO411
#900=[#539+[4-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B270.
G2201B270.
G91 G00 X0 G59
M#173 P[#170+3]
GOTO411
END1
(-270-)
N411 WHILE[#[#539+600+[3-1]]EQ1]DO1 (SURFACE 1)
IF[#172EQ5102]GOTO412
IF[#172EQ5103]GOTO413
IF[#172EQ5106]GOTO412
#900=[#539+[3-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B90.
G2201B90.
G91 G00 X0 G59
M#173 P[#170+1]
GOTO412
END1
N412 WHILE[#[#539+600+[4-1]]EQ1]DO1 (SURFACE 2)
IF[#172EQ5101]GOTO501
IF[#172EQ5103]GOTO413
IF[#172EQ5104]GOTO413
#900=[#539+[4-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B0.
M#173 P[#170+2]
GOTO413
END1
N413 WHILE[#[#539+600+[1-1]]EQ1]DO1 (SURFACE 3)
IF[#172EQ5101]GOTO501
IF[#172EQ5102]GOTO501
IF[#172EQ5105]GOTO501
#900=[#539+[1-1]]
G91 G00 X0 G54 P[#900]
G90 G00 B270.
G2201B270.
G91 G00 X0 G59
M#173 P[#170+3]
GOTO501
END1
N501
M99
 

 

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...