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:

Any way to verify wcs = tplane in post?


Recommended Posts

Our standard practice is to use the same WCS and Tplane for an entire nc program on our 3 axis mills. Sometimes we may accidentally make a toolpath on the wrong plane. I'd like to put something in the post to check the WCS for the very first operation, then verify that each operation's Tplane matches that WCS, and notify if it doesn't. This would just act as a safeguard to help prevent human error. My problem is not knowing how to access that info from the post, or if it is even possible. Does anyone know if this can be done?

Link to comment
Share on other sites

I wrote an alarm on that, this is how I did it.... I hope it is not too long but at least for you to figure out things, where to start.

# --------------------------------------------------------------------------
# Customed Misc strings
# --------------------------------------------------------------------------
sconstplname : ""      #20010 - Construction Plane Name
sconstplcomm : ""      #20011 - Construction Plane Comment
stoolplname : ""       #20012 - Tool Plane Name
stoolplcomm : ""       #20013 - Tool Plane Comment
swcsplname : ""        #20014 - WCS Plane Name
swcsplcomm : ""        #20015 - WCS Plane Comment
smatlname1 : ""        #20016 - Material Comment
smatlname2 : ""        #20017 - Material Comment
sMaterialComment : ""        #20017 - Material Comment
stpgrpname : ""        #20018 - Toolpath Group Name (name of operations Parent TP Group)


pparameter$ # Run parameter table
           if prmcode$ = 20007,
             [
             pilot_dia = rpar(sparameter$,11)
             oa_len_warn = rparsngl(sparameter$, 3) #Get 3rd parameter, oal
             metric_tl = rparsngl(sparameter$, 11) #Get 11th parameter
             LOH = rparsngl(sparameter$, 12) #Get 11th parameter
             ]
           if prmcode$ = 20010, sconstplname = (sparameter$)
           if prmcode$ = 20011, sconstplcomm = (sparameter$)
           if prmcode$ = 20012, stoolplname = (sparameter$)
           if prmcode$ = 20013, stoolplcomm = (sparameter$)
           if prmcode$ = 20014, swcsplname = (sparameter$)
           if prmcode$ = 20015, swcsplcomm = (sparameter$)
           if prmcode$ = 20016, smatlname1 = (sparameter$)
           if prmcode$ = 20017, sMaterialComment = (sparameter$)
           if prmcode$ = 20018, stpgrpname = (sparameter$)

pcuttype   #Determine the cut type
      #cuttype (0 = Tool Plane, 1 = Axis Subs,  2 = Polar, 3 = 4/5 axis)
      cuttype = rotary_type$
      if cuttype = three, cuttype = zero
      if mill5$,
        [
        if rot_on_x = zero, result = mprint(saxisoff)
        cuttype = three
        ]
      if vmc & m1$ <> 1 & rot_on_x = 1, #if rotary about the X axis and plane X isn't the same direction as machine X
        [
        result = mprint(sxaxiswarn,2)
        if result = 2, exitpost$
        ]
      if vmc & m5$ <> 1 & rot_on_x = 2, #if rotary about the Y axis and plane Y isn't the same direction as machine Y
        [
        result = mprint(syaxiswarn,2)
        if result = 2, exitpost$
        ]
      if not(vmc) & m6$ <> 1, #if rotary about the Y axis and plane Y isn't the same direction as machine Y
        [
        result = mprint(szaxiswarn,2)
        if result = 2, exitpost$
        ]
      if rot_type <> 1, use_rotmcode = 0                 #Use indexing M code only for signed direction.        
      #Check for Tool Origin in Polar Milling
      if cuttype = two & (tox$ | toy$ | toz$), result = mprint(stlorgerr)
      #Transform Rotate, set mr_rt_actv if user selected 'coordinates' 
      if sub_trnstyp$ = one & sub_trnmthd$ = two,
        [
        #Calculate the rotation incremental angle for G68
        rt_csav = atan2(sub_m2$, sub_m1$)
        rt_cinc = prv_rt_csav - rt_csav
        while rt_cinc > 180, rt_cinc = rt_cinc - 360
        while rt_cinc < -180, rt_cinc = rt_cinc + 360
        if not(rot_cw_pos), rt_cinc = -rt_cinc
        !rt_csav
        if sub_sec_no$, mr_rt_actv = two
        else, mr_rt_actv = one
        ]
      else, mr_rt_actv = zero
      pfcalc_u_min
      pmotion_su

 

