Zaffin_D
Verified Members-
Posts
374 -
Joined
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Everything posted by Zaffin_D
-
Yes, this is much easier in 2017 and later. You should ask your reseller for information about 2017's enchanced tool table.
-
Table instead of BUFFER...
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
Just so you know, in 2017 or later you can use the tt_count$ variable or times_used = opinfo(52, 0). -
Though I disagree that creating (and maintaining) two ops for this is the best solution, that's not why I'm responding. You said you've been bitten by a change CNC made before, was it a change made to MP.dll? Can you shoot me an email about this? I'd like to help if I can.
-
Encrypted PST File - Can It be re-encrypted?
Zaffin_D replied to Mick's topic in Post Processor Development Forum
That's not correct according to the documentation; Please make sure to keep a backup of your post file! -
PARAMETER FOR ALL DEPTH, FINAL DEPTH
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
I don't disagree, as you've seen my posts are as basic as it gets. I'm sharing information, not just for PcRobotic, but for any one that has the same question in the future. -
My HASP is at the office, but I think you could set a flag to suppress the output. Set the flag by checking the total number of passes against the number of passes completed. The total number of passes should be parameter 15560 + parameter 15380. You can track the number of passes completed by incrementing a counter at null tool change if the op_id$ is the same. On night this week I'll bring my HASP home and work up an example.
-
PARAMETER FOR ALL DEPTH, FINAL DEPTH
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
Even if the question isn't practical, it shows how powerful MP is. There's not much you can't do in MP, especially when you consider that MP can call a hook and access Mastercam's API. -
PARAMETER FOR ALL DEPTH, FINAL DEPTH
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
41773, but it's a new parameter for Mastercam 2018. -
adding / editing tool comments
Zaffin_D replied to DCOPE17's topic in Post Processor Development Forum
Are you using Mastercam 2017 or later? If so, you can use opinfo and do something like the below example in pheader$. stoolPathComment = opinfo(15239, 0) You'll have to initialize stoolPathComment somewhere in the post in order for the above line to work. <LeftMargin>stoolPathComment : "" I usually set up a post block that I call whenever I start a new op. The post your using probably has something comparable. #region Tool Path Comment fmt "OP NUMBER - " 4 opNumber fmt "TOOLPATH MAX Z DEPTH: " 3 toolpathZMin stoolPathComment : "" pToolPathComment opNumber = opinfo(15240, 0) stoolPathComment = opinfo(15239, 0) toolpathZMin= opinfo(19, 0) n$, scommentStart, *opNumber, [if stoolPathComment <> sBlank, "|", stoolPathComment], scommentEnd e$ n$, scommentStart, *toolpathZMin, scommentEnd e$ #endregion End Tool Path Comment Hope that helps, Jeff -
This is not an Agie vision machine. The New CUT series uses GF's new CUT 2 HMI and is closer to the Charmille side of the family. Mastercam doesn't have a post that outputs a job (.mjb) file. However, if you are willing to do the sequencing at the machine you can use a post that generates a Charmille ISO file. That's how I did it when I worked for GF, but I was on the milling side of the family, so I didn't get much wire time. Thanks, Jeff
-
Line number change based on tool change for lathe
Zaffin_D replied to BBprecise's topic in Post Processor Development Forum
In hindsight, a better way would be to use the tt_op_id$ value as the 'key' for the line number in the stack. #Start Array stackOpID : 0 stackLine : 0 #End Array pushResult : 0 fstack 1 2 ptooltable$ if (tt_count$ = TOOL_NOT_OUTPUT@), [ return = fprm(ONE@, OP_PARAMETERS@) toolDiameter = rparsngl(s1013, TWO@) stoolString = ucase(stoolString) n$, scommentStart, *tt_tool$, "|", *tt_tlngno$, "|", stoolString, "|", *toolDiameter, "|", pGetToolsMinimumZ(tt_tool$), no_spc$, scommentEnd e$ stackOpID = tt_op_id$ stackLine = tt_tlngno$ # This could be any value you'd like, it is now 'keyed' to the op_id$ value in the stack stackOPID = push(1, pushResult, 0) ] We'd also have to make a slight change to our pGetLineNumber post block #Start Array stackSize : 0 popResult : 0 #End Array #Start Array opID : 0 lineNumber : 0 #End Array currentOpID : 0 fmt "N" 4 lineNumber pGetLineNumber(currentOpID) # Pass the current op_id$ value to pGetLineNumber as an argument; pGetLineNumber(op_id$) stackSize = pop(1, popResult, 0) while (stackSize > 0), [ opID = pop(1, stackSize, 5) if (currentOpID = opID), [ stackSize = 0 *lineNumber, e$ ] else, stackSize = stackSize - 1 ] -
Line number change based on tool change for lathe
Zaffin_D replied to BBprecise's topic in Post Processor Development Forum
I think this would work with some minor tweaks (depending on what you wanted the line numbers to be). In this example we'll make them the offset. #region Tooltable s1013 : "" stoolString : "" fprmtbl 1 2 1013 s1013 10094 stoolString fmt "DIAMETER - " 3 toolDiameter fmt "MAX Z DEPTH: " 3 toolZMin fmt "TOOL NUMBER - " 4 tt_tool$ fmt "N" 4 tt_tlngno$ #Start Array stackTool : 0 stackLine : 0 #End Array pushResult : 0 fstack 1 2 ptooltable$ if (tt_count$ = TOOL_NOT_OUTPUT@), [ return = fprm(ONE@, OP_PARAMETERS@) toolDiameter = rparsngl(s1013, TWO@) stoolString = ucase(stoolString) n$, scommentStart, *tt_tool$, "|", *tt_tlngno$, "|", stoolString, "|", *toolDiameter, "|", pGetToolsMinimumZ(tt_tool$), no_spc$, scommentEnd e$ stackTool = tt_tool$ stackLine = tt_tlngno$ stackTool = push(1, pushResult, 0) ] opZMin : 0 tool : 0 toolIndex : 0 opToolNumber : 0 pGetToolsMinimumZ(tool) toolIndex = ZERO@ toolZMin = ZERO@ opToolNumber = opinfo(10002, toolIndex) while (opToolNumber <> QUERY_INVALID@), [ if (opToolNumber = tool), [ opZMin= opinfo(19, toolIndex) if (opZMin < toolZMin), [ toolZMin = opZMin ] ] toolIndex = toolIndex + ONE@ opToolNumber = opinfo(10002, toolIndex) ] *toolZMin #endregion End Tooltable Once you have the tool numbers and the line numbers in the stack, you could use something like the below post block to write them out. #Start Array stackSize : 0 popResult : 0 #End Array #Start Array toolNumber : 0 lineNumber : 0 #End Array fmt "N" 4 lineNumber matchFound : no$ pGetLineNumber matchFound = no$ stackSize = pop(1, popResult, 0) while (stackSize > 0), [ toolNumber = pop(1, stackSize, 5) if (t$ = toolNumber), matchFound = yes$ if (matchFound), [ stackSize = 0 *lineNumber, e$ ] else, stackSize = stackSize - 1 ] This would need to be refined a bit to meet your goals. I'd be happy to talk more about solving this problem, send me an email if you'd like. -
Line number change based on tool change for lathe
Zaffin_D replied to BBprecise's topic in Post Processor Development Forum
C^Millman, If you move to the enhanced tool table your dependence on buffers will go down. Could even use a stack. Thanks, Jeff -
Have you tried tox$, toy$ and toz$? They will give you the tool plane origin values. in your case; n$, <your rapid var>, *tox$, *toy$, e$ If you want the WCS origin values use t_orgin_x$, t_orgin_y$, and t_orgin_z$. Jeff
-
The GFMS Mikron mills are slick. I used to work for them in applications, so I may be biased.
-
Hello, You can review this thread on CNC Software's forum for more information. Thanks, Jeff
-
param12207 is initialized the same way you would initialize any non-global variable in MP; "(left margin)param12207 : 0" Try this; Open a new file and load your machine - DO NOT create any geometry Press the F9 key to display the axis lines Create a circle mill toolpath, and select the origin point for the geometry Under the toolpath's cut parameters, enter a diameter in the "Circle diameter" text box Post the file and see if the diameter entered in step 4 is present in the posted file.
-
The parameter number you're using should not work, as it's the op_id$ value. Have you tested this thoroughly? Is there a chance that you happened to post op_id$ 6 when testing?
-
Parameter for TOTAL RUN TIME
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
There is no parameter number for that value. However, you can estimate the total time in the post. Look at MIll2.set (installed with Mastercam) for an example of how to calculate the total time. -
Tool list at the end of M30
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
I just like 'modern' MP, which is good because I do post support. -
Tool list at the end of M30
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
Yes, it's quite simple really. First, find the initialization for tooltable$ and comment it out. Once commented out, replace it with x_tooltable$ and initialize it to 1 #tooltable$ : 3 #Removed, no longer needed with x_tooltable$ x_tooltable$ : 1 # Next, find and comment out pwrtt$ and pwrttparam$. With the enhanced tool table they are no longer needed. #pwrtt$ #Pre-read NCI file # if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable #pwrttparam$ #Pre-read parameter data # #"pwrttparam", ~prmcode$, ~sparameter$, e$ # if prmcode$ = 15346, comp_type = rpar(sparameter$, 1) #Cutter compensation type - 0=computer, 1=control, 2=wear, 3=reverse wear, 4=off # if prmcode$ = 10010, xy_stock = rpar(sparameter$, 1) #Capture stock to leave (XY) # if prmcode$ = 10068, z_stock = rpar(sparameter$, 1) #Capture stock to leave (Z) Now we need to merge the logic from pwrtt$ and pwrttparam$ into a new post block, ptooltable$. So, before we had the ptooltable post block that was called from pwrtt$. #ptooltable #Tooltable output # sopen_prn, *t$, 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 #Reset stock to leave values # z_stock = 0 #Reset stock to leave values Now we have everything in the new post block, ptooltable$ (note the dollar sign) ONE@ : 1 s1013 : "" fmt "TOOL DIA. - " 1 toolDiameter ptooltable$ if tt_count$ = ONE@, [ comp_type = opinfo(15346, 0) xy_stock = opinfo(10010, 0) z_stock = opinfo(10068, 0) s1013 = opinfo(1013, 0) toolDiameter = rparsngl(s1013, 2) sopen_prn, *tt_tool$, sdelimiter, pstrtool, sdelimiter, *tt_tlngno$, [if comp_type > 0 & comp_type < 4, sdelimiter, *tt_offset$, sdelimiter, *scomp_type, sdelimiter, *toolDiameter], [if xy_stock <> 0 | z_stock <> 0, sdelimiter, *xy_stock, sdelimiter, *z_stock], sclose_prn, e$ ] We also have to change the pstrtool post block to use the new opinfo function. stoolString : "" pstrtool stoolString = opinfo(10094, 0) if stoolString <> sblank, [ stoolString = ucase(stoolString) stoolString ] What that done, we can call x_tooltable$ from any post block and start tool table processing. -
Tool list at the end of M30
Zaffin_D replied to PcRobotic's topic in Post Processor Development Forum
If you are in 2017/2018/2019, you don't need a buffer to do this. The new tool table (x_tooltable$) can be called from any post block and is much more efficient than the old pwrtt$ method. Implementing x_tooltable$ in your post may take some time, but it's a much faster way to access tool table data. -
Current MasterCam Post Documentation
Zaffin_D replied to Guess_who's topic in Post Processor Development Forum
Updated post documentation is available, you should contact your Mastercam reseller.- 1 reply
-
- 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.