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:

Peter - Avivi CNC Solutions

Verified Members
  • Posts

    292
  • Joined

  • Last visited

Everything posted by Peter - Avivi CNC Solutions

  1. It's an old topic but... https://www.emastercam.com/forums/topic/77802-stock-to-leave/#comment-929576
  2. Hi Tobi, please also mind that Arc Filter settings are also can affect the machine behavior. Also I would verify the machine internal parameters and settings.
  3. Hi Colin, sooo there are only 8 valid axis combinations are exits? TIA, Peter
  4. Hi, call it from pheader$ postblock. You can put it anywhere. You need to define some temp string variables like: sTL_Name sTL_String sTL_HolderName
  5. I didn't even know about pnci20000$ Learning is an endless curve... THX Zaffin!
  6. Yeah, stack(s)! Just forgotten, even if I used them :) AFAIK stack is limited to numbers only (no strings), but still they very useful. No, stack is a standalone stuff and you can define as many as you wish. I did! :) I use stacks to collect tool H/D numbers.
  7. Without knowing what your C-Hook does, I have the feeling that you have way more tools to manipulate text/NC file via C-Hook instead of a simple buffer. I've developed a NET-Hook for CIMCO MachSim and it has the option to manipulate everything outside of post, but still injects lines into NC code. JM2C Or you can try to figure out which buffer is a string buffer and re-use it for your purposes. Perhaps.
  8. I would create another string type buffer for toolplane names. You can not mix numbers and strings into 1 buffer. Well, you can, but then it's still just a string buffer with letters and numbers (not values).
  9. Might Mazak has an API like Okuma and some others have? Even 640MT is a bit oldish'
  10. Hi Roger, are you passing all the data as an array from C++/CLI to managed NET-Hook? I use similar approach to expose some Chook functions which are not available in NET-Hook, but I only pass some values, strings. I use Text.StringBuilder in one case to receive a list of Stock Model (operations) names. Is there a better approach and/or better for multiple data like this example above? TIA, Peter
  11. Manual entry and group comment are different animals. If you OK with Manual Entry as first OP, go for it. It might will be mixed up if your first (technically second in the OP list) machining operation has a comment, then it might will be mixed with first Manual Entry OP...
  12. Just came across in this topic, so... Use semicolon ";" or "enter/EOB" in group comments as "separator" pGroupComment sav_spc = spaces$ spaces$ = zero sTL_Name = groupinfo(19111) sTL_String = sTL_Name # #"Input:", *sTL_Name, e$ # while zero <> strstr(";", sTL_Name) | zero <> strstr(no2asc(13), sTL_Name), [ if zero <> strstr(";", sTL_Name), sTL_HolderName = brksps((strstr(";", sTL_Name)), sTL_Name) else, sTL_HolderName = brksps((strstr(no2asc(13), sTL_Name)), sTL_Name) sTL_String = sTL_Name sTL_Name = sTL_HolderName #Remove semicolon if strstr(";", sTL_Name) = one, [ sTL_Name = brksps(two, sTL_HolderName) sTL_HolderName = sTL_Name ] #Remove EOB if strstr(no2asc(13), sTL_Name) = one, [ sTL_Name = brksps(three, sTL_HolderName) sTL_HolderName = sTL_Name ] #Output current line from Group comment sopen_prn, sTL_String, sclose_prn, e$ ] #Output last line if strlen(sTL_Name) <> zero, sopen_prn, sTL_Name, sclose_prn, e$ spaces$ = sav_spc Or check my Note2Post stuff: https://www.youtube.com/watch?v=SBOgD3HoV60
  13. Similar question here, do we have any docs about nesting parameters? Specially I'm looking for (if I'm on the right path with my app) NestingPart.ClusterMethod As Mastercam.Nesting.Types.NestingItem(Of Integer) TIA
  14. Thank you Ron I would hangin' around more here, but... :S Thank you Jeff, great added infos. Well, you know, I would expect that CNC doing some improvements and new functions for a (good) reason, like speed up posting As we both see, it not always the case Processing time is on the second place for me, very close right after the first place
  15. I'm outputting all "D" and "H" values for each tool (if more than 1 D/H value used, like T1 - D1, D51, H1, H51), that's one of the reasons. ptooltable$ is limited for me, it "runs" only once. At the end of your post I've got lost So what should I use to achieve the same? Parameter table, opinfo query or parameter read? What's the difference between opinfo(20001, 0) and opinfo(10094, 0)? The "invalid" return has been tested (also for string return), it returns "-99999" if something goes wrong. z_min$ and z_max$ works well, I dunno' why you wouldn't expect that. I use this tooltable setup more than 70 posts, zero issue until now. Thank you for your notes and all input, Peter
  16. Mastercam 2019 tooltable, using x_tooltable$ function, buffers, stacks and postblocks with parameters. Region of buffer, stack and variables declaration: #region Buffers and variables for new tooltable #-------------------------------------------------------------------------- # Buffer - 1 TOOL DATA BUFFER #-------------------------------------------------------------------------- b1_Index : 1 # Buffer 1 - Index b1_ToolNo : 0 # Buffer 1 - Tool number b1_ToolDia : 0 # Tool diameter b1_ToolCornerRad : 0 # Tool corner radius b1_ToolTipAngle : 0 # Tool tip angle b1_ToolType : 0 # Tool type (mill, drill) b1_ToolStickOut : 0 # Tool stickout from holder b1_ToolLenOffs : 0 # Buffer 1 - Tool length offset b1_ToolDiaOffs : 0 # Buffer 1 - Tool diameter offset b1_ToolCompType : 0 # Buffer 1 - Cutter compensation - 0=Computer, 1=Control, 2=Wear, 3=Reverse Wear, 4=Off b1_PlaneOffsetNo : 0 # Buffer 1 - Tool plane number b1_Zmax : 0 # Buffer 1 - Tool Z maximum value by operation b1_Zmin : 0 # Buffer 1 - Tool Z minimum value by operation rc1 : 1 wc1 : 1 size1 : 0 fbuf 1 0 13 0 0 sbufname1$ = "D:\buffer_file_ToolData.txt" # -------------------------------------------------------------------------- # Buffer - 3 TOOL NAME # -------------------------------------------------------------------------- rc3 : 1 wc3 : 1 size3 : 0 fbuf 3 0 255 0 1 sbufname3$ = "D:\buffer_file_ToolName.txt" # TooNumber follow up stack #1 t_1 : 0 # first field in record fstack 1 1 0 # define stack #1 with 1 field per record # LengthOffset follow up stack #2 h_1 : 0 # first field in record fstack 2 1 0 # define stack #2 with 1 field per record # DiameterOffset follow up stack #3 d_1 : 0 # first field in record fstack 3 1 0 # define stack #3 with 1 field per record # -------------------------------------------------------------------------- s_ToolName : "" fszamlalo : 0 b1_MaxZout : 0 b1_MinZout : 0 temp_size : 0 temp_s_size : 0 temp_counter : 0 temp_s_counter : 0 temp_counter_2 : 0 prev_ToolNumber : 0 ToolOut : yes$ OffsOut : yes$ FirstOffs : yes$ sspace : " " separatorline : "---------------------------------------------------------" fmt "T" 4 b1_ToolNo fmt "H" 4 b1_ToolLenOffs fmt "D" 4 b1_ToolDiaOffs fmt "Zmax:" 2 b1_MaxZout fmt "Zmin:" 2 b1_MinZout fmt "Dia:" 2 b1_ToolDia fmt "Rad:" 2 b1_ToolCornerRad fmt "L:" 2 b1_ToolStickOut fmt "Ang:" 2 b1_ToolTipAngle #endregion Region of al tooltable postblocks: #region NEW Tool table output # -------------------------------------------------------------------------- # Tool Table # -------------------------------------------------------------------------- ptooltable$ # b1_ToolNo = tt_tool$ sparameter$ = opinfo(1013, 0) b1_ToolDia = rparsngl(sparameter$, 2) b1_ToolCornerRad = rparsngl(sparameter$, 3) sparameter$ = opinfo(20007, 0) b1_ToolStickOut = rparsngl(sparameter$, 12) b1_ToolLenOffs = tt_tlngno$ sparameter$ = opinfo(20004, 0) b1_ToolType = rparsngl(sparameter$, 2) b1_ToolTipAngle = rparsngl(sparameter$, 8) b1_ToolDiaOffs = tt_offset$ b1_ToolCompType = tt_cc_pos$ b1_PlaneOffsetNo = tt_workoffs$ b1_Zmax = z_max$ b1_Zmin = z_min$ b1_Index = wbuf(one, wc1) b1_Index = b1_Index + one # if opinfo(20001, 0) <> -99999, s_ToolName = opinfo(20001, zero) s_ToolName = wbuf(three, wc3) # pToolTable_NEW size1 = rbuf(one, zero) rc1 = one rc3 = one prev_ToolNumber = m_one # no_spc$, sopen_prn, no_spc$, separatorline, no_spc$, sclose_prn, e$ # #Write tool table while rc1 <= size1, [ b1_Index = rbuf(one, rc1) s_ToolName = rbuf(three, rc3) # #Check tool output (toolnumber in stack) pCheckToolInList(b1_ToolNo, !ToolOut) # if ToolOut, [ if b1_ToolType > 9, no_spc$, sopen_prn, *b1_ToolNo, pToolNoSpace, no_spc$, ":", *s_ToolName, pToolCommSpace, *b1_ToolDia, pCornRadOut(b1_ToolCornerRad), pZminOut(b1_ToolNo, rc1), pAllHOut(b1_ToolNo, rc1), pAllDOut(b1_ToolNo, rc1), sclose_prn, e$ else, no_spc$, sopen_prn, *b1_ToolNo, pToolNoSpace, no_spc$, ":", *s_ToolName, pToolCommSpace, *b1_ToolDia, pZminOut(b1_ToolNo, rc1), pAllHOut(b1_ToolNo, rc1), pAllDOut(b1_ToolNo, rc1), sclose_prn, e$ #Put toolnumber into #1 stack t_1 = b1_ToolNo t_1 = push(one, result) ] ] # no_spc$, sopen_prn, no_spc$, separatorline, no_spc$, sclose_prn, e$ pCheckToolInList(ToolNo, OutPutTool) temp_size = pop(one, result, zero) temp_counter = one OutPutTool = yes$ # while temp_counter <= temp_size, [ t_1 = pop(one, temp_counter, five) if ToolNo = t_1, [OutPutTool = no$, temp_counter = c9k] temp_counter = temp_counter + one ] pZminOut(ToolNo, ResetCounter) temp_size = rbuf(one, zero) temp_counter = one b1_MinZout = c9k # while temp_counter <= temp_size, [ b1_Index = rbuf(one, temp_counter) if ToolNo = b1_ToolNo, if b1_MinZout > b1_Zmin, b1_MinZout = b1_Zmin ] # *b1_MinZout # #Reset buffer values by re-read them: b1_Index = rbuf(one, (ResetCounter - one)) pAllHOut(ToolNo, ResetCounter) temp_size = rbuf(one, zero) result = pop(two, m_one, four) temp_counter = one FirstOffs = yes$ # sdelimiter, # while temp_counter <= temp_size, [ b1_Index = rbuf(one, temp_counter) if ToolNo = b1_ToolNo, [ pCheckStack(b1_ToolLenOffs, two, !OffsOut) # if not(OffsOut), [ if not(FirstOffs), [no_spc$, ","] # *b1_ToolLenOffs, # h_1 = b1_ToolLenOffs h_1 = push(two, result) FirstOffs = no$ ] ] ] #Reset buffer values by re-read them: b1_Index = rbuf(one, (ResetCounter - one)) pAllDOut(ToolNo, ResetCounter) temp_size = rbuf(one, zero) result = pop(three, m_one, four) temp_counter = one FirstOffs = yes$ # while temp_counter <= temp_size, [ b1_Index = rbuf(one, temp_counter) if ToolNo = b1_ToolNo & b1_ToolCompType > zero, [ pCheckStack(b1_ToolDiaOffs, three, !OffsOut) # if not(OffsOut), [ if FirstOffs, sdelimiter if not(FirstOffs), [no_spc$, ","] # *b1_ToolDiaOffs, # d_1 = b1_ToolDiaOffs d_1 = push(three, result) FirstOffs = no$ ] ] ] #Reset buffer values by re-read them: b1_Index = rbuf(one, (ResetCounter - one)) pCheckStack(OffsNo, StackNo, StackValue) temp_s_size = pop(StackNo, result, zero) temp_s_counter = one StackValue = no$ # while temp_s_counter <= temp_s_size, [ result = pop(StackNo, temp_s_counter, five) if OffsNo = result, [StackValue = yes$, temp_s_counter = c9k] temp_s_counter = temp_s_counter + one ] pZmaxOut(ToolNo, ResetCounter) temp_size = rbuf(one, zero) temp_counter = one b1_MaxZout = c9k * m_one # while temp_counter <= temp_size, [ b1_Index = rbuf(one, temp_counter) if ToolNo = b1_ToolNo, if b1_MaxZout < b1_Zmax, b1_MaxZout = b1_Zmax ] # *b1_MaxZout # #Reset buffer values by re-read them: b1_Index = rbuf(one, (ResetCounter - one)) pCornRadOut(Rad) if Rad > zero, *b1_ToolCornerRad pToolNoSpace sav_spc = spaces$ spaces$ = zero if b1_ToolNo < 10, sspace spaces$ = sav_spc pToolCommSpace sav_spc = spaces$ spaces$ = zero temp_counter_2 = strlen(s_ToolName) temp_counter = one while temp_counter <= (30 - temp_counter_2), [ sspace temp_counter = temp_counter + one ] spaces$ = sav_spc sdelimiter #endregion Add these lines to pheader$ postblock: pheader$ #Call before start of file x_tooltable$ = one x_tooltable$ pToolTable_NEW
  17. Yepp, my original post is from 2012. Mastercam X7, I think. Go for 2019 if you can. See my next post here:
  18. AFAIK you can not "Create" a new Manual entry OP, but definitely you can import from an external file.

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