#Region sxaxiswarn
sxaxiswarn = "CUT#"+sToolPathNumber+" * Wrong X-Axis along"
             +no2asc(13)+"TOOL#"+no2str(t$)+" ("+s20001+")"
             +no2asc(13)
             +no2asc(13)+"Feed Rate: "+no2str(feed)+ " ***** #Teeth x Chip Load x RPM"
             +no2asc(13)+"Plunge Rate: "+no2str(plunge)
             +no2asc(13)+"RPM: "+no2str(speed)+" ***** (SFM x 3.82) / Tool Dia"
             +no2asc(13)+"SFM: "+no2str(sfm)+" ***** .26 x RPM x Tool Dia"
             +no2asc(13)+"ChipLoad: "+no2str(fpt)+" ***** Feed Rate (RPM x Flutes)"
             +no2asc(13)
             +no2asc(13)+"If you feel there is a mistake, do these following steps:"
             +no2asc(13)+"Step 1 = Click on PARAMETERS"
             +no2asc(13)+"Step 2 = go to WCS Plane page and look for WORK CORDINATE SYSTEM"
             +no2asc(13)+"Step 3 = Click on SELECT PLANE and choose the right XYZ"
             +no2asc(13)+"Step 4 = OR go to TOOL PLANE"
             +no2asc(13)
             +no2asc(13)+"                                               OK to proceed posting."
             +no2asc(13)+"                                               CANCEL to abort posting."
#EndRegion

#Region syaxiswarn
syaxiswarn  = "CUT#"+sToolPathNumber+" * Wrong Y-Axis along"
              +no2asc(13)+"TOOL#"+no2str(t$)+" ("+s20001+")"
              +no2asc(13)
              +no2asc(13)+"Feed Rate: "+no2str(feed)+ " ***** #Teeth x Chip Load x RPM"
              +no2asc(13)+"Plunge Rate: "+no2str(plunge)
              +no2asc(13)+"RPM: "+no2str(speed)+" ***** (SFM x 3.82) / Tool Dia"
              +no2asc(13)+"SFM: "+no2str(sfm)+" ***** .26 x RPM x Tool Dia"
              +no2asc(13)+"ChipLoad: "+no2str(fpt)+" ***** Feed Rate (RPM x Flutes)"
              +no2asc(13)
              +no2asc(13)+"If you feel there is a mistake, do these following steps:"
              +no2asc(13)+"Step 1 = Click on PARAMETERS"
              +no2asc(13)+"Step 2 = go to WCS Plane page and look for WORK CORDINATE SYSTEM"
              +no2asc(13)+"Step 3 = Click on SELECT PLANE and choose the right XYZ"
              +no2asc(13)+"Step 4 = OR go to TOOL PLANE"
              +no2asc(13)
              +no2asc(13)+"                                               OK to proceed posting."
              +no2asc(13)+"                                               CANCEL to abort posting."
#EndRegion

#Region szaxiswarn
szaxiswarn  = "CUT#"+sToolPathNumber+" * Wrong Z-Axis along"
              +no2asc(13)+"TOOL#"+no2str(t$)+" ("+s20001+")"
              +no2asc(13)
              +no2asc(13)+"Feed Rate: "+no2str(feed)+ " ***** #Teeth x Chip Load x RPM"
              +no2asc(13)+"Plunge Rate: "+no2str(plunge)
              +no2asc(13)+"RPM: "+no2str(speed)+" ***** (SFM x 3.82) / Tool Dia"
              +no2asc(13)+"SFM: "+no2str(sfm)+" ***** .26 x RPM x Tool Dia"
              +no2asc(13)+"ChipLoad: "+no2str(fpt)+" ***** Feed Rate (RPM x Flutes)"
              +no2asc(13)
              +no2asc(13)+"If you feel there is a mistake, do these following steps:"
              +no2asc(13)+"Step 1 = Click on PARAMETERS"
              +no2asc(13)+"Step 2 = go to WCS Plane page and look for WORK CORDINATE SYSTEM"
              +no2asc(13)+"Step 3 = Click on SELECT PLANE and choose the right XYZ"
              +no2asc(13)+"Step 4 = OR go to TOOL PLANE"
              +no2asc(13)
              +no2asc(13)+"                                               OK to proceed posting."
              +no2asc(13)+"                                               CANCEL to abort posting."
