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:

Post editing help


Jim at Gentex
 Share

Recommended Posts

I've almost got this post to where I want it but it's not quite there. If someone could look at it and let me know what else I need to do to get from where I am to where I want ot be, I would appreciate it. biggrin.gif

 

I put 3 files in a folder called Gentex Jim in the Text & posts & Misc directory on the ftp site.

 

Thanks!

 

cheers.gifbiggrin.gif

Link to comment
Share on other sites

Oh the get what you get and be happy if you get anything worth a dram MPGEN5Ax post that is locked up so tight and does so much of what you do not want it to that you almost have to pull you hair out it is so much fun trying to get a workable solution. Well we will start here:

 

Part 1:

code:

psof            #Start of file for non-zero tool number             

 

##### Custom changes allowed below #####

 

if ntools = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool

]

if progno = zero, progno = one

 

*sopen_prn, "PROGRAM - ", progname, *sclose_prn, e

pbld, n, *sopen_prn, "DATE - ", date, " TIME - ", time, *sclose_prn, e

pbld, n,"%",e

pbld, n, *sg20, "G00", *sg40, "G80", "G90", "E20", e

 

sav_absinc = absinc

absinc = one

prefreturn #xout, p_out not output here

absinc = zero

p_absinc_chng

ptoolcomment

comment

pcan


We nee to look at the line prefreturn. This line looks like this:

code:

prefreturn      #Refernce return 

pbld, n, *sgcode, *sg28, *sgabsinc, "Z0.", e

if toolchng = one, pbld, n, *sgcode, *sg28ref, "X0.", "Y0.", e

and if you look here in the not what you want nc

code:

( PROGRAM - RAIL BASE 03-01-05 BOTTOM_TILT_DRILL1 )

( DATE - 11-03-05 TIME - 15:38 )

%

G20 G00 G40 G80 G90 E20

G0 G28 G91 Z0.

G0 G28 X0. Y0.

T4 M6

G0 G54 G90 X-5.8595 Y-.7909 A229.781 B33.385 S1200 M3

G43 H4 Z5.5477 M8

G83 G99 Z5.1977 R5.5477 Q.02 F5.

G80

M9

M5

G0 G28 G91 Z0.

G28 A0. B0.

E20 G0 G40 G80 G90 G94

G0 G28 G91 Z0.

T5 M6

This does this part of that code:

code:

 G0 G28 G91 Z0.

G0 G28 X0. Y0.

so we use the # sign in front of the prefreturn will sovle part 1:

 

Now 2 things you did not supply your psb or txt with this post so no one can really test it unless you supply that along. Also you can rename this post just have to rename all three. You can do this the same way you did to unlock it edit the post works the same way to rename all three files to a name you want or like.

 

[ 03-11-2005, 09:25 PM: Message edited by: Crazy^Millman ]

Link to comment
Share on other sites

Part 2:

 

This post uses thing in and out of the psb from time to time but for this part we have no problem:

code:

pretract        #End of tool path, toolchange              

pretract_mov

sav_absinc = absinc

coolant = zero

cc_pos = zero

gcode = zero

spdir2 = one

 

##### Custom changes allowed below #####

 

pbld, n, scoolant, e

pbld, n, sccomp, spindle, e

pg69

absinc = one

prefreturn #xout, p_out not output here

absinc = sav_absinc

protretinc

If we look at prefreturn here we have the same thing going on. So we put the pound sign and it will look like this:

code:

prefreturn      #Refernce return 

pbld, n, *sgcode, *sg28, *sgabsinc, "Z0.", e

#if toolchng = one, pbld, n, *sgcode, *sg28ref, "X0.", "Y0.", e

Here we want to use the prefreturn we just want it to look different for our use here.

Link to comment
Share on other sites

Part 3:

 

We have a duplicate things going on so we need to take out this:

code:

ptlchg          #Tool change                                        

#Cancel check in case missed in ptoolend

if prv_n_tpln_mch <> n_tpln_mch, pg69

 

##### Custom changes allowed below #####

 

pbld, n, *sg00, *sg40, "G80", *sg90, *sgfeed, "E20",e

 

sav_absinc = absinc

absinc = one

prefreturn #xout, p_out not output here

absinc = sav_absinc

ptoolcomment

comment

pcan

sav_absinc = absinc

absinc = zero

 

##### Stop custom changes #####

 

p_absinc_chng

psof_tlchg_blck #Tool change position block

#Save the current brk_ in prv_brk_ for next loop

pupd_brk

absinc = sav_absinc

p_absinc_chng

pcom_movea

pe_inc_calc

Need to remove this line:

code:

      pbld, n, *sg00, *sg40, "G80", *sg90, *sgfeed, "E20",e  

or you will get this

code:

E20 G0 G40 G80 G90 G94   

at every toolchange which is what you do not want.

Link to comment
Share on other sites

Part 4:

 

Now we have made a little problem with the end of the file so we need to copy a certain part of the file and call it a different name. We will copy pretract and call it pretract2 and change the prefreturn to look like so:

code:

pretract2        #End of tool path, toolchange              

pretract_mov

sav_absinc = absinc

coolant = zero

cc_pos = zero

gcode = zero

spdir2 = one

 

##### Custom changes allowed below #####

 

pbld, n, scoolant, e

pbld, n, sccomp, spindle, e

pg69

absinc = one

pbld, n, *sgcode, *sg28, *sgabsinc, "Z0.", e

pbld, n, *sgcode, *sg28ref, "X0.", "Y0.", e

absinc = sav_absinc

protretinc

Then here we will change this part of the post to use the pretract2 we just made like so:

code:

peof            #End of file for non-zero tool           

toolchng = one

!gcode #to see that this is the EOF in pretract

map_mode = zero

pretract2

 

##### Custom changes allowed below #####

 

comment

n, "M30", e

n,"%",e

I also changed this by taking out the extra % sign becuase I have never needed it. If you do then keep it but if not take it out and all should be good. I have seen a double % put a machine in recieve mode for DNC which can mess with some machines.

 

I am sorry for the length but hope it helps. Can be done if different ways but think this might work and if it does not the correct way will be forth coming very soon which is cool by me.

 

HTH

Link to comment
Share on other sites

Ron,

Thanks a million...this was something I just tried on a whim and got more involved than I wanted. I'll make the changes and see how she works.

 

Phil,

Yes, I could have asked my reseller, but where's the fun in that! biggrin.gif

Seriously, I just started dabbling with this post to see if I could get what I wanted out of it. More of a learning experience than a need. After Ron's excellent tutorial, I've learned what I was looking to learn. Thanks again guys! cheers.gif

Link to comment
Share on other sites

Part 3 might be a litle misleading, you need the whole section showed there just need to remove the line of code showed below it. bonk.gifbonk.gif

 

Yeah Jim and there is always the Saturday or late night when are tryingto get something just right and you just do not want to wait. It is fun learning all this stuff been dabbling with VB a little a long ways to go there but alot of what I showed you is trial and error and things I learned from my dealers, and people on this forum.

 

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