What's new
What's new

Mastercam X9 post help - The final touch

Matt@RFR

Titanium
Joined
May 26, 2004
Location
Paradise, Ca
The last (and only) time I had my reseller modify a post for me, it came back with mods half accomplished, and other shit that worked fine before was busted. So no thanks.

I have my post working 99% for the Brother C00 control. There's one last stupid thing that I just can't figure out.

I have:
Code:
( NO. 38 DRILL T3  H3 )
G100 T3 G43 H3 M3 S4328 G54 M8 [COLOR=#ff0000][B]<---- This line[/B][/COLOR]
X.8181 Y0. Z.02                 [COLOR=#ff0000][B]<---- And this line[/B][/COLOR]
G99 G83 Z-.5655 R.02 Q.05 F25.
X-.8181
G80
M9
G0 G17 G80 G90 M289

I want:
Code:
( NO. 38 DRILL T3  H3 )
G100 T3 G43 H3 M3 S4328 G54 M8 X.8181 Y0. Z.02 [COLOR=#ff0000][B] <---- Should be one line[/B][/COLOR]
G99 G83 Z-.5655 R.02 Q.05 F25.
X-.8181
G80
M9
G0 G17 G80 G90 M289

Post file attached as a zip file due to the forums crazy small file size restrictions. Any help? I'm sure I've been staring at the fix for hours.
 

Attachments

  • RFR BROTHER POST.zip
    24 KB · Views: 35
I don't know anything about post files but why is it so important this code is on the same line. It's going to execute the same right ? I hope I am not missing something.

Make Chips Boys !

Ron
 
I don't know anything about post files but why is it so important this code is on the same line. It's going to execute the same right ?
Brothers will execute all of the things on that line simultaneously, including rotate the pallet if so equipped. If on separate lines, the X and Y moves would not be executed during the tool change.
 
I dont think you are using the post you linked. The linked post does all moves in one line.
 
hello
you have M3 and M8 in same line
thought it was 1 M command per line
have a good 1
 
Hmmm, if I take your post and sub it into my generic haas mill config this is my output (after updating post to M2017)

( 3 CENTER DRILL T1 D1 H1 )
G100 T1 G43 H1 M8 M3 S1300 G54 X1.3 Y.75 Z5.
G98 G81 Z-.1 R.1 F3.5
G80
G0 G17 G80 G90 M289 M9




( 1/2 DRILL T2 D2 H2 )
G100 T2 G43 H2 M8 M3 S675 G54 X1.3 Y.75 Z5.
G98 G73 Z-.25 R.1 Q.1 F6.8
G80
G0 G17 G80 G90 M289 M9
 
Thanks Dodgin. I've yet to locate a post debugger (never used one before), and I should mention that I'm using Mastercam for Solidworks. I went through and edited (without actually changing anything) the machine and control definitions, then disabled and enabled Mastercam in Solidworks to see if things would kind of reboot and work like you are reporting, but no luck.

I really should update to 2018, but I have so much work to do that I can't afford the time to have any install issues or learning curves. But I'm betting updating would fix this.
 
Thanks Dodgin. I've yet to locate a post debugger (never used one before), and I should mention that I'm using Mastercam for Solidworks. I went through and edited (without actually changing anything) the machine and control definitions, then disabled and enabled Mastercam in Solidworks to see if things would kind of reboot and work like you are reporting, but no luck.

I really should update to 2018, but I have so much work to do that I can't afford the time to have any install issues or learning curves. But I'm betting updating would fix this.

Later on today when I have a few moments to spare I'll open up X9 and see what the post does there.

I'm not sure if Mastercam for SW is going to follow the same rules, but for X9 go Start Menu > Mastercam X9 > Advanced Configuration > Post debugger, drop down menu "enable". Then when you post your code, the post processing "menu" that should have a ladybug in the bottom left hand corner - click that and you're on your way. After that opens up it's pretty much self explanatory.

The pcan1 postblock is still kind of a mystery to me, personally, but my best guess is that there's something in your file/MD/CD that is causing it to break your line right where it is and run a new line from there to e$. Have you tried moving pcan1 so that is precedes the pbld in that same line? That's my best/only guess.

If you don't have any luck with it I'd make a thread in the post development section of emastercam.com. That place is chock full of geniuses.
 
X9 plug and play with your post yields code you're looking for:


( O0000 XXX )
G0 G17 G40 G49 G80 G90 G54



( 1/4 DRILL T1 D124 H1 )
G100 T1 G43 H1 M8 M3 S1451 G54 X-.8904 Y.3493 Z.1
G99 G83 Z-1. R.1 Q.1 F6.
G80
G0 G17 G80 G90 M289 M9
G0 G91 G28 Z0.
G90
M30
 
I'm not sure if Mastercam for SW is going to follow the same rules, but for X9 go Start Menu > Mastercam X9 > Advanced Configuration > Post debugger, drop down menu "enable".
For the record, this works as-is for MC4SW X9. The debugger didn't return any issues though.

dodgin said:
The pcan1 postblock is still kind of a mystery to me, personally, but my best guess is that there's something in your file/MD/CD that is causing it to break your line right where it is and run a new line from there to e$. Have you tried moving pcan1 so that is precedes the pbld in that same line?
Bingo! pcan1 is coolant, and it was in fact controlling the break in these lines. Moving it before pbld just moved the M8 to its own line, above the tool change. Moving it to the very end of the line fixed the two-line issue completely. I then brought the G43 stuff from the line above in to the toolchange line to get everything in the order I want, and it's perfect now.

If you don't have any luck with it I'd make a thread in the post development section of emastercam.com. That place is chock full of geniuses.[/QUOTE]

Try this. There was something funny looking on the toolchange lines
Thank you, but this changed nothing. I printed the before / after and everything was exactly the same between the two.

Thank you gentlemen. It will be refreshing to post a 100% correct program.
 

Attachments

  • RFR BROTHER.zip
    24 KB · Views: 19
Matt have you got this sorted out yet?

I would do the following.

this is your original tool change code

Code:
[COLOR=#0000FF]ptlchg$[/COLOR]          [COLOR=#008000]#Tool change 
[/COLOR]      pcuttype
      toolchng = one
      [COLOR=#0000FF]if[/COLOR] [COLOR=#0000FF]mi1$[/COLOR] = one, [COLOR=#008000]#Work coordinate system
[/COLOR]        [
        pfbld, [COLOR=#0000FF]n$[/COLOR], *sg28ref, [COLOR=#800000]"X0."[/COLOR], [COLOR=#800000]"Y0."[/COLOR], [COLOR=#0000FF]e$[/COLOR]
        pfbld, [COLOR=#0000FF]n$[/COLOR], sg92, *[COLOR=#0000FF]xh$[/COLOR], *[COLOR=#0000FF]yh$[/COLOR], *[COLOR=#0000FF]zh$[/COLOR], [COLOR=#0000FF]e$[/COLOR]
        ]
      [COLOR=#0000FF]if[/COLOR] prog_stop = 1, pbld, [COLOR=#0000FF]n$[/COLOR], *sm01, [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#0000FF]if[/COLOR] prog_stop = 2, pbld, [COLOR=#0000FF]n$[/COLOR], *sm00, [COLOR=#0000FF]e$[/COLOR]
      pcom_moveb
      pcheckaxis
      [COLOR=#0000FF]c_mmlt$[/COLOR] [COLOR=#008000]#Multiple tool subprogram call
[/COLOR]      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      ptoolcomment
      pcan
      result = [COLOR=#0000FF]newfs[/COLOR](15, feed)  [COLOR=#008000]#Reset the output format for 'feed'
[/COLOR]      sm06, *[COLOR=#0000FF]t$[/COLOR],
      pindex
      sav_absinc = [COLOR=#0000FF]absinc$[/COLOR]
      [COLOR=#0000FF]if[/COLOR] [COLOR=#0000FF]mi1$[/COLOR] > one, [COLOR=#0000FF]absinc$[/COLOR] = zero
      pbld, [COLOR=#0000FF]n$[/COLOR],
      [[COLOR=#0000FF]if[/COLOR] [COLOR=#0000FF]nextdc$[/COLOR] <> 7, *spindle, *speed, ],sg43, *[COLOR=#0000FF]tlngno$[/COLOR], scoolant, pstagetool, pgear, strcantext, pwcs, pfxout, pfyout, pfzout, pcan1, [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#0000FF]comment$[/COLOR]
      [COLOR=#0000FF]absinc$[/COLOR] = sav_absinc
      pbld, [COLOR=#0000FF]n$[/COLOR], sgabsinc, [COLOR=#0000FF]e$[/COLOR]
      pcom_movea
      toolchng = zero
      [COLOR=#0000FF]c_msng$[/COLOR] [COLOR=#008000]#Single tool subprogram call [/COLOR]      
      ![COLOR=#0000FF]xnci$[/COLOR], ![COLOR=#0000FF]ynci$[/COLOR], ![COLOR=#0000FF]znci$
[/COLOR]

As you haven't made any mention about a 4th axis and rotating that during the G100, we are going to put pindex after the g100 by moving all the other stuff up to the sm06 (g100) line, also remove the prestage tool from this line.

Code:
[COLOR=#0000FF]ptlchg$[/COLOR]          [COLOR=#008000]#Tool change 
[/COLOR]      pcuttype
      toolchng = one
      [COLOR=#0000FF]if[/COLOR] [COLOR=#0000FF]mi1$[/COLOR] = one, [COLOR=#008000]#Work coordinate system
[/COLOR]       [
        pfbld, [COLOR=#0000FF]n$[/COLOR], *sg28ref, [COLOR=#800000]"X0."[/COLOR], [COLOR=#800000]"Y0."[/COLOR], [COLOR=#0000FF]e$[/COLOR]
        pfbld, [COLOR=#0000FF]n$[/COLOR], sg92, *[COLOR=#0000FF]xh$[/COLOR], *[COLOR=#0000FF]yh$[/COLOR], *[COLOR=#0000FF]zh$[/COLOR], [COLOR=#0000FF]e$[/COLOR]
        ]
      [COLOR=#0000FF]if[/COLOR] prog_stop = 1, pbld, [COLOR=#0000FF]n$[/COLOR], *sm01, [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#0000FF]if[/COLOR] prog_stop = 2, pbld, [COLOR=#0000FF]n$[/COLOR], *sm00, [COLOR=#0000FF]e$[/COLOR]
      pcom_moveb
      pcheckaxis
      [COLOR=#0000FF]c_mmlt$[/COLOR] [COLOR=#008000]#Multiple tool subprogram call
[/COLOR]     [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      [COLOR=#800000]" "[/COLOR], [COLOR=#0000FF]e$[/COLOR]
      ptoolcomment
      pcan
      result = [COLOR=#0000FF]newfs[/COLOR](15, feed)  [COLOR=#008000]#Reset the output format for 'feed'
[/COLOR]      pbld, [COLOR=#0000FF]n$[/COLOR], sm06, *[COLOR=#0000FF]t$[/COLOR], sg43, *[COLOR=#0000FF]tlngno$[/COLOR], [[COLOR=#0000FF]if[/COLOR] [COLOR=#0000FF]nextdc$[/COLOR] <> 7, *spindle, *speed, ], scoolant, pgear, strcantext, pwcs, pfxout, pfyout, pfzout, pcan1, [COLOR=#0000FF]e$[/COLOR]
      pindex
      sav_absinc = [COLOR=#0000FF]absinc$[/COLOR]
      [COLOR=#0000FF]if[/COLOR] [COLOR=#0000FF]mi1$[/COLOR] > one, [COLOR=#0000FF]absinc$[/COLOR] = zero
      [COLOR=#0000FF]comment$[/COLOR]
      [COLOR=#0000FF]absinc$[/COLOR] = sav_absinc
      pbld, [COLOR=#0000FF]n$[/COLOR], sgabsinc, [COLOR=#0000FF]e$[/COLOR]
      pcom_movea
      toolchng = zero
      [COLOR=#0000FF]c_msng$[/COLOR] [COLOR=#008000]#Single tool subprogram call [/COLOR]     
      ![COLOR=#0000FF]xnci$[/COLOR], ![COLOR=#0000FF]ynci$[/COLOR], ![COLOR=#0000FF]znci$
[/COLOR]

Give that a shot and see what that does. I don't know the MPFAN post super good, but it is always best to start with a untouched stock post. I usually use the MPMaster4ax post from Inhouse. Let me know if you need a hand, be glad to help.
 








 
Back
Top