#EndRegion

Link to comment
Share on other sites

Try this. I added some logic to MPMaster to compare the WCS ID (number) and Tplane ID. There is also a check to make sure you didn't switch WCS Planes from the one you started with. So if you change WCS Planes, or your WCS and Tplane "views" don't match, then you'll get an error message, and MP will exit the Post. It even tells you which Operation is the offending Operation, so you can go fix it...

https://www.dropbox.com/s/6atovce3sckssym/WCS_TPLANE_CHECK.ZIP?dl=0

Hope that helps,

Colin

  • Like 1
Link to comment
Share on other sites
8 hours ago, mkd said:

would be nice if we could color code WCSs where the differing colors would show up in operation manager.

 

 

 

 

check at a glance..........

Colourise has been on the enhancement request list for a L    O    N   G   time. It would be a HUGE help in double checking the wood for the trees.

Link to comment
Share on other sites
On ‎30‎/‎10‎/‎2017 at 1:13 AM, Eric Rawls said:

Our standard practice is to use the same WCS and Tplane for an entire nc program on our 3 axis mills. Sometimes we may accidentally make a toolpath on the wrong plane. I'd like to put something in the post to check the WCS for the very first operation, then verify that each operation's Tplane matches that WCS, and notify if it doesn't. This would just act as a safeguard to help prevent human error. My problem is not knowing how to access that info from the post, or if it is even possible. Does anyone know if this can be done?

Eric,

Not trying to teach you to suck eggs, but I would look at other ways to do this ie use a separate WCS for each separate setup.

1st WCS = hold in vice machine blah blah

2nd WCS = flip and finish underside.

Once you get your head around this in mastercam it all becomes a lot easier because you can verify complete and then when you move to 4th axis it's easy to get your head around.

:cheers:

Link to comment
Share on other sites

Here is how I did it.

First, define some variables:

 
sop_num : "" #OPCOM STRING

fmt "Operation Number: " 4 op_num #Operation number from Ops Manager

tplane_on      : 0
tplane_or_id      : 0
tplane_xx      : 0
tplane_xy      : 0
tplane_xz      : 0
tplane_yx      : 0
tplane_yy      : 0
tplane_yz      : 0
tplane_zx      : 0
tplane_zy      : 0
tplane_zz      : 0
tplane_xo      : 0
tplane_yo      : 0
tplane_zo      : 0
tplane_id      : 0
tplane_wo      : 0

wcs_on      : 0
wcs_or_id      : 0
wcs_xx      : 0
wcs_xy      : 0
wcs_xz      : 0
wcs_yx      : 0
wcs_yy      : 0
wcs_yz      : 0
wcs_zx      : 0
wcs_zy      : 0
wcs_zz      : 0
wcs_xo      : 0
wcs_yo      : 0
wcs_zo      : 0
wcs_id      : 0
wcs_wo      : 0

Add some logic to 'pparameter$' to "get the data" you need, at each Operation's tool change.

           if prmcode$ = 15348, tplane_id = rpar(sparameter$, 1) #Get tplane ID
           if prmcode$ = 15369, wcs_id = rpar(sparameter$, 1) #Get wcs ID

 

Optionally, if you want to get "all ", then capture using a Parameter Table:

#Toolpath Parameters (15000 series)
fprmtbl 4 32  #Table Number, Size
      15152    tplane_on
      15153    tplane_or_id
      15154    tplane_xx
      15155    tplane_xy
      15156    tplane_xz
      15157    tplane_yx
      15158    tplane_yy
      15159    tplane_yz
      15160    tplane_zx
      15161    tplane_zy
      15162    tplane_zz
      15163    tplane_xo
      15164    tplane_yo
      15165    tplane_zo
      15348    tplane_id
      15166    tplane_wo

      15355    wcs_on
      15356    wcs_or_id
      15357    wcs_xx
      15358    wcs_xy
      15359    wcs_xz
      15360    wcs_yx
      15361    wcs_yy
      15362    wcs_yz
      15363    wcs_zx
      15364    wcs_zy
      15365    wcs_zz
      15366    wcs_xo
      15367    wcs_yo
      15368    wcs_zo
      15369    wcs_id
      15370    wcs_wo

Inside of 'pparameter$', call the function to "set the data for all the variables in the table":

           if prmcode$ >= 15000 & prmcode$ <= 15400, result = fprm(15000)

Next, initialize a "switch" variable at the top of your post. (Allows you to turn on/off easily):

# --------------------------------------------------------------------------
# General Output Settings
# --------------------------------------------------------------------------
force_debug : no$  #Force debugging comments? 

Now, add this in 'ptlchg_com':

ptlchg_com      #Tool change common blocks
      #rd_mch_ent_no$ = m_one #Set option to read "all" parameters
      #rd_params$
      if force_debug, "DEBUG: ", ~wcs_id, ~tplane_id, e$
      if wcs_id <> tplane_id | wcs_id <> prv_wcs_id,
        [
        sop_num = drs_str(2, op_num)
        if wcs_id <> prv_wcs_id,
          [
          serrormsg = "YOUR WCS ID" + no2asc(10) + no2asc(13)
                      + "DOES NOT MATCH" + no2asc(10) + no2asc(13)
                      + "YOUR PREVIOUS WCS ID. <<<< THIS IS A PROBLEM!" + no2asc(10) + no2asc(13)
                      + "THE ISSUE IS IN " + sop_num + no2asc(10) + no2asc(13)
                      + "THE POST WILL NOW EXIT. HAVE A NICE DAY."
          ]
        else,
          [
          serrormsg = "YOUR WCS ID" + no2asc(10) + no2asc(13)
                      + "DOES NOT MATCH" + no2asc(10) + no2asc(13)
                      + "YOUR TPLANE ID. <<<< THIS IS A PROBLEM!" + no2asc(10) + no2asc(13)
                      + "THE ISSUE IS IN " + sop_num + no2asc(10) + no2asc(13)
                      + "THE POST WILL NOW EXIT. HAVE A NICE DAY."
          ]
        result = mprint(serrormsg)
        "DEBUG: ", ~wcs_id, ~tplane_id, e$
        n$, "POSTING HAS BEEN ABORTED. CHECK ", sop_num, e$
        exitpost$
        ]

Add a line of code in 'psof$' before the call to 'ptlchg_com':

psof$            #Start of file for non-zero tool number
      probe_head$
      ptravel
      pwritbuf5
      pcuttype
      toolchng = one
      if ntools$ = one,
        [
        #skip single tool outputs, stagetool must be on
        #stagetool = m_one
        !next_tool$
        ]
      tooltotal = rbuf(4,0)  #Reads total tool and null tool changes
      if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)
      else, nexttool = first_tool$

      if tool_table = 2, ppredstck
      if tool_table = 3, pmetastck

      spaces$=0
      if output_z = yes$ & tcnt > 1,
        [
        scomm_str, "OVERALL MAX - ", *z_tmax, scomm_end, e$
        scomm_str, "OVERALL MIN - ", *z_tmin, scomm_end, e$
        ]
      spaces$=sav_spc

      if plane$ < 0 | opcode$ = 3 | opcode$ = 16, plane$ = 0
      pbld, n$, *sgcode, *sgplane, *smetric, "G40", "G80", *sgabsinc, e$
      inhibit_probe$
      sav_absinc = absinc$
      absinc$ = one
      if wcstype <= one, #Work coordinate system
        [
        pfbld, n$, sgabsinc, *sg28, "Z0.", e$
        pfbld, n$, *sg28, "X0.", "Y0.", e$
        pfbld, n$, "G92", *xh$, *yh$, *zh$, e$
        ]
      else,
        [
        pbld, n$, sgabsinc, *sg28, "Z0.", e$
        ]
      absinc$ = sav_absinc
      sav_mi9 = mi9$
      sav_workofs = workofs$
      if sav_workofs < 0, sav_workofs = 0
      !wcs_id, !tplane_id #Update wcs/tplane id's for comparison to prv_
      ptlchg_com
      sof = 0

 

  • Like 2
Link to comment
Share on other sites
54 minutes ago, Colin Gilchrist said:

Here is how I did it.

First, define some variables:



 

sop_num : "" #OPCOM STRING

fmt "Operation Number: " 4 op_num #Operation number from Ops Manager

tplane_on      : 0
tplane_or_id      : 0
tplane_xx      : 0
tplane_xy      : 0
tplane_xz      : 0
tplane_yx      : 0
tplane_yy      : 0
tplane_yz      : 0
tplane_zx      : 0
tplane_zy      : 0
tplane_zz      : 0
tplane_xo      : 0
tplane_yo      : 0
tplane_zo      : 0
tplane_id      : 0
tplane_wo      : 0

wcs_on      : 0
wcs_or_id      : 0
wcs_xx      : 0
wcs_xy      : 0
wcs_xz      : 0
wcs_yx      : 0
wcs_yy      : 0
wcs_yz      : 0
wcs_zx      : 0
wcs_zy      : 0
wcs_zz      : 0
wcs_xo      : 0
wcs_yo      : 0
wcs_zo      : 0
wcs_id      : 0
wcs_wo      : 0

Add some logic to 'pparameter$' to "get the data" you need, at each Operation's tool change.


           if prmcode$ = 15348, tplane_id = rpar(sparameter$, 1) #Get tplane ID
           if prmcode$ = 15369, wcs_id = rpar(sparameter$, 1) #Get wcs ID

 

Optionally, if you want to get "all ", then capture using a Parameter Table:


#Toolpath Parameters (15000 series)
fprmtbl 4 32  #Table Number, Size
      15152    tplane_on
      15153    tplane_or_id
      15154    tplane_xx
      15155    tplane_xy
      15156    tplane_xz
      15157    tplane_yx
      15158    tplane_yy
      15159    tplane_yz
      15160    tplane_zx
      15161    tplane_zy
      15162    tplane_zz
      15163    tplane_xo
      15164    tplane_yo
      15165    tplane_zo
      15348    tplane_id
      15166    tplane_wo

      15355    wcs_on
      15356    wcs_or_id
      15357    wcs_xx
      15358    wcs_xy
      15359    wcs_xz
      15360    wcs_yx
      15361    wcs_yy
      15362    wcs_yz
      15363    wcs_zx
      15364    wcs_zy
      15365    wcs_zz
      15366    wcs_xo
      15367    wcs_yo
      15368    wcs_zo
      15369    wcs_id
      15370    wcs_wo

Inside of 'pparameter$', call the function to "set the data for all the variables in the table":


           if prmcode$ >= 15000 & prmcode$ <= 15400, result = fprm(15000)

Next, initialize a "switch" variable at the top of your post. (Allows you to turn on/off easily):


# --------------------------------------------------------------------------
# General Output Settings
# --------------------------------------------------------------------------
force_debug : no$  #Force debugging comments? 

Now, add this in 'ptlchg_com':


ptlchg_com      #Tool change common blocks
      #rd_mch_ent_no$ = m_one #Set option to read "all" parameters
      #rd_params$
      if force_debug, "DEBUG: ", ~wcs_id, ~tplane_id, e$
      if wcs_id <> tplane_id | wcs_id <> prv_wcs_id,
        [
        sop_num = drs_str(2, op_num)
        if wcs_id <> prv_wcs_id,
          [
          serrormsg = "YOUR WCS ID" + no2asc(10) + no2asc(13)
                      + "DOES NOT MATCH" + no2asc(10) + no2asc(13)
                      + "YOUR PREVIOUS WCS ID. <<<< THIS IS A PROBLEM!" + no2asc(10) + no2asc(13)
                      + "THE ISSUE IS IN " + sop_num + no2asc(10) + no2asc(13)
                      + "THE POST WILL NOW EXIT. HAVE A NICE DAY."
          ]
        else,
          [
          serrormsg = "YOUR WCS ID" + no2asc(10) + no2asc(13)
                      + "DOES NOT MATCH" + no2asc(10) + no2asc(13)
                      + "YOUR TPLANE ID. <<<< THIS IS A PROBLEM!" + no2asc(10) + no2asc(13)
                      + "THE ISSUE IS IN " + sop_num + no2asc(10) + no2asc(13)
                      + "THE POST WILL NOW EXIT. HAVE A NICE DAY."
          ]
        result = mprint(serrormsg)
        "DEBUG: ", ~wcs_id, ~tplane_id, e$
        n$, "POSTING HAS BEEN ABORTED. CHECK ", sop_num, e$
        exitpost$
        ]

