587,920 active members*
3,497 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 21
  1. #1
    Join Date
    Mar 2012
    Posts
    0

    Post processor editing

    Hi!
    I could use some help as i am new to editing mastercam posts. Ive got two major problems.

    For some reason it always gives me a -2.0 feed rate and at the beginning of each operation it returns to the part's zero before going where its supposed to.

    As you can imagine it gets tedious fixing every single operation. Id appreciate it if someone could tell me how to fix this.

  2. #2
    Join Date
    May 2004
    Posts
    4519
    My first suggestion is just try a different post processor. If that does not work for you, attach a copy of the post processor you are using, a copy of the posted program, and a copy of the posted program with the corrections made that you want with those corrections well noted.

  3. #3
    Join Date
    Mar 2012
    Posts
    0
    Ok. The post i am using is the best ive got so i cant use another one. so here is my processor and a bad program for a simple 4plc. 1/4-20 bolt hole pattern on a 3" dia. and a good copy of the same program. thanks
    Attached Files Attached Files

  4. #4
    Join Date
    May 2004
    Posts
    4519
    Look for these lines in the post:

    pfr # Feedrate W/O Negative Feedrates
    if fr$ > 0, fr$

    I think you might need to add like this:

    pfr # Feedrate W/O Negative Feedrates
    if fr$ > 0, fr$
    if fr$ < 0, fr$=fr$*-1

    On the redundant line output, look at:

    prapidm # Linear line movement - at rapid feedrate
    psubseqn
    if mi2$ = 0, n$, pccdia, *sgcode, *x$, *y$, *zr$, pfr, *ss$, *spdlon
    if mi2$ > 0, sn, pccdia, sgcode, x$, y$, z$, pfr, ss$, spdlon

    Try commenting out one of the lines and see what happens, like:

    prapidm # Linear line movement - at rapid feedrate
    psubseqn
    if mi2$ = 0, n$, pccdia, *sgcode, *x$, *y$, *zr$, pfr, *ss$, *spdlon
    # if mi2$ > 0, sn, pccdia, sgcode, x$, y$, z$, pfr, ss$, spdlon

  5. #5
    Join Date
    Mar 2012
    Posts
    0
    Ive made the changes you suggested and touched nothing else, but when i saved it and tried to load it into mastercam it gave me 3 errors.

    1st it said: "corrupt or invalaid file" then when i clicked ok it said "selected machine definition file is not valid" again i clicked ok and it gave me another message "selected machine definition file not found"

    is there a certain way i have to reload the post?

  6. #6
    Join Date
    May 2004
    Posts
    4519
    Did you change the file extension back to .PST?

  7. #7
    Join Date
    Mar 2012
    Posts
    0
    I had not but i just did that now and it still gave me the same 3 errors

  8. #8
    Join Date
    May 2004
    Posts
    4519
    What editor are you using?

  9. #9
    Join Date
    Mar 2012
    Posts
    0
    The default one the comes with mastercam

  10. #10
    Join Date
    May 2004
    Posts
    4519
    I just used Default mill and attached your my-post-processor-code.txt‎ changed to PST and posted the following code:

    O100 G0 T1 M6
    N110 G0 X214681 Y111381 Z1000 S1069 M3
    N120
    N130 G1 Z-10000 F64
    N140 X215565 Y112265
    N150 G3 X215931 Y113149 I214681 J113149
    N160 X215931 Y113149 I113421 J113149
    N170 X215565 Y114033 I214681 J113149
    N180 G1 X214681 Y114917
    N190 G0 Z1000
    N200 M2

  11. #11
    Join Date
    Mar 2012
    Posts
    0
    What do you mean you attached the code? i didnt even know you could do that. i saved the code, after i made the changes, under a different name and tried to load it as a whole new post. please expalin how you attached it

  12. #12
    Join Date
    May 2004
    Posts
    4519
    Quote Originally Posted by Nadroj88 View Post
    What do you mean you attached the code? i didnt even know you could do that. i saved the code, after i made the changes, under a different name and tried to load it as a whole new post. please expalin how you attached it
    I attached your POST PROCESSOR (my-post-processor-code.txt‎ changed to PST) to MasterCam's Default Mill. Do you know how to access and use Machine Definition Manager?

  13. #13
    Join Date
    Mar 2012
    Posts
    0
    in the machine definition manager theres a pull down menu for me to select a post processer, however its not giving me any options. its not letting me pick from a list, theres only the one post processor showing up, even though i saved the new one as a pst file in the same place the other one is

  14. #14
    Join Date
    May 2004
    Posts
    4519
    So, you know how to access the Machine Definition Manager, but not really use it. Review the screen shots (be sure to save after each step):
    Attached Thumbnails Attached Thumbnails machine_definition_01.jpg   machine_definition_02.jpg   machine_definition_03.jpg   machine_definition_04.jpg  

    machine_definition_05.jpg   machine_definition_06.jpg   machine_definition_07.jpg   machine_definition_08.jpg  


  15. #15
    Join Date
    Mar 2012
    Posts
    0
    Thanks for spelling it our for me. That really helped. but even though i was able to load the edited processor, my proplems arent fixed. The feedrate was no longer negative (yay!) but its still always 2.0 and its still giving me the doulbe line at the begining. Do you think there could be some kind of setting i have on that i am unaware of?

  16. #16
    Join Date
    May 2004
    Posts
    4519
    Quote Originally Posted by Nadroj88 View Post
    Thanks for spelling it our for me. That really helped. but even though i was able to load the edited processor, my proplems arent fixed. The feedrate was no longer negative (yay!) but its still always 2.0 and its still giving me the doulbe line at the begining. Do you think there could be some kind of setting i have on that i am unaware of?
    So, you tried commenting out one of the positioning lines in the post processor. Then you saved it. Then you tested it and found that did not solve the double line at the beginning of the file. Did you undo that edit and then comment out the other line and test that?

  17. #17
    Join Date
    Mar 2012
    Posts
    0
    Ok i did that, seems obvious now i shouldve tried the other line, and now the redundant line is gone! but in a werid twist the negative feedrate is back. i checked the code, its still got the *-1 added to it like you suggested. but even when it wasnt negative, it would still always come out as a feedrate of 2 no matter what i put in

  18. #18
    Join Date
    May 2004
    Posts
    4519
    ptlchg$ # Tool change
    subout$ = 0
    n$, pcooloff,e$
    seqno$ = n$
    seqno$, "G0", *t$, "M6",e$
    n$ = n$ + seqinc$
    comment$
    if progno$ = 0, progno$ = fprogname
    if progno$ = fprogname, prv_progno$ = 9999
    pr
    if prv_c$ <> c$, protary
    if subs = 0, mi2$ = 0
    sreps = mi2$
    if mi2$ = 0, subout$ = 0
    if mi2$ > 0, subout$ = 1
    if opcode$ <> 3, pdrill_s_fix
    if lsubout > 0, pcsub
    if opcode$ <> 3, psubcall
    drills_flag = 0
    prv_fr$ = -20 <<<<<<<<<<<<<<<<<< Maybe this line is the problem. But I am not sure what to change it to.

    Maybe just try commenting it out and see what changes in the G-code when posted.

  19. #19
    Join Date
    Mar 2012
    Posts
    0
    I tried that, still -2 feedrate. perhaps wee looking in the wrong places. it only seems to give me a constant -2 feedrate for drilling cycles. maybe the proplem is in the drill code. i cant read the post processor code very well but i think heres a few possible sections where the problem might be

    section 1.

    # Drilling Definition Section
    # --------------------------------------------------------------------------
    pcomment$ # Manual Entry - COMMENTS (on a block by itself) 1005,1006
    # "comment string" is passed to .PST in 'scomm'
    # "(", t,"-",*tldia, ")"
    n$, "(MSG, ", scomm$, ")",e$

    pcalcdd # Calculate CSink/Full Depth for drilling operation
    td = mr1$ / 2
    te = mr2$ / 2
    tf = 90 - te
    tg = te
    th = cos (tf)
    ti = cos (tg)
    ta = td / th
    tb = ta * ti
    tc = -tb
    depth$ = depth$ + (tc)

    pdrillref # Determine G98 or G99
    lsubout = subout$
    if mr1$ <> 0, pcalcdd
    # if mi2 = 0, n, psg00, *x, *y, e
    # if initht <> refht, drillref = 98
    # if initht = refht, drillref = 99

    pdwell # Determine whether to output dwell
    dwell$ = dwell$ * 1000
    if dwell$ <> 0, *dwell$

    pdrill$ # Canned Drill Cycle
    pdrillref
    if mi2$ = 0, seqno$ = n$
    seqno$, *sgdrill, *x$, *y$, *depth$, *refht$, *fr$, *ss$, *spdlon, e$
    n$ = n$ + seqinc$
    if mi2$ <> 0, pm98
    psubcall

    section 2.

    # Drill variable formats
    # --------------------------------------------------------------------------
    fmt 1 drillcyc$ # drillcyc = 0..7
    fmt 1 drillcur$ # Drill with current cycle flag (=1 if true)
    fmt G 4 drillref # Initial / Reference Toggle (G98/G99)
    fmt 2 dwell$ # Dwell
    fmt 2 initht$ # Initial Height
    fmt R 1 refht$ # Reference Height
    fmt Z 1 depth$ # Depth
    fmt K 2 peck1$ # First peck increment (positive)
    fmt 2 peck2$ # Second or last peck (positive)
    fmt 2 peckclr$ # Safety distance
    fmt 1 retr$ # Retract height
    fmt F 5 frplunge$ # Plunge feedrate in drill cycles
    fmt 1 cancel_drill_test # Test for cancel drill

    section 3.

    pz$ # Linear movement in Z axis only - at feedrate
    psubseqn
    if mi2$ = 0, n$, ptllncomp, sgcode, z$, pfr,e$
    if mi2$ > 0, sn, ptllncomp, sgcode, z$, pfr,e$

    and last section 4.

    pdrill_2$ # Canned Drill Cycle
    if mr1$ <> 0, pcalcdd
    if mi2$ = 0, n$, x$, y$, depth$,e$
    if substart = 0, ex$
    if mi2$ > 0, psubseqn
    if mi2$ > 0, sn, x$, y$, depth$,e$

  20. #20
    Join Date
    May 2004
    Posts
    4519
    I still have not found the key to the solution for this problem. This post is one of the strangest I have seen.

Page 1 of 2 12

Similar Threads

  1. Post Processor Editing
    By Malish in forum BobCad-Cam
    Replies: 23
    Last Post: 06-03-2020, 07:24 AM
  2. POST PROCESSOR EDITING
    By blmmdes in forum Hypermill
    Replies: 5
    Last Post: 05-08-2008, 06:27 PM
  3. Editing post processor in v22
    By JDsto in forum BobCad-Cam
    Replies: 1
    Last Post: 01-21-2008, 02:17 PM
  4. Post Processor editing
    By CNC_savant in forum MetalWork Discussion
    Replies: 2
    Last Post: 04-03-2007, 01:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •