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:

MPMaster to output Gcode on every line


Recommended Posts

Is there a switch on the MPMaster to get all G codes to be non modal? e.g.:

 

G0 Z-7.8822

G1 X2.2050

G1 Z-7.9950

G1 X2.2850

G0 Z-7.8761

G1 X2.1650

G1 Z-7.9950

G1 X2.2450

 

Any ideas? Current post will not output G1 or G0 on the next line if it's already active, yes I know that's fine and I like it that way but I'm at a new place where operators won't run a program as they can't read it if there is no Gcode on each and every line :realmad:

Link to comment
Share on other sites

yes there is you need to change the each time you want to force the post to out put the G code. In the post you will see sgcode if you place *sgcode. However you need to do this in several place.

 

prapidout       #Output to NC of linear movement - rapid 
     sav_gcode = gcode$
     if convert_rpd$ = one,
       [
       gcode$ = one
       feed = maxfeedpm
       ipr_type = zero
       ]
     pcan1, pbld, n$, sgplane, `sgcode, [if gcode$ = 1, sgfeed], sgabsinc, pccdia, # <<<< this line change `sgcode to *sgcode
       pxout, pyout, pzout, pcout, [if gcode$ = 1, `feed], strcantext, scoolant, e$
     gcode$ = sav_gcode

plinout         #Output to NC of linear movement - feed  
     pcan1, pbld, n$, sgfeed, sgplane, `sgcode, sgabsinc, pccdia, # <<<< Again same here 
       pxout, pyout, pzout, pcout, `feed, strcantext, scoolant, e$

pcirout         #Output to NC of circular interpolation
     if not(arccomp), pcompwarn
     if full_arc_flg$,
       [
       if plane$ = zero, result = force(xabs,yabs)   #force coordinate on full arc              
       if plane$ = one,  result = force(yabs,zabs)   #force coordinate on full arc              
       if plane$ = two,
         [
         result = force(xabs,xabs)   #force coordinate on full arc              
         result = force(zabs,zabs)   #force coordinate on full arc              
         ]
       ]
     if hel_2100 = one, pcirout2
     else, pcirout1

pcirout1        #Output to NC of circular interpolation
     pcan1, pbld, n$, `sgfeed, sgplane, sgcode, sgabsinc, pccdia,  #<<<< This line change sgcode to *sgcode
       pxout, pyout, pzout, pcout, parc, feed, strcantext, scoolant, e$

pcirout2        #Output to NC of circular interpolation
     if (plane$ = zero & fmtrnd(zinc)<>0)
      | (plane$ =  one & fmtrnd(xinc)<>0)
      | (plane$ =  two & fmtrnd(yinc)<>0), phelout
     else, pcirout1

phelout         #Output to NC of helical interpolation
     if plane$ = zero,
       [
       result = nwadrs(strk, lead)
       lead = abs(zinc/sweep$*360)
       ]
     if plane$ = one,
       [
       result = nwadrs(stri, lead)
       lead = abs(xinc/sweep$*360)
       ]
     if plane$ = two,
       [
       result = nwadrs(strj, lead)
       lead = abs(yinc/sweep$*360)
       ]
     pcan1, pbld, n$, `sgfeed, sgplane, sgcode, sgabsinc, pccdia,  #<<<< This line change `sgcode to *sgcode
       pxout, pyout, pzout, *lead, pcout, parc, feed, strcantext, scoolant, e$

 

 

Now this is only going to do the G0, G1, G2, and G3 lines of code if you have others you will need to seach them out

 

Jerry

Link to comment
Share on other sites

change sgcode to *sgcode

start in the plinout postblock and the prapidout postblock, then move on to arcs and anywhere else you need.

 

sgcode may have other modifiers preceding it (i.e. `), just change the modifier to an asterisk, that means force it regardless of modality!

 

backup your post first!

Link to comment
Share on other sites

Yes I believe you are right K2csq7. It is my understanding that any command starting with a "p" is refering to a post block same as a command starting with "s" is to a string, the ( * ) in front of any command will force the output. Whether it is a G code feed or axis command.

 

Jerry

Link to comment
Share on other sites

psgcode would reference a post block or a variable defined as psgcode. If it has not been defined as a variable, this will error out. If this is trying to refer to a post block named psgcode, putting a * in front is bad syntax and does nothing.

 

The problem you may find with simply putting in *sgcode is you may get lines that only contain the G-code, with no coordinates after. One way to get around this is to compare the formatted version of the current coordinate to the formatted version of the previous coordinate or check to see if the incremental value is non-zero (but this tends to be less reliable)

 

if fmtrnd(xabs) <> fmtrnd(prv_xabs) | fmtrnd(yabs) <> fmtrnd(prv_yabs), etc

 

or

 

if fmtrnd(xinc) | fmtrnd(yinc) etc

Link to comment
Share on other sites

(Just guessing)

If it starts with a p it is a call to a postblock (can't force that, it happens regardless), he must have a custom postblock for his sgcode.

What manual or information is available to find everything needed to modify posts. I have learned several things here and on my own, because of my access and electronics background. Is the a manual or post modification training book ?

Link to comment
Share on other sites

What manual or information is available to find everything needed to modify posts. I have learned several things here and on my own, because of my access and electronics background. Is the a manual or post modification training book ?

 

V9 post ref guide & x5 NCI parameter ref guide is all I have used.

Link to comment
Share on other sites
Guest Greyman

V9 post ref guide & x5 NCI parameter ref guide is all I have used.

 

 

If you contact your reseller they might have X6 NCI with V9 it is 50meg PDF. and also V9 is update as to what is obsolete.

 

Jerry

I have the V9 post reference guide, the X5 NCI parameter reference comes with X5 I believe. The X6 I hope the reseller has it already. Thx guys !

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