Add a line of code in 'psof$' before the call to 'ptlchg_com':


psof$            #Start of file for non-zero tool number
      probe_head$
      ptravel
      pwritbuf5
      pcuttype
      toolchng = one
      if ntools$ = one,
        [
        #skip single tool outputs, stagetool must be on
        #stagetool = m_one
        !next_tool$
        ]
      tooltotal = rbuf(4,0)  #Reads total tool and null tool changes
      if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)
      else, nexttool = first_tool$

      if tool_table = 2, ppredstck
      if tool_table = 3, pmetastck

      spaces$=0
      if output_z = yes$ & tcnt > 1,
        [
        scomm_str, "OVERALL MAX - ", *z_tmax, scomm_end, e$
        scomm_str, "OVERALL MIN - ", *z_tmin, scomm_end, e$
        ]
      spaces$=sav_spc

      if plane$ < 0 | opcode$ = 3 | opcode$ = 16, plane$ = 0
      pbld, n$, *sgcode, *sgplane, *smetric, "G40", "G80", *sgabsinc, e$
      inhibit_probe$
      sav_absinc = absinc$
      absinc$ = one
      if wcstype <= one, #Work coordinate system
        [
        pfbld, n$, sgabsinc, *sg28, "Z0.", e$
        pfbld, n$, *sg28, "X0.", "Y0.", e$
        pfbld, n$, "G92", *xh$, *yh$, *zh$, e$
        ]
      else,
        [
        pbld, n$, sgabsinc, *sg28, "Z0.", e$
        ]
      absinc$ = sav_absinc
      sav_mi9 = mi9$
      sav_workofs = workofs$
      if sav_workofs < 0, sav_workofs = 0
      !wcs_id, !tplane_id #Update wcs/tplane id's for comparison to prv_
      ptlchg_com
      sof = 0

 

Hi Colin,
   Speaking of WCS plane, I see there are 3 different G-Codes for plane.  G17 (XY), G18(XZ), G19(YZ) in MILLING and how do I use them in MATERCAM?  I think G18 & G19 are sort of 3D? (Please correct if I am wrong).  Is there a tutorial video how to use G18 & G19 on YouTube?  I tried to search for "How to use G18 - G19" in YouTube but I didn't have any luck, would you please explain us how to use it or guide us to a PDF file somewhere that you already know on the web that teaching us how to use it?


Thanks,
   S.Luong

Link to comment
Share on other sites
3 hours ago, PcRobotic said:

Hi Colin,
   Speaking of WCS plane, I see there are 3 different G-Codes for plane.  G17 (XY), G18(XZ), G19(YZ) in MILLING and how do I use them in MATERCAM?  I think G18 & G19 are sort of 3D? (Please correct if I am wrong).  Is there a tutorial video how to use G18 & G19 on YouTube?  I tried to search for "How to use G18 - G19" in YouTube but I didn't have any luck, would you please explain us how to use it or guide us to a PDF file somewhere that you already know on the web that teaching us how to use it?


Thanks,
   S.Luong

G18 and G19 are for your IJK or R output control ins some instances. If you are machining in the X-Yplane then you use the G17. If you are machining in the X-Z Plane then you will use G18. If you are machining in the Y-Z Plane then you will use G19. These are the basic's of CNC programming and the difference between 2D programming and 3D programming, but are not normally needed when using R values, but are needed when using IJK. When I did pencil land paper programming 30 years ago I worried about G18 and G19 daily, but I have not really had any issues with them in the last 20 years.

