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:

mustardcam

Verified Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by mustardcam

  1. 13 hours ago, Zaffin_D said:

    I'm glad you got this working, but you've lost me.  Adding the values as you show shouldn't generate a useful position.

    Consider the below hole; Yellow is the ref point, green is the selected point and top of stock, and red is the depth 

     image.png.29aad014e649345ac74d17267a36438b.png   

    I setup a drilling postblock to mimic your math

    
    pdrill$
    	"Ref. Z position (Abs.)             : ", *drl_ref_z$, e$
    	"Selected Z position (Abs.)         : ", *drl_zdrl_z$, e$ 
    	"TOS Z position (Abs.)              : ", *drl_tos_z$, e$
    	"Depth Z position (Abs.)            : ", *drl_depth_z$, e$ 
    	*e$
    	"Ref. Z position (Inc.)             : ", *drl_sel_ref$, e$
    	
    	zrefhgt = drl_ref_z$ + drl_sel_ref$
    	*e$
    	"Sum of drl_ref_z$ and drl_sel_ref$ : ", *zrefhgt, e$

    And that resulted in the following output.

    
    Ref. Z position (Abs.)             : 60.
    Selected Z position (Abs.)         : 50.
    TOS Z position (Abs.)              : 50.
    Depth Z position (Abs.)            : 20.
    
    Ref. Z position (Inc.)             : 10.
    
    Sum of drl_ref_z$ and drl_sel_ref$ : 70.

     

    I don't understand how a value of 70mm is useful.   

    Are you using a 5 axis drilling toolpath?

  2. 18 hours ago, nickbe10 said:

    I think you are making it more complicated than necessary. There are variables (pre defined) available to do what you want without calculation. Pay attention to incremental and absolute.

    As Zaffin_D suggested the documentation is indispensable here. Especially the newer (after 2017 or 18) portfolio has a dedicated drill cycle section. You need to see what pre defined variables are available on the custom drill NCI line

    The predefined variables are not mapped correctly. Some are absolute and some are incremental adding the incremental values to known absolute reference values make them absolute as well. turns out this was a mapping issue and my calculations are working. 

    • Like 1
  3.  drl_init_z$   (clearance height)                          Mapped value
     drl_sel_ref$  (retract height)                            not mapped
     drl_sel_tos$  (top of stock)                              not mapped
     drl_ref_z$    (referance point in space for top of hole)  Mapped value  
     drl_depth_z$  (hole depth)                                Mapped value
    
    drl_sel_ref$ & drl_sel_tos$ get output from mastercam as inc values.
    I am using the calc's below to calculate these variables based on a mapped value
     
    zrefhgt = drl_ref_z$ + drl_sel_ref$
    ztoshgt = drl_ref_z$ + drl_sel_tos$
    
    FYI I'm new to post writing and open to advises if I'm doing it wrong. 
     
  4. I am trying to write a custom drill cycle to do some 3+2 moves and probe points on a surface. I am using a 5 axis drill tool path with a custom drill cycle.

    I have it working mostly how i want to but the Z values are coming out wrong. Any advice would be appreciated machine is a Mazak Variaxis.    

    first hole
              pdrlcommonb
    	  #customer probing cycle #EJL
    	  svar = drl_prm1$
    	  zrefhgt = drl_ref_z$ + drl_sel_ref$
    	  ztoshgt = drl_ref_z$ + drl_sel_tos$ 
    	  #pbld, n$, "G43", *tlngno$,e$ 
    	  pbld, n$, "M01", "M09",e$
    	  pbld, n$, "M05",e$ 
    	  pbld, n$, "M19",e$    
    	  pbld, n$, "G00", *drl_init_z$,"G43", *tlngno$,e$
    	  pbld, n$, *zrefhgt,e$
    	  pbld, n$, "G31", *drl_depth_z$, "F500.", "(fast probe touch)",e$
    	  pbld, n$, *ztoshgt,e$
              pbld, n$, "G31" *drl_depth_z$, "F50.", "(slow probe touch)",e$
    	  P_varplusone,!svar "#",*svar, "=", "#5023",e$
    	  pbld, n$, "G00", *drl_init_z$,e$
    	  pcom_movea

    additional holes

                        

              pdrlcommonb 
    	  zrefhgt = drl_ref_z$ + drl_sel_ref$
    	  ztoshgt = drl_ref_z$ + drl_sel_tos$
    	  #pbld, n$, "G00", drl_init_x$, drl_init_y$,e$
    	  pbld, n$, "M01",e$
    	  pbld, n$, "G00", *drl_init_z$, "G43", *tlngno$,e$
    	  pbld, n$, *zrefhgt,e$
    	  pbld, n$, "G31", *drl_depth_z$, "F500.", "(fast probe touch)",e$
    	  pbld, n$, *ztoshgt,e$
    	  pbld, n$, "G31" *drl_depth_z$, "F50.", "(slow probe touch)",e$
    	  P_varplusone,!svar "#",*svar, "=", "#5023",e$
    	  pbld, n$, "G00", *drl_init_z$,e$
              pcom_movea

    output from my custom drill cycle

    X-15.26 Y16.386 S1000 M3
    Z90.14 M8
    M01 M09
    M05
    M19
    G00 Z23.244 G43 H1
    Z14.226
    G31 Z-.845 F500. (fast probe touch)
    Z9.226
    G31 Z-.845 F50. (slow probe touch)
    #1 = #5023
    G00 Z23.244

    output from normal drill cycle

    X-15.26 Y16.386 S1000 M3
    Z90.14 M8
    G81 G98 X-15.26 Y16.386 Z33.14 R45.14 F120.
    G80
    M9
    G69
    G49
    G0 G90 G53 Z0.

     

  5. Hey Team, 

    I am trying to output the Tool manufacturers code from the tool settings into the G code. I have it working when the tool code is numerical but when the tool code has letters in the code it stops outputting after the Tool manufacturers code after the first letter is hit. 

     

    ex. 78987t8987    post will output 78987 and stop. 

    pardon the bad coding I am hacking and learning as I go.

    Thanks in advance.  

    fmt  "TC=" 25 groupcom     # out put the tool_op$ Manufactuers code
    
    if prmcode$ = 20002, groupcom = rpar(sparameter$, 50)

    (Pheader)

    sopen_prn, *groupcom, sclose_prn, e$

     

     

  6. Hey Gs

    I see the error from time to time and just close and reopen MC, It's annoying. today I sore a case where every time the simulator launched the error occurred.

    "Unknown error has occurred " (most brain dead error name ever) 

    This issue was caused because all of the machine simulator default machines were removed from the MC2020 shared machine sim folder. 

    The  "5_5AXGEN_VMCTTAB" cannot be removed from the folder. It is used by the Mastercam verify machine simulator as a default machine. 

    put this one machine back in the MC2020 shared machine sim folder and the simulator works again.

    • Thanks 1
    • Like 1

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