Werktuigbouwer

Verified Members
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

13 Good

About Werktuigbouwer

  • Rank
    Member
  • Birthday 06/16/1987

Profile Information

  • Gender
    Male

Uncategorized

  • Location
    Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I had the same question, but did not had the time yet (until yesterday and today). I came up with the following changes to the standerd post: # -------------------------------------------------------------------------- # Custom variables # -------------------------------------------------------------------------- op1_G41 : 0 cc_pos_pre : -1 # add variable JHM 2021-02-12 # # add variable to lsof$ lsof$ #Start of file for non-zero tool number, lathe sav_cc_1013 = cc_1013$ op1_G41 = 0 # 2021-02-12 initialize variable for first op G41 ltlchg$ # Added logic to ltlch$ ltlchg$ #Toolchange, lathe toolchng = one gcode$ = zero copy_x = vequ(x$) pcc_capture #Capture LCC ends, stop output RLCC c_rcc_setup$ #Setup LCC on first 60000 plcc_lead_begin #Save original in sav_xa and shift copy_x for LCC comp. pcom_moveb #Get machine position, set inc. from c1_xh c_mmlt$ #Position multi-tool sub, sets inc. current if G54... ptoolcomment comment$ if home_type < two, #Toolchange G50/home/reference position [ sav_xh = vequ(copy_x) sav_absinc = absinc$ absinc$ = zero pmap_home #Get home position, xabs ps_inc_calc #Set start position, not incremental #Toolchange home position if home_type = one, pbld, n$, *sgcode, pfxout, pfyout, pfzout, e$ else, [ #Toolchange g50 position pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$ toolno = t$ * 100 + zero if home_type = m_one, pbld, n$, *sgcode, *toolno, e$ else, pbld, n$, *sg50, pfxout, pfyout, pfzout, e$ ] pe_inc_calc #Update previous absinc$ = sav_absinc copy_x = vequ(sav_xh) ] toolno = t$ * 100 + tloffno$ pbld, n$, *sgcode, *toolno, e$ pbld, n$, pfsgplane, e$ pcaxis_off_l #Postblock for lathe transition pcom_moveb #Reset machine position, set inc. from last position pcan pspindle if opcode$ <> 106 | (opcode$ = 106 & suppress_point_spindle = no$), #Do not enable spindle for point toolpath [ if css_actv$, [ if css_start_rpm, prpm #Direct RPM startup for programmed CSS else, pcssg50, pcss #NO RPM start - just output the CSS ] else, prpm #Direct RPM was programmed ] sav_absinc = absinc$ if home_type > one, absinc$ = zero # ************************************* New location of psccomp ********************************************************* JHM 2021-02-12 for location of G41 pcan1, pbld, n$, #psccomp, #commented psccomp out to get correct location G41 *sgcode, pwcs, pfxout, pyout, pfzout, pscool, strcantext, e$ # ************************************* Changed location of rpm start ********************************************************* JHM 2021-02-12 for location of G41 if (opcode$ <> 106 | (opcode$ = 106 & suppress_point_spindle = no$)) & css_start_rpm, #Do not enable spindle for point toolpath pcssg50, pcss #CSS output AFTER a G97S???? RPM spindle startup # ************************************* New location of psccomp ********************************************************* JHM 2021-02-12 for location of G41 pbld, psccomp if op1_G41=0, cc_pos_pre = cc_pos$ # Set previous variable for psccomp op1_G41 = 1 plcc_lead_end #Use sav_xa to position with comp. LCC pcom_movea #Update previous, pcan2 ps_inc_calc #Reset current absinc$ = sav_absinc # ************************************* Changed location of rpm start ********************************************************* JHM 2021-02-12 for location of G41 #if (opcode$ <> 106 | (opcode$ = 106 & suppress_point_spindle = no$)) & css_start_rpm, #Do not enable spindle for point toolpath # pcssg50, pcss #CSS output AFTER a G97S???? RPM spindle startup c_msng$ #Position single-tool sub, sets inc. current if G54... toolchng = zero !op_id$, !lturret$, !tool_op$, prv_millcc = zero prev_spindle = spindle_no$ #Save spindle used in this operation #end ltlchg$ # Edit prapidout to comment out psccomp in G0 movements prapidout #Output to NC, linear movement - rapid if lathecc = zero, [ if millcc_flag & (abs(cuttype) = four | abs(cuttype) = two) & cutpos2$ = zero, #Polar interpolation is active & Y-axis subs or Right face or Left face & before start point of operation geometry [ if abs(cuttype) = four, #Y-axis substitution, output C first on separate line [ pcan1, pbld, n$, pexct, psgcode, pcout, e$ pbld, n$, pexct, pxout, pyout, pzout, pscool, strcantext, e$ ] else, #Right or Left face cut, output Z last on separate line [ pcan1, pbld, n$, pexct, psgcode, pxout, pyout, pcout, pscool, strcantext, e$ pbld, n$, pexct, psgcode, pzout, e$ ] ] else, [ pcan1, pbld, n$, psgplane, pexct, psgcode, #psccomp, # commented psccomp out for correct location output of G41 pwcs, pxout, pyout, pzout, pcout, pscool, strcantext, e$ ] ] else, #Lathe canned turning cycle [ pcan1, pbld, n$, pexct, psgcode, #psccomp, # commented psccomp out for correct location output of G41 pxout, pyout, pzout, pcout, pscool, strcantext, e$ ] if force_feed, result = force(feed) # Force output of feed next time it's called for output if rpd_typ$ = 7, ptool_insp #Tool inspection point #end prapidout # psccomp, added logic to forse G41/G42/G40 output to plane$=2 and prevent double output psccomp #Output the cutter compensation based on the current plane if compok | lcc_compok >= two, [ if plane$ = zero, sccomp if plane$ = one, sccomp1 if plane$ = two, #added logic, instead of sccomp2 [ if cc_pos_pre <> cc_pos$, [ *sccomp2 cc_pos_pre = cc_pos$ ] ] ] # end psccomp which gives as a result: G0 T1212 G18 G97 S2136 M03 G0 G54 X43.951 Z5.3 M8 G50 S3600 G96 S295 G42 G99 G1 Z3.3 F.2 Z-59.864 X46.447 G18 G3 X46.847 Z-60.064 K-.2 G1 Z-97.155 G40 X49.676 Z-95.741 G0 Z5.3 X41.055 G1 G42 Z3.3 F.2 Z-59.864 X43.951 G40 X46.78 Z-58.45 G0 Z5.3 X38.159 G1 G42 Z3.3 F.2 Z0. Z-59.864 X41.055 G40 X43.884 Z-58.45 G0 X46.247 G28 U0. V0. W0. M05 T1200 I have not tested it yet, so test carefully Greetz, Jan
  2. With this you know where the problem is. I would add a variable to the system: op_num_prev : 0 #Variable to store the previous op_num for ptoolcommend Next we have to edit the last else statement: ptooltable$ if tool_info > 1, # tool_info is initalized to 3 which puts Tooltable in header - with tool comments at T/C [ result = fprm(101, 0, 0) # get the data from parameter lookup pgettoolinfo s_t_pre_tt = s_t_pre$, s_d_pre_tt = s_d_pre$, # Copy prefix string for Tool number and cutter comp number s_h_pre_tt = s_h_pre$ # Copy prefix string for Tool length offset # Output tooltable line if tt_state$ = 1 | tt_tool$ <> tool_prev, [ *e$ n$ = tt_tool$ * 100 *tt_tool$, sdelimiter, *n$, sdelimiter,*supmf_id, sdelimiter, pstrtool, sdelimiter, *tt_tlngno$, e$ if tt_drlcycle$ = -1 & comp_type > 0 & comp_type < 4, [ sopcomment, sdelimiter, *tt_offset$, sdelimiter, *scomp_type, e$ ] else, [ sopcomment, e$ ] ] else, [ if op_num_prev <> op_num, # Add this if statement to check to previous operation number [ sopcomment, e$ ] ] op_num_prev = op_num #update op_num_prev ] Also note that every time the added variable is updated in the second to last line. The first if statement after # output tooltable line: if tt_state$ =1 | tt_tool$ <> tool_prev, checks for first tool or if tool is unequal for previous tool. Therefore op_num_prev is not used at before updating it. The added if statement check is the op_num_prev is unequal to current op_num. This should eliminate the extra sopcomments from a toolpath and adding it when there is a new toolpath. Greetz, Jan
  3. Try this: ptooltable$ if tool_info > 1, # tool_info is initalized to 3 which puts Tooltable in header - with tool comments at T/C [ result = fprm(101, 0, 0) # get the data from parameter lookup pgettoolinfo s_t_pre_tt = s_t_pre$, s_d_pre_tt = s_d_pre$, # Copy prefix string for Tool number and cutter comp number s_h_pre_tt = s_h_pre$ # Copy prefix string for Tool length offset # Output tooltable line if tt_state$ = 1 | tt_tool$ <> tool_prev, [ *e$ n$ = tt_tool$ * 100 *tt_tool$, sdelimiter, *n$, sdelimiter,*supmf_id, sdelimiter, pstrtool, sdelimiter, *tt_tlngno$, e$ if tt_drlcycle$ = -1 & comp_type > 0 & comp_type < 4, [ sopcomment, sdelimiter, *tt_offset$, sdelimiter, *scomp_type, e$ ] else, [ sopcomment, e$ ] ] else, [ # sopcomment, e$ -------> comment this line out ] ] Greetz, Jan
  4. Try the following: Look at the sextaux$ and sextsub$ line pheader$ result = setncstr(two, spathnc$ + snamenc$ + sextnc$) psub_st_s$ result = fclose(spathaux$ + snameaux$ + sextaux$) snameaux$ = drs_str(two, sub_prg_no$) sextaux$ = ".nc" result = setncstr(two, spathaux$ + snameaux$ + sextaux$) psub_st_m$ result = fclose(spathsub$ + snamesub$ + sextsub$) snamesub$ = drs_str(two, main_prg_no$) sextsub$ = ".nc" result = setncstr(two, spathsub$ + snamesub$ + sextsub$)
  5. Werktuigbouwer

    TOOL DIGITS

    This worked for me. Are u using the correct variable? ptooltable #Tooltable output !spaces$, spaces$ = 0 result = newfs(6, t$) sopen_prn, *t$, sdelimiter, sdelimiter, pstrtool, sdelimiter, *tlngno$, [if comp_type > 0 & comp_type < 4, sdelimiter, *tloffno$, sdelimiter, *scomp_type, sdelimiter, *tldia$], [if xy_stock <> 0 | z_stock <> 0, sdelimiter, *xy_stock, sdelimiter, *z_stock], sclose_prn, e$ xy_stock = 0, z_stock = 0 #Reset stock to leave values #Reset stock to leave values result = newfs(4, t$) spaces$ = prv_spaces$ I used newfs to change the output. Result: (T001||VLAKFREES Ø50/Ø57.8 TEAGUTEC |H1) (T002||10 FLAT ENDMILL |H2|XY STOCK TO LEAVE - 1.|Z STOCK TO LEAVE - 0.) (T057||12 FLAT ENDMILL |H57)
  6. Werktuigbouwer

    MC 2021 verify troubles

    From memory: go the cofiguration, tab simulation and uncheck OR check go to home position. Then restart mastercam. Tomorrow i will update a screenshot.
  7. Werktuigbouwer

    2020 crashing on startup tasks.

    Same problem here, but starting up in compatibility mode gives the following error:
  8. I would try Vardex tools ( http://www.vargus.com ), item below is for a partial profile of 60°.
  9. I have a MX850 with only the orbital function (synchro tip was not available back then). We use this function to shape vacuum surfaces (round surfaces, but also squares). These surfaces has to have a circular roughness. When we were looking for a new machine a couple of years ago, the salesman said that you could also combine synchro tip with orbital shaping to combine the speeds. Orbital shaping can be done in every plane. But synchro tip has to be centered on the C-axis.
  10. Werktuigbouwer

    Tool Staging

    Other option: ttblend$ is a variable which indicates last tool call. #prestage tool pbld, n$, "G43", *tlngno$, pfzout, scoolant, if ttblend$, "T0", e$ else, *next_tool$, e$
  11. Werktuigbouwer

    lathe post x5 m6 on tool line

    You probably use as Work coordinate system the option Home position (mi1 = 1) Try changing the post to the following: if home_type < two, #Toolchange G50/home/reference position [ sav_xh = vequ(copy_x) sav_absinc = absinc$ absinc$ = zero pmap_home #Get home position, xabs ps_inc_calc #Set start position, not incremental #Toolchange home position if home_type = one, pbld, n$, *sgcode, pfxout, pfyout, pfzout, e$ else, [ #Toolchange g50 position pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$ toolno = t$ * 100 + zero if home_type = m_one, pbld, n$, *sgcode, *toolno, e$ else, pbld, n$, *sg50, pfxout, pfyout, pfzout, e$ ] pe_inc_calc #Update previous absinc$ = sav_absinc copy_x = vequ(sav_xh) ] toolno = t$ * 100 + tloffno$ pbld, n$, *sgcode, *toolno, "M6", e$ pbld, n$, pfsgplane, e$
  12. Werktuigbouwer

    Kitamura cutter comp issue

    Another option could be to solve this on the machine side. In the toolchange macro you could set for example: #800 = #4120 (H-offset) #801 = #4120+50(D-offset) (OR +0) Than you have to change the post to call for H#800 and D#801 One program for all machines, down side is that you can not use multiple tooloffsets. I have done this for our Matsuura.
  13. Werktuigbouwer

    Active report output a pop up message

    I believe you have not copied it correcly, try MessageBox.Show("message")
  14. When using a fresh MPmaster post, I had to set the control definition (I opened this from the machine definition) to the following settings on the arc page: This resulted for me in the code below: G41 D16 X-204.707 Y201.172 F300. X-147.078 Y143.543 G03 X-143.543 Y147.078 R2.5 G01 X-201.172 Y204.707 G40 X-202.869 Y203.01 G00 Z99.51 Which does not show the 0.001 difference where you we're talking about and i guess it should work on you're machine. May by it helps.
  15. Werktuigbouwer

    lathe tool inspection

    The coolant is probably not starting because using CoolantX. My work around is as follows: ptool_insp #Tool inspection point #Modify following lines to customize output for tool inspection points #Shut down coolant, M00 does not work on Fagor control if posttype$ = two, #Lathe tool inspection point [ if all_cool_off, [ #all coolant off with a single off code here if coolant_on, pbld, n$, sall_cool_off, e$ ] else, [ local_int = zero coolantx = zero while local_int < 20 & coolant_on > 0, [ coolantx = and(2^local_int, coolant_on) local_int = local_int + one if coolantx > zero, [ coolantx = local_int pbld, n$, scoolantx, e$ ] ] ] pbld, n$, "M05", e$ #stop spindle sopen_prn, no_spc$,"MSG", no_spc$, '"', no_spc$, "TOOL INSPECTION POINT", no_spc$,'"', no_spc$, sclose_prn, e$ if prmcode$ = 29999, #Only output tool insp comment if one was entered with this insp point [ sparameter$ = ucase(sparameter$) pbld, n$, *sm00, sopen_prn, sparameter$, sclose_prn, e$ ] else, pbld, n$, *sm00, e$ #Output just the stop if no comment sopen_prn, no_spc$,"MSG", no_spc$, '"', no_spc$, stoppcomment, no_spc$,'"', no_spc$, sclose_prn, e$ #added 24-4-2018 opperation comment on screen pbld, n$, *t$, *tloffno$, e$ #Restate tool number #pbld, n$, pfsgplane, e$ #Restate plane code pcss # Output programmed CSS # Restart spindle #prpm # Output programmed RPM #Restate spindle, removed 24-4-2018 prv_feed = c9k #Set prv_values to c9k to force them out with next moves prv_gcode$ = c9k prv_workofs$ = c9k #Restore coolant 2019-02-06 JHM if coolant$, prv_coolant$ = c9k #Restore coolant 2019-02-06 JHM local_int = zero coolantx = zero while local_int < 20 & coolant_on > 0, [ coolantx = and(2^local_int, coolant_on) # if coolantx > zero, [ coolantx = local_int pbld, n$, *scoolantx, e$ ] local_int = local_int + one ] ] else, #Mill tool inspection point pbld, n$, *sm00, "(TOOL INSPECTION POINT - POST CUSTOMIZATION REQUIRED)", e$ Hope this will help.

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