What is your question and how does it relate to this topic? Planes in Mastercam have nothing to do with G18 and G19 If you set a WCS for each face, but they if you have a 5 Axis machine and go to the front face to start doing work. Then that will become a G18 Face and then if you go to the Right that will become a G19 Plane. or is it vice versa. Unless you are going to be programming by hand Mastercam has only given me issues with G18 and G19 on Mill/Turns. For5 Axis I have not had issue with G18 and G19 output so trying to wrap my brain around what your asking and needing with your question.

Link to comment
Share on other sites
On ‎11‎/‎6‎/‎2017 at 9:11 AM, C^Millman said:

G18 and G19 are for your IJK or R output control ins some instances. If you are machining in the X-Yplane then you use the G17. If you are machining in the X-Z Plane then you will use G18. If you are machining in the Y-Z Plane then you will use G19. These are the basic's of CNC programming and the difference between 2D programming and 3D programming, but are not normally needed when using R values, but are needed when using IJK. When I did pencil land paper programming 30 years ago I worried about G18 and G19 daily, but I have not really had any issues with them in the last 20 years.

What is your question and how does it relate to this topic? Planes in Mastercam have nothing to do with G18 and G19 If you set a WCS for each face, but they if you have a 5 Axis machine and go to the front face to start doing work. Then that will become a G18 Face and then if you go to the Right that will become a G19 Plane. or is it vice versa. Unless you are going to be programming by hand Mastercam has only given me issues with G18 and G19 on Mill/Turns. For5 Axis I have not had issue with G18 and G19 output so trying to wrap my brain around what your asking and needing with your question.

I meant, how to I use MASTERCAM in the WCS to make it spits out G18, G19?  I already know what those G17, G18, G19 means, I just don't know how to use MASTERCAM to make it spits out for me at the WCS.

 

Thank you.

Link to comment
Share on other sites
2 hours ago, PcRobotic said:

I meant, how to I use MASTERCAM in the WCS to make it spits out G18, G19?  I already know what those G17, G18, G19 means, I just don't know how to use MASTERCAM to make it spits out for me at the WCS.

 

Thank you.

What issues are you running into that is not giving you correct output? Like I said never had a problem with this output when doing Mill work. Got a sample file showing the error you keep running into when doing it and not getting correct out?

Link to comment
Share on other sites

The Arc Planes aren't tied to the WCS Steven, nor should it be. The Arc Planes are tied to the Geometry you are driving, and how that geometry is oriented, relative to the WCS/Cplane/Tplane setup.

You get G18 or G19 output, when you cut a G18 or G19 Arc, or that motion is produced "in the toolpath", by the Arc Filter.

The view your "Spindle" is in, should always output G17 for XY motion.

If you want to drive an entire Contour (all lines and arcs), and remain in a specific Plane, all you should have to do is set your Construction Plane to be perpendicular to your Tool Plane. (Top WCS, Right C-Plane, Top T-Plane), or (Top WCS, Front C-Plane, Top T-Plane)

This isn't a "Post" issue at all. The Post is already setup to handle this properly, unless you broke something.

If you are in doubt, just use an unmolested (un-edited) copy of MPMaster, to check and see how Mastercam outputs code, by default.

The only time, I have ever wanted "G18 or G19" output, at the start of a Tool, is the case when I'm driving a Right Angle Head. If you are not driving a Right Angle Head, then all you really need is "geometry" that lies in the proper plane (XZ or YZ), and the NCI Data will be properly formatted by Mastercam to output G19 or G18 planes, and the G02/G03 with either XZIK, or YZJK. Normally, this is handled by the Tool Path giving you all Linear (G01) motion in G17 Plane, and the Post will automatically switch to G19/G18 output, based on the format of the Arc motion, in the NCI data. There is absolutely nothing wrong with having G17, G18, and G19 Arcs in the same tool path. The Post will handle switching between the different output modes flawlessly.

This isn't a "Post" issue at all. You just need to understand how Mastercam is built, and how to setup your geometry properly, and you'll get G18 and G19 codes, with properly formatted Arcs. This has to do with how the tool path data is formatted in the NCI.

 

 

 

  • Like 1
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...