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:

Advanced Drill Code entry


ogu79
 Share

Recommended Posts

In Advanced Drill toolpath at the code entry section i would like to enter more than one code.

But in the post it generate all codes are in the same line. 

Can I get each code at the different line

 

Example:

ENTRY CODE: M5 M9 S1000M3 G4P1. 

G1 Z-.5 F10.

M5

M9

S1000M3

G4P1.

G1 Z-1.2 F5.

 

 

 

Link to comment
Share on other sites

Greetings @ogu79

First enable your debugger
To do that got to:
File/configuration/ Post dialog defaults 
and put check mark to  "Enable post debugger"
Open your .pst file and check if you have ppost$ in your post. If yes just change it to ppost_1 or something (later when you are done with debugging set it how it was before)

Once you are done press "G1" button and at the bottom left corner press debug

Once debugging is done find the line which you want to change. In your case  M5 M9 S1000M3 G4P1.

Here is just an example code

(C_AXIS_DRIL_D24)
 
( #1. Operation type -  Face drilling - C axis  -   |    )
 
N110 G0 G40 G80 G13.1 G98
N120 G0 T1313
N130 M35
N140 G28 H0.
N150 G0 G54 Z10. C90.
N160 X0.
N170 G98 G97 S1194 P12 M03  ---> lets check where we get output of this line
N180 M08
N190 G83 Z-120. R-5. F143.3 M89  (Clamp On)
N200 G80
N210 M09
N220 M90 (Clamp Off)
N230 M05
N240 G28 U0.
N250 G28 W0. H0.
N260 T1313
N270 M30
%

image.thumb.png.17bb067da06cd10c81a89c99e57126eb.png

 

Here I will check where I am getting G97 output.
In the bottom left corner you will se some numbers 2940:43
What it mean is: your G97 output is in row 2940 in your post and position in that row is 43

this is the line from our post (everything is in the same line):

      else,    #Milling mode spindle
        [
        #result = nwadrs(strp, speed) #Different letter than 'S' for mill spindle?
        pbld, n$, [if nc_system_type = 0, *sgfeed], [if nc_system_type >= 1, *sgfeed_b], *sg97, *speed, "P12" , *spindle_m, e$ #spindle speed P12
        result = nwadrs(strs, speed) #Reset to 'S' for next single speeed output
        ]
      !css_actv$

now lets move everything in separate line

      else,    #Milling mode spindle
        [
        #result = nwadrs(strp, speed) #Different letter than 'S' for mill spindle?
        pbld, n$, [if nc_system_type = 0, *sgfeed], [if nc_system_type >= 1],  e$ 
        pbld, n$, *sg97, e$
        pbld, n$,  *speed, "P12", e$
        pbld, n$, *spindle_m, e$

        result = nwadrs(strs, speed) #Reset to 'S' for next single speeed output
        ]
      !css_actv$

 

now here is our new output

(C_AXIS_DRIL_D24)
 
( #1. Operation type -  Face drilling - C axis  -   |    )
 
N110 G0 G40 G80 G13.1 G98
N120 G0 T1313
N130 M35
N140 G28 H0.
N150 G0 G54 Z10. C90.
N160 X0.
N170 G98
N180 G97
N190 S1194 P12
N200 M03
N210 M08

N220 G83 Z-120. R-5. F143.3 M89  (Clamp On)
N230 G80
N240 M09
N250 M90 (Clamp Off)
N260 M05
N270 G28 U0.
N280 G28 W0. H0.
N290 T1313
N300 M30
%

In the link below you can find link where you can find most of the pdf files related with postprocessor editing
https://www.dropbox.com/scl/fo/328x8yqnyr7jdfrkqzchc/h?rlkey=ggxsxrhlda1pwos451wh4tnqr&dl=0

I hope this can help you

Kind regards

Ivan

Link to comment
Share on other sites

Thank you for your respond @BehindYou

When i debug it this is my result from

NC output: 

 |62||109|M5 M9 G4P.5 M51 S1222M3 G4P.5|pscomm_fmt_out[PST:362, 72]|plin$  +  pncoutput  +  pscomm_all_out  +  pcomment_scan_out  +  pscomm_fmt_out  +  pspc

Post:

pscomm_fmt_out  #set format and output of each Mastercam generated comment
      scomm_out = ucase(scomm_out)

      spaces$ = 0
      if gcode_comm >= 1051 & sof & scomm_out <> snull,     scomm_str, *scomm_out, scomm_end, e$
      if gcode_comm = 1005 & scomm_out <> snull,  n$, pspc, scomm_str, *scomm_out, scomm_end, e$, pfel
      if gcode_comm = 1006 & scomm_out <> snull,  n$, pspc,            *scomm_out, e$ 
      if gcode_comm = 1007 & scomm_out <> snull,  scomm_str, *scomm_out, scomm_end
      if gcode_comm = 1026 & scomm_out <> snull,             *scomm_out
      if gcode_comm = 1008 & scomm_out <> snull,  n$, pspc, scomm_str, *scomm_out, scomm_end, e$
      spaces$ = sav_spc

 

NC output: 
|63|T.MIN|109|-> M5 M9 G4P.5 M51 S1222M3 G4P.5|-> plin$[PST:4380,  7]|plin$  +  pncoutput  +  pscomm_all_out  +  pcomment_scan_out  +  pscomm_fmt_out  +  pspc

Post:

ENCRYPTED POST SECTION

 

colored blue lines are the responding lines for the codes

but i can not see individual code in the post that i can manipulate like in your example 

what should I do?

Thanks again...
 



 

Link to comment
Share on other sites
1 hour ago, BehindYou said:

In this case you have encrypted post.
.PSB file which you can't open.
You should contact your reseller to do changes which you want.  

when i check with mp post for encrypted section it is basically come to end with this section

  if gcode_comm = 1006 & scomm_out <> snull,  n$, pspc,            *scomm_out, e$ 

when i made a change in this section it is changing the post output for the codes
but I couldn't make it to place it at the different line as lack of my knowledge 

 

Link to comment
Share on other sites
9 hours ago, BehindYou said:

Can you send me your post so I can take a look
Email: [email protected]

Ivan,

I sent it to you.

i find some comment manipulation topic in this forum that you can break the comment with using special character

maybe this can help

https://www.emastercam.com/forums/topic/79766-comment-manipulation/page/2/

thanks again for your help

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