Leaderboard


Popular Content

Showing content with the highest reputation since 05/12/2019 in all areas

  1. 2 points
    You may consider switching to Mobil 1 synthetic motor oil instead of vactra2 (thought i saw that in some Haas document). just comparing colors should be telling. Vactra eventually plugs the restrictors. Some oils specs are so stringent they cant be shipped in metal barrels due to leaching. My original 2002 spindle is whittling Titanium ATM
  2. 2 points
    Grimes, In the view tab under grid you have activated the snap to grid. To set a default color for the stl file set the "mesh" color to what you want the file to open with.
  3. 2 points
    Colin, Thank you for taking the time to come up with this very elegant solution. I don't know if you have had experienced similar, but the challenge was to use a HMC as a VTL substitute, and incremental moves with a B360. on each line has worked well, so wanted to figure out this little irksome issue. Not being patronizing when I say that having read many of your contributions to this forum, the level of your knowledge and your willingness to assist is exceptional . Thanks again.
  4. 2 points
    See if this works for you. May have to clean it up a little. I have a link to a free jpg to dxf converter that I do things like this with. Let me know if you'd like it. Brent RHP.mcam
  5. 2 points
    We've got a very large Okuma 5X trunion style horizontal mill and an Okuma VTM-1200 5 axis vertical lathe I cannot speak too highly of the service we have received from Gosiger or the quality of these machines. The horizontal mill has spent 5 years doing heavy roughing in steel and is still a tack driver. Last year we took on a reflective dish for a satellite antenna. The reflective surface had an insane tolerance. We told them we couldn't hold it and quoted it "best effort". The "best effort" we got from the HBM we roughed it on was not good enough so we took the finish pass on the Okuma 5X mill. The results were so good our customer did not believe our CMM report. They demanded we CMM it again and sent a rep out to witness the inspection.... Okuma's are not cheap, but they are more than worth the price.
  6. 2 points
    Yes, It has to be brand new.
  7. 1 point
    What I ended up doing was to stick a g91 in ahead of my A360. and a G90 in the next line. it worked well. I think my machine is set up to take the shortest way to the next A value. by looking at these codes I suspect they will produce the same non turning result. I will see next time I have the fourth running. Thank you for your time Jason and Heavy Chevy
  8. 1 point
    There is a an operation 4 that does what you want an edge chamfer. There are a few different samples of Axis sub cuts review the view sheets and operation. if you have question please ask. Axis Sub.zip
  9. 1 point
  10. 1 point
    You can use a NET-Hook to do this, below is a basic example. The NET-HOOK - namespace QueryViews { using System.Linq; using Mastercam.App; using Mastercam.App.Types; using Mastercam.Posting; using Mastercam.Posting.Types; using Mastercam.Support; using Mastercam.Database; public class Main : NetHook3App { #region Public Override Methods /// <summary> The main entry point for your QueryViews. </summary> /// /// <param name="param"> System parameter. </param> /// /// <returns> A <c>MCamReturn</c> return type representing the outcome of your NetHook application. </returns> public override MCamReturn Run(int param) { var postArguments = GetPostArguments(); var view = GetView(postArguments.Argument1); if (view != null) { SetPostArguments(view.WorkOffsetNumber.ToString(), view.ViewID.ToString(), view.ViewOrigin.ToString()); return MCamReturn.NoErrors; } else { SetPostArguments($"-99999", $"{postArguments.Argument1} NOT FOUND", $"{postArguments.Argument1} NOT FOUND"); return MCamReturn.ErrorOccurred; } } private PostProcessorArgumentsType GetPostArguments() => (PostProcessorArgumentsType)PostingManager.PostProcessorArguments; private MCView GetView(string name) => SearchManager.GetViews() .Where(v => v.ViewName.ToUpper() == name.ToUpper()) .Select(v => v).FirstOrDefault(); private void SetPostArguments(string argumentOne, string argumentTwo, string argumentThree) { PostProcessorArgumentsType returnArguments; returnArguments.Argument1 = argumentOne; returnArguments.Argument2 = argumentTwo; returnArguments.Argument3 = argumentThree; PostingManager.PostProcessorArguments = returnArguments; } #endregion } } The post - #region Numeric Variable Initializations dll_return : 0 #endregion End Numeric Variable Initializations #region String Variable Initializations sdq : '"' # " sspace : " " snone : "none" sinvalid : "-99999" sdll : "QueryViews.dll" sdll_args : "" #endregion End String Variable Initializations #region Query Views sview_name : "TestWCS" fq 1 sview_name "Enter a View's Name to Query" pquery_views q1 sdll_args = sdq + sview_name + sdq dll_return = dll(sdll, sdll_args) if spost_arg_0$ <> sinvalid, [ sview_name, "- Found!", e$ " Work Offset ->", spost_arg_0$, e$ " View ID ->", spost_arg_1$, e$ " Origin ->", spost_arg_2$, e$ ] else, "ERROR -", spost_arg_1$, e$ #endregion Query Views psof$ pquery_views Output - // TestWCS - Found! // Work Offset -> 59 // View ID -> 52 // Origin -> X0.0000 Y0.0000 Z0.0000
  11. 1 point
    Doosan is rock solid compared to a HASS, they are not in the same class. Doosan is made to Japanese industrial standards.
  12. 1 point
    Hi Pete, The MP Language has tools available to break linear moves "automatically". I believe that this would work for you, to control the segment length, without having to enable the "fixed segment length" in the Operation. What specific Post is your Post based on? In the "Generic Posts" from CNC Software, there is usually a "motion setup" Post Block named 'pmotion_su', which lets you manipulate the "incoming data" from the NCI File. Here is a sample from MPFan: pmotion_su #Motion Setup (Set brklinestype & linarc) brklinestype$ = zero linarc$ = zero if rot_on_x, [ if cuttype = one, #Axis Substitution [ linarc$ = one #Linearize all arcs if rev_brkflag, #Break rotation flag (set in pcoutrev) [ brklinestype$ = 11 #Break all lines, use brklineslen$ for segment length #brklineslen$ = pi$ * rotdia$ #Break every 360 degrees brklineslen$ = pi$ * rotdia$ / four #Break every 90 degrees rev_brkflag = zero #Reset flag ] ] if cuttype = two, #Polar [ brklinestype$ = rotary_axis$ + three linarc$ = one ] ] You'll notice the first two lines in this Post Block, reset the Command Variable for 'brklinestype$', and 'linarc$'. (setting both to 'zero', turns them off. Then, we have an "if statement", which checks to see "is there a Rotary Axis present in your Axis Combination?", which ends up setting the 'rot_on_x' variable. When this variable is "on" (not zero), it means we are in 4 Axis Mode. So, if we are in 4X mode, then we check to see if we are using Axis Substitution, or Polar output. In the block to process each "mode", we can manipulate the values for: linarc$ - Tells MP to "linearize Arcs", based on the Chordal Tolerance Variable brklinestype$ - Tells MP "what kind of motion to breakup". This is based on a bunch of different options (11 different "modes" for breaking linear moves). brklineslen$ - Tells MP what the length of each 'broken segment' should be. Here is a modified Post Block, which would break all linear motion, based on detecting if the Post was in "incremental output mode": pmotion_su #Motion Setup (Set brklinestype & linarc) brklinestype$ = zero linarc$ = zero if rot_on_x, [ if cuttype = one, #Axis Substitution [ linarc$ = one #Linearize all arcs if rev_brkflag, #Break rotation flag (set in pcoutrev) [ brklinestype$ = 11 #Break all lines, use brklineslen$ for segment length #brklineslen$ = pi$ * rotdia$ #Break every 360 degrees brklineslen$ = pi$ * rotdia$ / four #Break every 90 degrees rev_brkflag = zero #Reset flag ] ] if cuttype = two, #Polar [ brklinestype$ = rotary_axis$ + three linarc$ = one ] ] if absinc$ = one, #We are in Incremental Mode, so break all linear motion into small segments [ chord_tol$ = arcrad$ * .02 # Use 2% of Arc Radius, as Chord Tol Value. if chord_tol$ < .0001, chord_tol$ = .0001 #Trap and fix small values. linarc$ = one #Break all Arcs brklinestype$ = 11 #Set "break type" to break all lines, using segment length brklineslen$ = .02 #Set "break segment length" distance ]
  13. 1 point
    For the slope I would use a 3/4" 45 degree chamfer mill since the surface is a 45 degree angle. If they were an odd angle I'd do like Steve said and Ball nose the surfaces. Honestly though, if the material is already squared up to size then this part would be even easier in 3 operations the same tooling could be used for all ops. 1st OP. Mill slot 2nd op Rotate 90 and Drill Hole in back of part 3rd op machine the 45 degree face and deep slot 56-350-00-MP_3OP.mcam
  14. 1 point
    We are not really an Okuma shop but we got an Okuma lathe to do some specific shafting work. Okuma had the specs we needed and it is removed from our normal production flow. Great machine and Gosiger were the business. Worked in a shop with a Mori NT, also nice. We have Mori Apps / Service engineers up here now (Pacific NW). Again very good.
  15. 1 point
    5 axis drill>>use points and lines Use Hole axis to create points & lines
  16. 1 point
    I would also be remiss if I didn't mention the Matsuura Cublex. You can option them with both Turning and Grinding(!) options. Since 80% of your work has Mill features, this would be a slam dunk. One of the biggest advantages to a machine like this is the Pallet Pool, which allows you to run with minimal operator intervention.
  17. 1 point
    I have something that seems to have helped Mastercam be more stable and crash less. Inside task manager there is the ability to set priority of programs. If you go in and set Mastercam to high priority, it seems to be more stable and process things faster (on my computer at least). The problem is that it only lasts until you close Mastercam. I did a Google search and there are add on programs that will keep the priority set to high. The program I downloaded is called Prio. It installs and runs in the background. It starts when windows does and now when I run Mastercam the priority is always set at high. All you have to do is start task manager and high light Mastercam (once it's running) right click- Set it to high and also check save priority. Set it once and it's done.
  18. 1 point
    Your containment settings or depth settings may be precluding any actual cut area.
  19. 1 point
    Doing that it would be a must to have 64 gb of RAM. I dd a time study for a company about 6 years ago. They had 5 programmers all using older towers at the time. I came in with my laptop and took one of their files and just regenerated it and showed them the difference. It took about 2 minutes on that file verses the 40 minutes it was taking on their computer. I had them record all the time it was taking them for 30 days on files. We then used that as a ROI for new computers. We showed it was costing the company $250k a year in additional time programming not spending $25k on new systems. They felt I lied to them so they purchased one new system. The one programmer start doing more than the other 4 combined with the new computer. Within a month they all had new systems. Funny go tell someone their heart has a problem and they want to do everything they need to get it checked out and fixed. The programmer for any company is the heart and soul of it and if they don't have professional level and quality tools to do their job then you just reducing the whole company down by not doing everything you can to keep that heart pumping and flowing as best as possible.
  20. 1 point
    Yes, and CNC Software is also rewriting many of the existing paths, to support Multi-threading. This is a good thing in my opinion.
  21. 1 point
    The best solution is actually a method called "Chain Synchronization". It is a capability that has existed in Mastercam for at least 20 years. The concept is fairly simple: you identify to Mastercam, which "sections" of the top and bottom chain should be treated as "matched pairs" for the top and bottom chain. There are many different "Chain Sync Methods". These are all available by clicking on the Chaining Options button (!) in the Chaining Dialog box. Each of the 'Sync' methods is different, in terms of how the geometry should be prepared before you begin the chaining session. The easiest method to start with is either "by Entity", or "by Point". Both of these require you to "prep" the geometry before you begin. Essentially, you either need to break the splines up into separate segments, or you need to create your own (new) Wireframe Geometry, that represents each section, Top and Bottom. For example, as the path goes around the "sharper corners", the radius on the top, and the radius on the bottom, should be broken where it intersects the "wall" section of the chain. If you use "Sync by Entity", it would be expected that you have an equal number of chains, top and bottom. So this can require a bunch of breaking (create Point Dynamic in 3D Mode is very useful). Also, you can use Create > Point > Node Points (in 3D Mode), to get "points that lie on the Spline itself", that are useful positions to break up the contours. Besides "Sync by Entity", there is the option for "Sync by Points". This method means that you don't have to break up the Contour Chains, but you do need to create actual Point Entities on the Top and Bottom Chains, with essentially an equal number of points, Top and Bottom. The other option, that can work well, depending on how quick you are at creating geometry, is the "by branch", where you actually connect each section, top to bottom, with a Line entity. I usually create all of the top chain in one color (like Green), create the bottom chain in another color (blue), and then connect my branch lines in something like Orange. That way I can enable "Sync by Branch" mode, but also use the Color Chaining Filter, so I can grab each chain (top and bottom), while having the chaining manager ignore the branches while chaining, but still use these branches for the Sync method. Post up a Mastercam File, and someone can show you the Sync Methods, and how to prepare the geometry. The results are even better than what you got in your second Post in this thread...
  22. 1 point
    24" diameter? WFL is your machine tool builder.
  23. 1 point
    Several methods.. Method 1: Manually enter NC code into the editor after you post your code.. Method 2: Use a manual entry to include the cycle so that it posts with the rest of your code. Method 3: Make a modified post that allows you to use custom drill cycles as probing routines (I think this has an example in the posts forum) Method 4: Talk to your reseller about getting the probing addon for Mastercam. I prefer option 2, its easy and flexible and costs nothing in time and effort..
  24. 1 point
    Cycle Time list by OP or Tool Some additional variable: # --- Operation/Tool Time variables --- OpTime_F : 0 # Operation Feed Time OpTime_R : 0 # Operation Rapid Time OpLength_F : 0 # Operation Feed Length OpLength_R : 0 # Operation Rapid Length ToolTime_F : 0 # Tool Feed Time ToolTime_R : 0 # Tool Rapid Time ToolLength_F : 0 # Tool Feed Length ToolLength_R : 0 # Tool Rapid Length OpLastOp_id : 0 # OP tracking ID b10_MaxTool : 0 # Buffer 10 - Biggest tool no in B10 szerszam_out : 0 # Tool flag temp_counter : 0 # Counter sav_ToolName : "" # Save Tool name @ Buffer read fmt 2 ToolLength_F "mm" # Tool Feed Length fmt 2 ToolLength_R "mm" # Tool Rapid Length # String bufferek változói s_OpComment : "" # Operáció comment buffer stringje s_ToolName : "" # Szerszám név buffer stringje Buffers to hold ToolName, OpName Toolpath time/length # -------------------------------------------------------------------------- # OP Comment Buffer - 2 rc2 : 1 wc2 : 1 size2 : 0 fbuf 2 0 255 0 1 # -------------------------------------------------------------------------- # ToolName Buffer - 3 rc3 : 1 wc3 : 1 size3 : 0 fbuf 3 0 255 0 1 # -------------------------------------------------------------------------- # Operation Time Buffer - 10 b10_index : 1 # Buffer 10 - Index b10_ToolNo : 0 # Buffer 10 TlNo b10_ToolTime_F : 0 # Buffer 10 - Tool Time - FEED b10_ToolTime_R : 0 # Buffer 10 - Tool Time - RAPID b10_Length_F : 0 # Buffer 10 - Tool Path - FEED b10_Length_R : 0 # Buffer 10 - Tool Path - RAPID rc10 : 1 wc10 : 1 size10 : 0 fbuf 10 0 6 0 0 fmt "T" 4 b10_ToolNo # Buffer 10 # -------------------------------------------------------------------------- Need some changes in basic time postblocks: ptimer #Rapid time and length calc rlen = rlen + len #Running total RAPID length trtime = rlen / pst_rpd_fr$ #Running total RAPID time OpTime_R = rlen / pst_rpd_fr$ # Added for Operation Time Counter OpLength_R = OpLength_R + len # Added for Operation Length Counter ptimel #Feed time and length calc llen = llen + len tltime = tltime + len / fr_pos$ OpTime_F = OpTime_F + len / fr_pos$ # Added for Operation Time Counter OpLength_F = OpLength_F + len # Added for Operation Length Counter Postblock to write buffers: pWriteBuffer_2 s_OpComment = wbuf(2, wc2) pWriteBuffer_3 s_ToolName = wbuf(3, wc3) pWriteBuffer_10 # Time Buffer b10_ToolNo = abs(prv_t$) b10_ToolTime_F = OpTime_F b10_ToolTime_R = OpTime_R b10_Length_F = OpLength_F b10_Length_R = OpLength_R b10_index = wbuf(10, wc10) b10_index = b10_index + 1 OpTime_F = 0 # Reset FEED Time counter @ Op end OpTime_R = 0 # Reset RAPID Time counter @ Op end OpLength_F = 0 # Reset FEED Length counter @ Op end OpLength_R = 0 # Reset RAPID Length counter @ Op end Changes to call buffer write postblocks: pheader$ #Call before start of file uj fejlec hozzaadva #q1, rd_tlpathgrp$ "%", e$ *progno$, sopen_prn, *sprogname$, *sextnc$, sclose_prn, e$ "()", e$ #comment$ "()", e$ sopen_prn, "Tool List:" , sclose_prn, e$ ... ... ... # MoP OpLastOp_id = op_id$ # ptlchg1002$ #Call at actual toolchange, end last path here ... ... ... !op_id$ # if op_id$ <> OpLastOp_id, [ pWriteBuffer_10 OpLastOp_id = op_id$ ] # peof$ #End of file for non-zero tool pretract pWriteBuffer_10 comment$ if stagetool = 1 & stagetltype = 2, pbld, n$, *first_tool$, e$ n$, "M30", e$ #mergesub$ #clearsub$ ... ... ... pwrtt$ #Pre-read NCI file if op_id$ <> prv_op_id$, [ pWriteBuffer_2 pWriteBuffer_3 ] !op_id$ pwrttparam$ #Pre-read parameter data #"pwrttparam", ~prmcode$, ~sparameter$, e$ if prmcode$ = 15239, s_OpComment = sparameter$ # Operáció comment if prmcode$ = 20001, s_ToolName = sparameter$ # Aktuláis szerszám neve Postblocks to read buffers and create lists: pReadBuffer_10_2 "( ************** Operation Time/Path *************** )", e$ size10 = rbuf(10, 0) rc2 = 1 rc10 = 1 while rc10 <= size10, [ s_OpComment = rbuf(2, rc2) b10_index = rbuf(10, rc10) ttltime = b10_ToolTime_R, "( ", *s_OpComment, " >>> Rapid: ", ptimeout ttltime = b10_ToolTime_F, " --- Feed: ", ptimeout, " )", e$ ToolLength_F = b10_Length_F ToolLength_R = b10_Length_R "( Rapid path: ", *ToolLength_R, " --- Feed path: ", *ToolLength_F, " )", e$ if (rc10 - 1) <> size10, "( -------------------- )", e$ ] "( ************************************************** )", e$ pReadBuffer_10_3 "( ************** Tool Time/Path *************** )", e$ size10 = rbuf(10, 0) rc3 = 1 rc10 = 1 b10_MaxTool = -1 szerszam_out = 0 temp_counter = 0 while rc10 <= size10, [ b10_index = rbuf(10, rc10) if b10_ToolNo > b10_MaxTool, b10_MaxTool = b10_ToolNo ] rc10 = 1 while temp_counter <= b10_MaxTool, [ while rc10 <= size10, [ b10_index = rbuf(10, rc10) s_ToolName = rbuf(3, rc3) if temp_counter = b10_ToolNo, [ ToolTime_F = ToolTime_F + b10_ToolTime_F ToolTime_R = ToolTime_R + b10_ToolTime_R ToolLength_F = ToolLength_F + b10_Length_F ToolLength_R = ToolLength_R + b10_Length_R szerszam_out = 1 sav_ToolName = s_ToolName ] ] if szerszam_out = 1, [ b10_ToolNo = temp_counter ttltime = ToolTime_R, "( ", *b10_ToolNo, " - ", *sav_ToolName, " >>> Rapid: ", ptimeout ttltime = ToolTime_F, " - Feed: ", ptimeout, " )", e$ "( Rapid path: ", *ToolLength_R, " --- Feed path: ", *ToolLength_F, " )", e$ if b10_ToolNo <> b10_MaxTool, "( -------------------- )", e$ ] temp_counter = temp_counter + 1 rc10 = 1 rc3 = 1 szerszam_out = 0 ToolTime_F = 0 ToolTime_R = 0 ToolLength_F = 0 ToolLength_R = 0 ] "( ********************************************* )", e$ Output list @ peof: peof$ #End of file for non-zero tool pretract pWriteBuffer_10 comment$ if stagetool = 1 & stagetltype = 2, pbld, n$, *first_tool$, e$ n$, "M30", e$ #mergesub$ #clearsub$ #mergeaux$ #clearaux$ "%", e$ # subout$ = 0 ptooldata #Total ending data for tool (Path Length and Times) sav_spc = spaces$ spaces$ = 0 # pReadBuffer_10_2 pReadBuffer_10_3 "()", e$ # "( *** Megtett Ut/Ido adatok *** )", e$ "( Megtett Ut Gyorsjarattal = ", *rlen_total, "mm )", e$ "( Megtett Ut Elotolassal = ", *llen_total, "mm )", e$ ttltime = total #Transfer TOTAL program time "( Teljes Ciklusido = ", ptimeout, " )", e$ #Program Total time output ttltime = tot_rtime "( Teljes Ido Gyorsjaratban : ", ptimeout, " )", e$ ttltime = tot_ltime "( Teljes Ido Elotolasban : ", ptimeout, " )", e$ "()", e$ "()", e$ # spaces$ = sav_spc # mergeaux$ clearaux$ So? I hope I'm not miss anything...
  25. 1 point
    Lemme' share my workaround. I stolen from .set and merged with a 3ax Mill post 'bout 3 years ago. I made some test than, and we used at many machine. As I remember all of them worked well. Including canned drill cycles...witttt dwell too... Not really easy, but works pretty well... Here ya go a HAAS sample: Variables: # --- Ciklus idő változói --- # *IMPORTANT* - # Note that the Program TOTAL TIME includes the Toolchange time(s), # so it will be longer than the Total RAPID time + Total FEED time! # Set the time it takes for machine to do a toolchange tlchgtime : 0.066 #Tool Change Time (* in Minutes *) I'ts 4 sec now ttltime : 0 #Total operation time tltime : 0 #Feed time trtime : 0 #Rapid time total : 0 #Total machine time tot_ltime : 0 #Total FEED time tot_rtime : 0 #Total RAPID time len : 0 #Length for calculation dx : 0 #Delta x dy : 0 #Delta y dz : 0 #Delta z drill_length_r : 0 # Drill length - RAPID drill_length_f : 0 # Drill length - FEED actual_drl_depth: 0 # Actual drill depth variable peck_safe_dist : 0.3 # Peck/Chip break safe distance for retratct into hole use_TC_pos : yes$ # Calculate with Home positions @ TC? 0=No, 1=Yes sav_X_Pos : 0 # Saved X position, use X_home/Y_home/Z_home in rapids at TC sav_Y_Pos : 0 # Saved Y position, use X_home/Y_home/Z_home in rapids at TC sav_Z_Pos : 0 # Saved Z position, use X_home/Y_home/Z_home in rapids at TC time_format : 2 # Time format of output times in NC code: # 1 = 2h 14:25 # 2 = 2hrs, 14mins, 25.08sec fs2 8 0^2 0^2n #Decimal, 2 place, omit decimal if whole number, non-modal fmt 2 llen #Feed cut length fmt 2 rlen #Rapid traverse cut length fmt 2 llen_total #Feed cut length (program total) fmt 2 rlen_total #Rapid traverse cut length (program total) fmt 2 total #Total part time fmt 2 ttltime #Total operation time fmt 4 thrs #Time in hours fmt 4 tmin #Time in minutes fmt 8 tsec #Time in seconds # --------------------------- Postblocks for time: # --- Cycle Time Postblocks --- psetup #Output of toolchange information !gcode$ llen = zero #Reset counter for next tool rlen = zero #Reset counter for next tool tltime = zero #Reset counter for next tool trtime = zero #Reset counter for next tool ttltime = zero #Reset counter for next tool if use_TC_pos, [ sav_X_Pos = x$, sav_Y_Pos = y$, sav_Z_Pos = z$ x$ = xh$, y$ = yh$, z$ = zh$ ptime_calc x$ = sav_X_Pos, y$ = sav_Y_Pos, z$ = sav_Z_Pos, ] ptooldata #Total ending data for tool (Path Length and Times) llen_total = llen_total + llen #Keep running total for Program rlen_total = rlen_total + rlen #Keep running total for Program tot_ltime = tot_ltime + tltime #Total FEED time tot_rtime = tot_rtime + trtime #Total RAPID time ttltime = tltime + trtime #Calc. current Tool Time total = ttltime + total + tlchgtime #Calc. total Program Time pthrminsec #Convert minutes to hr/min/sec format thrs = int(ttltime / 60) tmin = int(ttltime - thrs * 60) tsec = (ttltime - thrs * 60 - tmin) * 60 ptimeout #Output "times" pthrminsec #Convert minutes to hr/min/sec format if time_format = one, [ #Output 'HOURS' if thrs = one, *thrs, "hr, " if thrs > one, *thrs, "hrs, " #Output 'MINUTES' if tmin = one, *tmin, "min, " if tmin > one, *tmin, "min, " #Output 'SECONDS' if tsec > zero, *tsec, "sec" ] else, [ result = newfs(five, tsec) #Output 'HOURS' if thrs > zero, *thrs, "h " #Output 'MINUTES' and 'SECONDS' *tmin, ":", *tsec ] ptimer #Rapid time and length calc rlen = rlen + len #Running total RAPID length trtime = rlen / pst_rpd_fr$ #Running total RAPID time ptimel #Feed time and length calc llen = llen + len tltime = tltime + len / fr_pos$ ptime_calc #Distance calculations # Delta Distances dx = x$ - prv_x$ dy = y$ - prv_y$ dz = z$ - prv_z$ # Distance at linear movement if gcode$ = zero | gcode$ = one, len = sqrt(dx^2 + dy^2 + dz^2) # Distance at circular movement if gcode$ = two | gcode$ = three, len = (abs(sweep$)/360) * 2 * arcrad$ * pi$ # Distance at drilling if gcode$ = 81 | gcode$ = 100, [ if gcode$ = 100, ptime_drill_XY if drillcyc$ = 0, ptime_drill_0 # Simple Drill if drillcyc$ = 1, ptime_drill_1 # Peck Drill if drillcyc$ = 2, ptime_drill_2 # Chip Break Drill if drillcyc$ = 3, ptime_drill_3 # Tapping if drillcyc$ = 4, ptime_drill_4 # Bore, feed out, Reaming if drillcyc$ = 5, ptime_drill_0 # Bore, stop, rapid out, SAME movements as "Simple Drill" if drillcyc$ = 6, ptime_drill_0 # Bore, fine, SAME movements as "Simple Drill" if drillcyc$ = 7, ptime_drill_0 # Bore, standard, SAME movements as "Simple Drill" ] # Time calculations by feed type if gcode$ = zero, ptimer #RAPID time and length calc if gcode$ = one | gcode$ = two | gcode$ = three, ptimel #FEED time and length calc !x$, !y$, !z$, !fr_pos$ #Update previous [prv_?] variables ptime_drill_0 # Simple Drill lengths # Move length with FEED, straight down to hole depth len = abs(refht$ - depth$) ptimel # Move length with RAPID, IN & OUT of hole if initht$ <> refht$, [ # Rapid between Initial & Retract, Move TO hole len = abs(initht$ - refht$) # Rapid between Initial & Depth, Move OUT of hole len = len + abs(initht$ - depth$) ptimer ] else, [ # Rapid between Retract & Depth, ONLY Move OUT of hole len = abs(refht$ - depth$) ptimer ] # Convert and add dwell$ seconds to total minutes if dwell$ <> zero, total = total + (dwell$ / 60) ptime_drill_1 # Peck Drill # Move length with FEED, hole depth drill_length_f = abs(refht$ - depth$) actual_drl_depth = peck1$ while actual_drl_depth < drill_length_f, [ # FEED moves in hole len = peck1$ + peck_safe_dist ptimel # RAPID moves in hole len = (actual_drl_depth * 2) - peck_safe_dist ptimer actual_drl_depth = actual_drl_depth + peck1$ ] # Last cut, it's equal or less than peck1$ len = (drill_length_f - actual_drl_depth) + peck_safe_dist + peck1$ ptimel # Move length with RAPID, IN & OUT of hole if initht$ <> refht$, [ # Rapid between Initial & Retract, Move TO hole len = abs(initht$ - refht$) # Rapid between Initial & Depth, Move OUT of hole len = len + abs(initht$ - depth$) ptimer ] else, [ # Rapid between Retract & Depth, ONLY Move OUT of hole len = abs(refht$ - depth$) ptimer ] # Convert and add dwell$ seconds to total minutes if dwell$ <> zero, total = total + (dwell$ / 60) ptime_drill_2 # Chip Break Drill # Move length with FEED, hole depth drill_length_f = abs(refht$ - depth$) actual_drl_depth = peck1$ while actual_drl_depth < drill_length_f, [ # FEED moves in hole len = peck1$ + peck_safe_dist ptimel # RAPID moves in hole, only chip break moves - BACKWARD len = peck_safe_dist ptimer actual_drl_depth = actual_drl_depth + peck1$ ] # Last cut, it's equal or less than peck1$ len = (drill_length_f - actual_drl_depth) + peck_safe_dist + peck1$ ptimel # Move length with RAPID, IN & OUT of hole if initht$ <> refht$, [ # Rapid between Initial & Retract, Move TO hole len = abs(initht$ - refht$) # Rapid between Initial & Depth, Move OUT of hole len = len + abs(initht$ - depth$) ptimer ] else, [ # Rapid between Retract & Depth, ONLY Move OUT of hole len = abs(refht$ - depth$) ptimer ] # Convert and add dwell$ seconds to total minutes if dwell$ <> zero, total = total + (dwell$ / 60) ptime_drill_3 # Tapping # Moving length added directly to "feed length" drill_length_f = (abs(refht$ - depth$)) * 2 llen = llen + drill_length_f # Moving time added directly to "Total FEED time", minutes tot_ltime = tot_ltime + ((drill_length_f / (feed / speed)) / speed) # Move length with RAPID, IN & OUT of hole if initht$ <> refht$, [ # Rapid between Initial & Retract, Move TO hole & OFF from hole len = (abs(initht$ - refht$)) * 2 ptimer ] # Convert and add dwell$ seconds to total minutes if dwell$ <> zero, total = total + (dwell$ / 60) ptime_drill_4 # Bore, feed out, Reaming # Move length with FEED, hole depth len = (abs(refht$ - depth$)) * 2 ptimel # Move length with RAPID, IN & OUT of hole if initht$ <> refht$, [ # Rapid between Initial & Retract, Move TO hole & OFF from hole len = (abs(initht$ - refht$)) * 2 ptimer ] # Convert and add dwell$ seconds to total minutes if dwell$ <> zero, total = total + (dwell$ / 60) ptime_drill_XY # Moves between additional points sav_gcode = gcode$ gcode$ = zero ptime_calc gcode$ = sav_gcode # ----------------------------- Okay, now you have to change some basic postblock: See inserted "psetup" call and AUX file stuff psof$ #Start of file for non-zero tool number pcuttype toolchng = one # # "()", e$ # psetup # # Open temp AUX file & set output to 2 snameaux$ = snamenc$ + "_TEMP" newaux$ subout$ = 2 # OK, now we have to insert into some other basic postblocks: See "ptooldata" and "psetup" ptlchg$ #Tool change pcuttype toolchng = one # ptooldata #Total ending data for tool (Path Length and Times) # psetup # if mi1$ = one, #Work coordinate system OK, now we use "ptime_calc" postblock: In 3D moves: pncoutput #Movement output pcom_moveb comment$ pcan ptime_calc if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning if gcode$ = zero, prapidout if gcode$ = one, plinout if gcode$ > one & gcode$ < four, pcirout if mr_rt_actv, #Restore absolute/incremental for G51/G68 [ absinc$ = sav_absinc mr_rt_actv = zero ] pcom_movea And in drilling too: pdrlcommonb #Canned Drill Cycle common call, before if sav_dgcode = 81, [ result = newfs (two, zinc) if drillcyc$ = three, drlgsel = fsg1(-ss$) + drillcyc$ * two else, drlgsel = fsg2(dwell$) + drillcyc$ * two if initht$ <> refht$, drillref = zero else, drillref = one prv_refht_a = c9k prv_refht_i = c9k prv_dwell$ = zero ] if cuttype = three, sav_dgcode = gcode$ else, z$ = depth$ if cuttype = one, prv_zia = initht$ + (rotdia$/two) else, prv_zia = initht$ pcom_moveb feed = fr_pos$ comment$ pcan #5 axis must map the true Z, correct Z calculation here if cuttype = three, [ prv_zia = zabs + (-depth$) + initht$ zia = fmtrnd(zabs) zinc = zia - prv_zia ] ptime_calc pcanceldc$ #Cancel canned drill cycle ptime_calc result = newfs (three, zinc) z$ = initht$ if cuttype = one, prv_zia = initht$ + (rotdia$/two) else, prv_zia = initht$ pxyzcout !zabs, !zinc prv_gcode$ = zero pcan pcan1, pbld, n$, "G80", strcantext, e$ pcan2 Annnnd at the end we do a tricky stuffy in peof: @ end we merge our time calc into our NC file and also merge the posted sub back as NC code. See commented and old "mergesub" and "mergeaux" stuff, use mine at very EndOfFile: peof$ #End of file for non-zero tool pretract comment$ #Remove pound character to output first tool with staged tools #if stagetool = one, pbld, n, *first_tool, e n$, "M30", e$ #mergesub$ #clearsub$ #mergeaux$ #clearaux$ "%", e$ # subout$ = 0 ptooldata #Total ending data for tool (Path Length and Times) sav_spc = spaces$ spaces$ = 0 # "( *** Path Length/Time *** )", e$ "( Rapid Path Lengh = ", *rlen_total, "mm )", e$ "( Feed Path Length = ", *llen_total, "mm )", e$ ttltime = total #Transfer TOTAL program time "( Full Cycle Time = ", ptimeout, " )", e$ #Program Total time output ttltime = tot_rtime "( Full Rapid Time : ", ptimeout, " )", e$ ttltime = tot_ltime "( Full Feed Time : ", ptimeout, " )", e$ "()", e$ "()", e$ # spaces$ = sav_spc # mergeaux$ clearaux$ Sorry for the long post... Edit: ptimeout had a bug: else, [ result = newfs(five, tsec) #Output 'HOURS' if thrs > zero, *thrs, "h " # <<<---- WAS: thrs > one #Output 'MINUTES' and 'SECONDS' *tmin, ":", *tsec ]

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