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:

clifftm

Verified Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by clifftm

  1. When we use the lathe grooving finish path corner dwell (added in X4 mu1 I think) our post does not output anything to the G code File.

     

    Our dealer tells us our post could be an older one that does not provide for this setting.

     

    Maybe someone will be kind enough to answer some questions.

     

    Can anyone tell us if an explicit command is placed in the NCI file for the finish path corner dwell as it is for the rough path dwell?

     

    If not is it calculated in the post or definitions from x and z moves?

     

    Thank you

     

    We are using Mastercam X5 mu1

  2. Ah, ok I see your problem.

    The function vequ() is a Vector Math function. The function always loads values into three variables. By starting with 'zh$', you are copying the values from 'zh$' first, then the values of the next two variables after 'zh$' into two other variables. These variables that are getting loaded with values are the next two variables initialized after 'zhome'. One of these variables is probably a Command Variable that is causing the Post to call the tool change or SOF post block.

     

    Why are you using Vector Equate? Just set 'zhome = zh$' and be done.

     

    The alternative is to use an implied array, and copy the values into the array properly, as three variables.

     

    xhome : 0

    yhome : 0

    zhome : 0

     

    xhome = vequ(xh$)

     

    That will load the value from zh$ into zhome, without stepping on any other variables by accident.

     

    Hope that helps,

     

    That was it, made the changes and worked perfect.

     

    I corrected the use of vequ() but then eliminated it in favor of the simpler xhome = xh$ and zhome = zh$.

     

    Good help, thanks.

  3. I would recommend calling your Reseller for help setting this up. I have no idea what you are trying to do with capturing the home positions, but the "undesired" code is coming from the Tool Change Post Block. MPLMaster uses a different Post Block structure from CNC Software's Generic Posts.

     

    We do have a Generic Mori Seiki Post available for Lathe, that shouldn't require such extensive modifications. That really depends on exactly what you are trying to do however. Are you trying to run this with Sub Programs?

     

    Thanks for the replies, I will try to be more specific, perhaps my question should have been …

     

    Am I using the vequ() function properly to capture the zh$ in the line of code zhome = vequ(zh$) ?

    Why does “zhome = vequ(zh$)” cause the tool change post block to output the “undesired” code?

    Eliminating that line of code (or using zhome= vequ(xh$) to get the X home value) eliminates the problem.

     

    In an attempt to answer your questions…

     

    The only subs we use are for the locations of holes in C axis drilling type operations.

     

    Our post processors have worked fine with our different lathes for quite some time. We are satisfied with them for now but would be open to better methods.

     

    I recently encountered this problem when I added an error check for certain values including the X and Z home values. It checks each operation to be sure they were entered correctly. These checks work ok except for the output of “undesired code”. This error check is similar to code done by Paul Decelles from CNC Software in the “POST TRICK” thread entry Posted 10 February 2011 - 04:45 PM.

     

    Thanks again.

  4. Using Mastecam X5 mu1

     

    Hope someone can show me what I am doing wrong...

     

    We are using a modified mplmaster post for a lathe.

     

    An error Check has been added that gets the x home and z home for each operation.

     

    I can get the xh$ and zh$ value but the zh$ causes some undesired output into the G code file.

     

    The code below gets the x home value for each operation with no problem.

         xhome = vequ(xh$)
         xhome = xhome * 2  
         xhome = -xhome    
         sxhome = no2str(xhome)

     

    However when I try the following line to get the z value the undesired code appears.

     

         zhome  = vequ(zh$)

     

    When I use # to make it a remark or get the xh$ value a second time the error goes away.

    Undesired Code below............Desired Code below
    O1832...........................O1832
    N10G20..........................N10G20
    N20G97..........................N20G97
    N30G99..........................N30G99
    N40M17..........................N40M17
    N50G50X-30.1Z13.232.............N50G50X-30.1Z13.232
    N60G00T0200.....................N60G00T0200
    N70G00T0202.....................N70G00T0202
    N80M42 ------------------- undesired output
    N90G97S111M03 ------------ undesired output
    N100G50S600.....................N80G50S600
    N110G96M42S700..................N90G96M42S700
    N120M03.........................N100M03
    N130G00X-24.125Z1.05M08.........N110G00X-24.125Z1.05M08
    N140G50S600 -------------- undesired output
    N150G96M42S700 ----------- undesired output
    N160M03 ------------------ undesired output
    N170G01Z0.F.012.................N120G01Z0.F.012
    N180X-24.6794...................N130X-24.6794
    N190X-25.2794...................M140X-25.2794

  5. Using Mastecam X5 mu1

     

    Hope someone can show me what I am doing wrong...

    We are using a modified mplmaster post for a lathe.

    An error error check has been added that gets the x home and z home for each operation.

    I can get the xh$ and zh$ value but the zh$ causes some undesired output into the G code file.

     

    The code below gets the x home value for each operation with no problem.

     

    xhome = vequ(xh$)

    xhome = xhome * 2

    xhome = -xhome

    sxhome = no2str(xhome)

     

    However when I try the following line to get the z value the undesired code appears.

     

    zhome = vequ(zh$)

     

    When I use # to make it a remark or get the xh$ value a second time the error goes away.

     

    Undesired Code below Desired Code below

    O1832 O1832

    N10G20 N10G20

    N20G97 N20G97

    N30G99 N30G99

    N40M17 N40M17

    N50G50X-30.1Z13.232 N50G50X-30.1Z13.232

    N60G00T0200 N60G00T0200

    N70G00T0202 N70G00T0202

    N80M42 -------------------------- undesired output

    N90G97S111M03 -------------- undesired output

    N100G50S600 N80G50S600

    N110G96M42S700 N90G96M42S700

    N120M03 N100M03

    N130G00X-24.125Z1.05M08 N110G00X-24.125Z1.05M08

    N140G50S600 ------------------- undesired output

    N150G96M42S700 ------------- undesired output

    N160M03 ------------------------- undesired output

    N170G01Z0.F.012 N120G01Z0.F.012

    N180X-24.6794 N130X-24.6794

    N190X-25.2794 N140X-25.2794

  6. Thank you for replying...

     

    I adjusted the loop counter to start at zero as you mentioned.

    I changed the operation number display to start at 1.

     

    I loaded a mill .MCX file and GetJobInformation.vbs worked with the corrections you mentioned.

     

    I do get the problem with my lathe .MCX files.

     

    When using a lathe .MCX file the tool numbers and operation comments display correctly.

     

    The remaining values however do not display correctly for a lathe.

     

    I was able to add case statements to catch the lathe operation types.

     

    I would appreciate you pointing me in the right direction.

     

    Thanks again

  7. Our dealer contacted Mastercam. Their response is below.

     

    _______

    I did a quick look at this and it appears that this is a bug in the VBScript API in Mastercam.

    If you run this script on a part file with multiple operations it will report the correct information on all of the operations, except for one.

    (I get the same result with X4-MU3 as I do with X5)

     

    For your reference, this issue has been logged as #00088663

    _____________

     

    Thanks

  8. I am new to mastercam and looking for ways to create setup sheets and tool lists.

     

    I tried the sample VB Script "GETJOBINFORMATION.VBS" but it did not report all values.

     

    I need the GetToolDiameterOffsetNumber(ToolNumber) function but it returns only zero.

     

    The GetToolName(ToolNumber) function returns "TOOL N/A".

     

    I think these values are in my .MCX file because they output in my post.

     

    I have included sample code below, what am I doing wrong?

     

    My reseller says they do no support VB and to try posting here.

     

    Thanks

     

    Call Main()

     

    Sub Main()

    'Dim intOperations, intOpCount,

    Dim nOpID

    Dim ToolNumber

    Dim tdon

    Dim tnam

     

     

    ' get the id of the first operation

    nOpID = GetFirstOperationID("")

     

    Do

    ' get the tool number using the current operation

    ToolNumber = GetToolNumberFromOperationID("", nOpID)

    ShowString(nOpID & " ToolNumber: " & ToolNumber)

     

    tdon = GetToolDiameterOffsetNumber(ToolNumber) 'Get the tool diameter offset number of a tool

    ShowString(nOpID & " Tool Diameter Offset Number: " & tdon)

     

    tnam = GetToolName(ToolNumber)'Get the tool file name of a tool

    ShowString(nOpID & " Tool Name: " & tnam)

     

    nOpID = GetNextOperationID() ' get the next operation's id

    Loop While(nOpID <> -1)

     

    End Sub

  9. Any help appreciated...

     

     

    Mastercam X4 MU3, Lathe with solids

     

    The insert names in my tooltable do not change when the tool changes. In the example below all tools show an insert CNGA-643. The insert for tool 5 however should be DNG-433.

     

    It displays correctly in the comments later in the program. See example below.

     

     

    #-- tool table output in nc code

    (TOOL - 2 - LATHE TOOL 79 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 2 - LATHE TOOL 79 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 2 - LATHE TOOL 79 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 5 - LATHE TOOL 35 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 5 - LATHE TOOL 35 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 2 - LATHE TOOL 79 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 2 - LATHE TOOL 79 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

    (TOOL - 5 - LATHE TOOL 35 - OFFSET - 0 - INSERT - CNGA-643 - HOLDER - DCLNR-206D)

     

     

    #-- nc output at toolchange comment ----

    (TOOL - 5 OFFSET - 6)

    (LATHE TOOL 35 INSERT - DNG-433)

     

    #---POST code pertaining to the stinsert2 variable ----

     

    pparameter$ #Information from parameters

    #"pwrttparam", ~prmcode$, ~sparameter$, e$

    if prmcode$ = 20103, stinsert2 = sparameter$

    if prmcode$ = 20110, stholder2 = sparameter$

    if prmcode$ = 10124, g71type = rpar(sparameter$,1)

    result = fprm (abs(lathecc))

     

    ptoolcomment #Comment for tool

    if tool_info = 1 | tool_info = 3,

    [

    tnote = abs(t$)

    toffnote = tloffno$

    strtool$ = ucase(strtool$)

    stinsert2 = ucase(stinsert2)

    !spaces$

    spaces$ = zero

    scomm_str, *tnote, " ", *toffnote, scomm_end, e$

    if posttype$ = two, # Lathe toolpath operation

    [

    if tool_op$ = 64, # Drill operation

    scomm_str, *strtool$, scomm_end, e$

    else,

    scomm_str, *strtool$, " ", *stinsert, *stinsert2, scomm_end, e$

    ]

    else, # Mill toolpath operation

    scomm_str, *strtool$, scomm_end, e$

    spaces$ = prv_spaces$

    ]

     

    ptooltable # Write tool table, scans entire file, null tools are negative

    tnote = abs(t$)

    toffnote = tlngno$

    stinsert2 = ucase(stinsert2)

    !spaces$

    spaces$ = zero

    if posttype$ = 2, #lathe tools

    [

    scomm_str, *tnote, ptspace, " - ", plistcomm, " - ", *toffnote, pdspace, " - ", *stinsert, *stinsert2, " - ", *stholder, *stholder2, scomm_end, e$

    #scomm_str, *tnote, ptspace, " - ", *toffnote, pdspace, " - ", *stinsert, *stinsert2, " - ", *stholder, *stholder2, scomm_end, e$

    ]

    else, #mill tools

    [

    if opcode$ = 3 | opcode$ = 16,

    [

    if tcr$ = 0, scomm_str, *tnote, ptspace, " - ", plistcomm, " - ", *tldianote, punit, pdiamspc, scomm_end, e$

    ]

    else,

    [

    if tcr$ > 0, scomm_str, *tnote, ptspace, " - ", plistcomm, " - ", *toffnote, pdspace, " - ", *tldianote, punit, pdiamspc, " - ", *tcr$, punit, scomm_end, e$

    if tcr$ = 0, scomm_str, *tnote, ptspace, " - ", plistcomm, " - ", *toffnote, pdspace, " - ", *tldianote, punit, pdiamspc, scomm_end, e$

    ]

    ]

    spaces$ = prv_spaces$

     

    thanks

    Mark

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