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:

Old Machine Work Offset


connormac
 Share

Recommended Posts

A machine at the company I work for has 6 offsets. Then you have to start using a G52 shift. How can I change my post to put it in that way (without doing it by hand).

instead of :

 

G54.1P1

 

I need:

 

G58

G52X#500Y#501Z#502

 

for : G54.1P2

 

I need :

 

G59

G52X#503Y#504Z#505

 

after G80 I need to put in :

 

G52X0.0Y0.0Z0.0

 

if the shift is called for.

 

Thanks for taking the time to look and for all the help biggrin.gifbiggrin.gif

Link to comment
Share on other sites

Can you redefine the previous 6 work offsets?

Example

Start of program

G0G90G10L2P1 X Y Z

G0G90G10L2P2 X Y Z

G0G90G10L2P3 X Y Z

G0G90G10L2P4 X Y Z

G0G90G10L2P5 X Y Z

G0G90G10L2P6 X Y Z

Cut the first 6 parts

Middle of program Redefine 1-6

G0G90G10L2P1 X Y Z

G0G90G10L2P2 X Y Z

G0G90G10L2P3 X Y Z

G0G90G10L2P4 X Y Z

G0G90G10L2P5 X Y Z

G0G90G10L2P6 X Y Z

Cut the second 6 parts and so on,

Link to comment
Share on other sites

Well you need to put some conditions in your post that will make this work. The pwcs part of the post handels workoffsets if not using the mi to make workoffsets. Here is the pwcs from Mpmaster:

code:

pwcs            #G54+ coordinate setting at toolchange

if wcstype = two | wcstype > three,

[

sav_frc_wcs = force_wcs

if sub_level, force_wcs = zero

if sav_mi9 = 1, workofs = sav_workofs

if workofs < 0, workofs = 0

if workofs <> prv_workofs | (force_wcs & toolchng),

[

if workofs < 6,

[

g_wcs = workofs + 54

*g_wcs

]

else,

[

p_wcs = workofs - five

"G54.1", *p_wcs

]

]

force_wcs = sav_frc_wcs

!workofs

]

Now if you want what you have there then the last part will look like this:

code:

   else   

[

if workofs = 7,

[

pbld, n, "G58", e

pbld, n, "G52X#500Y#501Z#502",e

]

if workofs = 8,

[

pbld, n, "G59", e

pbld, n, "G52X#500Y#501Z#502",e

]

if workofs = 9,

[

pbld, n, "G58", e

pbld, n, "G52X#500Y#501Z#502",e

]

if workofs = 10,

[

pbld, n, "G59", e

pbld, n, "G52X#500Y#501Z#502",e

]

]

force_wcs = sav_frc_wcs

!workofs

]

So to handle the G80 we need ot put some logic here:

code:

pcanceldc       #Cancel canned drill cycle

result = newfs (three, zinc)

if tap_feed = one & drillcyc = three, result = newfs (15, feed) #Cancel tap feeds with 4/3 decimal places

z = initht

if cuttype = one, prv_zia = initht + (rotdia/two)

else, prv_zia = initht

pxyzcout

!zabs, !zinc

prv_gcode = zero

if cool_zmove = yes & (nextop=1003 | (nextop=1011 & t<>abs(nexttool))), coolant = zero

pcan

if drillcyc <> 8, pcan1, pbld, n, "G80", scoolant, strcantext, e

if use_pitch & tapflg = 1, pbld, n, "G94", e

pcan2

tapflg = 0

if workofs > 6,

[

pbld, n, "G52X0.0Y0.0Z0.0 ",e

]

That should take care of it. I did not know if you wanted ot go to higher than 10 or just stop at 8 but this is a start and hope it points you in the right direction.

Link to comment
Share on other sites

The way I have my post set up it is only for this machine. so I can have the post always do this if the WCS is greater that 6. I don't know if this matters any. Is thete any way I can change here:

 

# Word coordinate system code string select

sg53 G53 # Work coordinate system G code #0

sg54 G54 # Work coordinate system G code #1

sg55 G55 # Work coordinate system G code #2

sg56 G56 # Work coordinate system G code #3

sg57 G57 # Work coordinate system G code #4

sg58 G58 # Work coordinate system G code #5

sg59 G59 # Work coordinate system G code #6

sg54.1 [G58

G52X#500Y#501Z#502] # Work coordinate system G code #7

sg54.2 [G59

G52X#503Y#504Z#505] # Work coordinate system G code #8

 

 

But I get a error. does not know what G52 is.

 

 

I tried yours but it gave me an error about:

 

wcstype first, I changed it to wcs.

then it didn't know what two was confused.gif

Link to comment
Share on other sites

Well what they have in that post is the logic to call the vaule once the workofs variable is called. The way I did it does away with the need to define the G54.1p1 in this manner. We hard code the post to this and then there is no need to cal its predefined amount then place that vuale in the nc code. I supect you need ot mi1 to do workoffets and if you do make you not useing the workoffset in the toolplane page but use the misc values to assign workoffsets. Is this the case with this post?

 

If so I hate this way for the very reason you have to use Misc verse what Mastercam is now designed to do and that is use the value at the workoffet box in the toolplane and WCS plane box. I think you might be confued about WCS being greater than 6 making the G54.1p1 work WCS has to do with a prective view or way of looking and assigning the part realtive ot the postion of the part in realtion to the way you want ot machine it. If you are looking at the bottom of the part and use the right corner you are now using that WCS for the orgin, Zplane direction as well as the X plane and Yplane to machine the part realtive the origin of the part now. So when you say WCS it in all aspect of workoffsets has nothing to do with using G54,G55 or anyohter workoffset on the machine. The workoffet number you use which could be MISC method or Toolplane using the workofffet box for a vaule is what would be used here. I would say contact your dealer should be able ot do what you are asking very easy and quick or put up the PWCS part of the post and the pcanceldc part of the post os a better assemnt of what you use and do for workoffets can be made.

 

HTH

Link to comment
Share on other sites

We can go either way with the post. if we do the same part in 4 vises we use mi1 like you are talking about. Or to do a progression we use the toolplane page. Iam willing to have a post just to do what I'm trying to do. It will go along with my 15 other posts.

 

Thanks for the help anyway.

Link to comment
Share on other sites

Ok look here:

code:

ptap            #Canned Tap Cycle

pdrlcommonb

#RH/LH based on spindle direction

if use_pitch, pbld, n, "G95", e

if use_pitch = 0,

[

pcan1, pbld, n, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout,

prdrlout, *feed, strcantext, e

]

else,

[

if met_tool, pitch = n_tap_thds # Tap pitch (mm per thread)

else, pitch = 1/n_tap_thds # Tap pitch (inches per thread)

pcan1, pbld, n, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout,

prdrlout, *pitch, !feed, strcantext, e

]

pcom_movea

tapflg = 1

There are alot of swithes in the post to do it but I still added some thing to not turn on the spindle and things like that which are not really switched but are really custom things.

 

HTH

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...