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:

Need to post a M15 or M16 before B move


Recommended Posts

Hello,

 

 

I need to have the post put a M15 before the B+ axis rotation and a M16 before a B- rotation.. I working with a MPmaster post.. Is this something I can change in the machine or control file or is it a post add on? It is for a Okuma horizontal MC-50H with X6...

 

 

I need it to post like this

 

 

N150 G00 G17 G20 G40 G80 G90

N160 G91

N170 (MILLS THE RIGHT SIDE 35 DEG WELD PREP WITH 4.0" FACEMILL)

N180 (COMPENSATION TYPE - WEAR COMP)

N190 IF [VATOL EQ 19] N210 (SPINDLE TOOL CHECK)

N200 T19 M6

N210 S500 M03 (SPINDLE TOOL JUMP)

N220 M08

N230 (MAX - Z6.6924)

N240 (MIN - Z6.4874)

N245 M15 <-------------------------------------------------------------------------------- Need M15 for positive B rotation here --------------------------------------------------------->

N250 G00 G17 G90 G15 H1 B55. X-2.0614 Y7.375 S500 M03

N260 G56 H19 Z6.6924

N270 G94 G01 G41 D19 Y9.5 F10.

N280 Y17.533

N290 G40 Y19.658

N300 G00 X-2.198 Y7.375

N310 Z6.4974

N320 G01 G41 D19 Y9.5

N330 Y17.533

N340 G40 Y19.658

N350 G00 X-2.205 Y7.375

N360 Z6.4874

N370 G01 G41 D19 Y9.5

N380 Y17.533

N390 G40 Y19.658

N400 G91 G00 G30 P2.0

N410 (MILLS THE LEFT SIDE 35 DEG WELD PREP WITH 4.0" FACEMILL)

N415 M16 <------------------------------------------------------------------------------------------------------------Need M16 for negative B rotation here ------------------------------------------------------>

N420 G00 G90 B-55. X2.0614 Y19.658

N430 G56 H19 Z6.6924

 

 

Thanks

Link to comment
Share on other sites

First sace a copy of your post, then try Inserting the following on a line before the B move in the post at (ptlchg_com) section and (ptlchg0$) section.

 

(Example) Note:The B move is pfcout

if cabs < 0, "M16 (B CCW)", e$,

if cabs > 0, "M17 (B CW)", e$

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfcout, scoolant, e$

Link to comment
Share on other sites

First sace a copy of your post, then try Inserting the following on a line before the B move in the post at (ptlchg_com) section and (ptlchg0$) section.

 

(Example) Note:The B move is pfcout

if cabs < 0, "M16 (B CCW)", e$,

if cabs > 0, "M17 (B CW)", e$

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfcout, scoolant, e$

 

Great thanks I will try that tomorrow...

Link to comment
Share on other sites

Talk to Inhouse (or I guess more importantly, your reseller) about their MPMaster Okuma post. That has all the M15/M16 logic built in to it.

 

Thanks... I tried to convice these guys to buy a post for it but they refuse to pay so I am stuck trying to make my own post or use Espirt which has a post already for there old Okuma machine. And I don't really want to use Esprit.. Also this forum is great for learning about post processors it has been a great help...

 

 

Thanks

Link to comment
Share on other sites

First sace a copy of your post, then try Inserting the following on a line before the B move in the post at (ptlchg_com) section and (ptlchg0$) section.

 

(Example) Note:The B move is pfcout

if cabs < 0, "M16 (B CCW)", e$,

if cabs > 0, "M17 (B CW)", e$

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfcout, scoolant, e$

 

I tried it but it doesn't seam to change anything.. I don't see any M16 or M17 on the code.. I started with aMPmaster post with X6

 

Here is where I changed the post at

 

 

 

ptlchg_com #Tool change common blocks

if force_output | sof,

[

result = force(ipr_type,ipr_type)

result = force(absinc$,absinc$)

result = force(plane$,plane$)

]

pcom_moveb

pcheckaxis #Check for valid rotary axis

c_mmlt$ #Multiple tool subprogram call

#ptoolcomment

if sof & scomm_sav <> snull,

[

spaces$ = 0

n$, pspc, scomm_str, *scomm_sav, scomm_end, e$

spaces$ = sav_spc

]

if sof = 0, scomm_sav = snull

comment$

pcomment3

pmisccheck

pcan

if stagetool >= zero,

[

spaces$=0

okuma_skip_toolnumber = t$

pbld, n$, " IF [VATOL EQ ", *okuma_skip_toolnumber,"] ",

n$ = n$ + seqinc$,

n$ = n$ + seqinc$,

*n$, " (SPINDLE TOOL CHECK)", e$

spaces$=sav_spc

n$ = n$ - seqinc$

n$ = n$ - seqinc$

pbld, n$, *t$, "M6", e$

pbld, *n$,[if nextdc$ <> 7, *speed, *spindle], pgear, strcantext, "(SPINDLE TOOL JUMP)", e$

n$, *scoolantx, e$

 

]

spaces$=0

if output_z = yes$,

[

preadbuf5

if (opcode$ > 0 & opcode$ < 16) | opcode$ = 19,

[

n$, pspc, scomm_str, "MAX - ", *max_depth, scomm_end, e$

n$, pspc, scomm_str, "MIN - ", *min_depth, scomm_end, e$

]

]

spaces$=sav_spc

pstock

if plane$ < 0 | opcode$ = 3 | opcode$ = 16, plane$ = 0

sav_absinc = absinc$

if wcstype > one, absinc$ = zero

pindex

if safe_index,

[

if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$

pbld, n$, pgear, e$

if cabs < 0, "M16 (B CCW)", e$, <--------------------------------------------------------------------------------------------- Added these two lines here ----------------------------->

if cabs > 0, "M17 (B CW)", e$

pcan1, pbld, n$, *sgcode, sgplane, [if not(index), sgabsinc, pwcs], pfcout, strcantext, e$

if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$

if convert_rpd$ = one,

[

gcode$ = one

feed = maxfeedpm

ipr_type = zero

]

pbld, n$, sgcode, [if gcode$ = 1, sgfeed], pfxout, pfyout, pfspindleout, [if gcode$ = 1, *feed], e$

]

else,

 

 

Also added it here

 

 

ptlchg0$ #Call from NCI null tool change (tool number repeats)

toolchng0 = one

if op_id$ <> last_op_id,

[

rd_params$ # Read parameters - pparameter

pmisccheck

]

pcuttype

toolcount = toolcount + 1

if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)

else, nexttool = first_tool$

retractflg = 0

if (mi10$ & (op_id$ <> last_op_id | (op_id$ = last_op_id & xform_op_id$ <> op_id$)))

| ((tlplnno$ <> last_tlplnno | rotary_type$ <> last_rotary_type) & ret_on_indx),

[

phsm_off

if mi10$,

[

pretract

n$, *sm00, e$

result = force(spdir2,spdir2) #Force spindle output after M00

result = force(speed,speed) #Force speed output after M00

]

else, pretract0

retractflg = 1

]

else,

[

if mr1$ <> last_mr1 | mr2$ <> last_mr2, phsm_off

]

pcom_moveb

pcheckaxis #Check for valid rotary axis

c_mmlt$ #Multiple tool subprogram call

comment$

pcomment3

pcan

if plane$ < 0 | opcode$ = 3 | opcode$ = 16, plane$ = 0

if op_id$ <> last_op_id, pbld, n$, sgplane, e$

pspindchng

if coolant$ <> 0 & coolant$ <> sav_coolant & sav_coolant, pbld, n$, sm09, e$

pbld, n$, scoolant, e$

sav_coolant = coolant$

if coolant$ = 1, sm09 = sm09_0

if coolant$ = 2, sm09 = sm09_1

if coolant$ = 3, sm09 = sm09_2

if op_id$ <> last_op_id, pstock

if sav_mi9 = 1, workofs$ = sav_workofs

if (wcstype > one & workofs$ <> prv_workofs$) | (tlplnno$ <> last_tlplnno) | retractflg,

[

if convert_rpd$ = one,

[

gcode$ = one

feed = maxfeedpm

ipr_type = zero

]

sav_absinc = absinc$

absinc$ = zero

pindex

if retractflg,

[

if safe_index,

[

if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$

pbld, n$, pgear, e$

if cabs < 0, "M16 (B CCW)", e$, <----------------------------------------------------------------------------------------- Added these two lines here --------------------------------------->

if cabs > 0, "M17 (B CW)", e$

pbld, n$, *sgcode, [if not(index), sgabsinc, pwcs], pfcout, pspindleout, e$

if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$

pbld, n$, pfxout, pfyout, e$

]

else,

[

if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$

pbld, n$, pgear, e$

Link to comment
Share on other sites

Ok I was looking at a old post. Remove the if cabs < 0, "M16 (B CCW)", e$ and if cabs > 0, "M17 (B CW)", e$ stuff from the post. Then change the use_rotmcode : 0 to a 1 and search for (sindx_cw) and change M22 and M21 to M17 and M16 this should work.

 

 

use_rotmcode : 0 #Output M-Code for Axis direction (sindx_mc)

#0 = Signed direction (only valid when rot_type = 1)

#1 = M-Code for direction

 

sindx_cw : "M22" #Rotate CW code -----------------------Change to "M17"

sindx_ccw : "M21" #Rotate CCW code --------------------Change to "M16"

Link to comment
Share on other sites

Ok I was looking at a old post. Remove the if cabs < 0, "M16 (B CCW)", e$ and if cabs > 0, "M17 (B CW)", e$ stuff from the post. Then change the use_rotmcode : 0 to a 1 and search for (sindx_cw) and change M22 and M21 to M17 and M16 this should work.

 

 

use_rotmcode : 0 #Output M-Code for Axis direction (sindx_mc)

#0 = Signed direction (only valid when rot_type = 1)

#1 = M-Code for direction

 

sindx_cw : "M22" #Rotate CW code -----------------------Change to "M17"

sindx_ccw : "M21" #Rotate CCW code --------------------Change to "M16"

 

 

I tried this and it still doesn't post any M code any where. I even tried it on a un-edited Mpmaster post and it doesn't post either.. It is controlled in the machine def or control somewhere?

 

Thanks

Link to comment
Share on other sites

The only thing I see is to change this in your post to a 1 because it says the M16 and M17 is (only valid when rot_type = 1)

 

rot_type : 0 #Rotary type - 0=signed continuous, 1=signed absolute, 2=shortest direction

 

Thanks... That worked but only if I have signed direction absolute checked in the machine definition manager...

 

 

Thanks

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