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:

Bayron

Verified Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Bayron

  1. Like I answered you privately not something easily undertaken. Things go on with the mp.dll and mp.pst that does some things behind the scenes. Might try the debugger to find what is the exact variable capturing and then outputting the value. Might could capture that and then buffer it our or something like that. but tons of extra work for a process I am really not sure you need. Not sure why the standard canned cycle could not be modified to do what you are after and be done.

     

    Dear Crazy^Millman, thank you very much

  2. Hi Bayron,

     

    Can you upload a Zip to Go file that contains a sample Mastercam file, and the post that you are working on?

     

    What version of Mastercam are you writing this post for? I believe X6 had a re-write of the Lathe canned cycles. There are some switch strings at the top of the post that can be used to configure the output for the canned cycle. I think that only changes the output of Cutter Comp, and sets if the comp value is turned on inside the cycle or not.

     

    When the values are being calculated, I believe these variables hold the start and end positions, but you'll have to check and see where they get their values from:

     

    lcc_xcst	 : 0	 #Lathe canned cycle contour start position
    lcc_ycst	 : 0	 #Lathe canned cycle contour start position
    lcc_zcst	 : 0	 #Lathe canned cycle contour start position
    lcc_xcend : 0	 #Lathe canned cycle contour end position
    lcc_ycend : 0	 #Lathe canned cycle contour end position
    lcc_zcend : 0	 #Lathe canned cycle contour end position
    

     

    The values are probably set using a 'vequ' function. "Vector Equate" (vequ) is a function that copies the values of three sequential variables, and loads them into three other consecutive variables.

     

    That is what this line does:

     

    lcc_xcst = vequ (copy_x)
    

     

    To give you any more tips for debugging this, I'd need to see your sample files...

     

    Hi Colin

     

    Thank you, your answer gave me many ideas, I'll do some tests.

     

    Dear Colin how do I send you the Zip to Go?

     

    Thank you again.

  3. Hello guys.

     

    I am studying a way to configure the turning cycle G68 XZCDLMKFHSE Q.

     

    I managed to set almost the whole cycle, but the value of X and Z not yet. X and Z are the start profile.

     

    I know the generic pos mastercam calculates this, but I can not capture these values​​. Can someone give me a light on this.

     

     

    G0 X110. Z2.566

    F.2

    G68 X52.634 Z.097 C2. D.2 L.4 M.2 S10 E20 Q220 (Correctly)

    G68 X0. Z0. C2. D.2 L.4 M.2 S10 E20 Q220 (Wrongly)

    N10 X52.634

    G1 Z.097

    X55.297 Z-1.234

    G3 X55.765 Z-1.8 R.8

    G1 Z-7.372

    Z-24.517

    Z-32.604

    Z-58.773

    X63.639 Z-69.42

    X97.127 Z-76.026

    G3 X97.862 Z-76.32 R.8

    G1 X99.723 Z-77.687

    G3 X100. Z-78.137 R.8

    G1 Z-104.726

    N20 X110.

    G0 Z2.566

    G0 X300. Z100.

     

    The values ​​that are coming X0 and Z0 should be X52.634 Z.097.

     

    I know that somehow these values ​​can be captured in this excerpt from post processor. But do not know how. formulate and test several already failed.

     

     

    prcc_setup$ #Lathe canned cycle setup

    #Capture values from rough

    sav_iprcc = c1_ipr_actv

    sav_feedcc = c1_fr_pos

    if orient$ = one|orient$ = two|orient$ = five|orient$ = 6, lccdirx = one

    else, lccdirx = m_one

    if orient$ = one|orient$ = four|orient$ = five|orient$ = 8, lccdirz = one

    else, lccdirz = m_one

    if lathecc > zero, cc_stop_fcc = one

    else, cc_stop_fcc = zero

    #G74/G75

    if lathecc = three,

    [

    lcc_xcst = vequ (copy_x)

    if dopeckcc = zero,

    [

    depthcc = zero

    clearcc = zero

    ]

    if directcc > one,

    [

    gcodecc = four

    grvspcc = stepcc

    grvdpcc = depthcc

    ]

    else,

    [

    gcodecc = five

    grvspcc = depthcc

    grvdpcc = stepcc

    ]

    ]

    else,

    [

    if n1_cc_pos,

    [

    sav_xa = vequ(copy_x)

    #Shift for cutter comp. start position

    copy_x = copy_x + (lcc_move * lccdirx)

    copy_z = copy_z + (lcc_move * lccdirz)

    pcom_moveb

    compok = zero

    lcc_cc_pos = one

    ]

    else, lcc_cc_pos = zero

    ]

    sub_seq_typ$ = 0

     

    prcc_call_st$ #Rough canned cycle start

    if tool_op$ <> 208,

    [

    sav_subout = subout$

    sav_omitsq = omitseq$

    omitseq$ = one

    extprg$ = one

    subout$ = three

    ]

     

    prcc_call_end$ #Rough canned cycle end

     

    # Restore cc_1013 to the value it held prior to the rough

    # groove canned cycle. cc_1013 was changed in ptoolend.

    if tool_op$ = 208 | tool_op$ = 62, cc_1013$ = sav_cc_1013

    if tool_op$ <> 208,

    [

    omitseq$ = sav_omitsq

    #Close the ext file

    result = fclose (sbufname3$)

    #Open the ext file as a buffer

    #Use the size to determine the start and end sequence

    subout$ = sav_subout

    size3 = rbuf(three, zero)

    if omitseq$ = one,

    [

    ng70s = n$

    ng70e = n$ + seqinc$

    ]

    else,

    [

    if old_new_sw = zero, ng70s = n$ + seqinc$

    else, ng70s = n$ + (seqinc$ * two)

    ng70e = ng70s + (seqinc$ * (size3 - one))

    ]

    pwrite_g70

    ]

    #Setup the stock and clearance directions

    g73x = vsub (lcc_xcst,lcc_xcend)

    if old_new_sw = zero, g73x = g73x

    else, g73x = g73x * dia_mult

    g73z = g73z

    xstckcc = xstckcc * dia_mult * lccdirx

    zstckcc = zstckcc * lccdirz

    clearcc = clearcc * lccdirz

    #Write the cycle definition

    sav_feed = feed

    sav_ipr = ipr_actv$

    feed = sav_feedcc

    ipr_actv$ = sav_iprcc

    if lathecc = three,

    [

    #Setup the previous position for inc. in G74/G75 cycle

    sav_xa = vequ(xabs) #Save the cycle end

    copy_x = vequ(lcc_xcst) #The cycle start raw

    pshft_map_xa

    pxyzcout ##The cycle start in machine terms

    ps_inc_calc #Recalculate incremental

    pe_inc_calc #Update previous at start

    xabs = vequ(sav_xa) #Restore the cycle end

    ps_inc_calc #Recalculate incremental

    ]

    if old_new_sw = zero,

    [

    if gcodecc < three, pg71old

    if gcodecc = three, pg73old

    if gcodecc > three, pg74old

    ]

    else,

    [

    if gcodecc < three, pg71new

    if gcodecc = three, pg73new

    if gcodecc > three, pg74new

    ]

    if lathecc = three,

    [

    #Set the cycle end position at the original start

    copy_x = vequ(lcc_xcst) #The cycle start raw

    pshft_map_xa

    pxyzcout ##The cycle start in machine terms

    ps_inc_calc #Position at start

    pe_inc_calc #Update previous

    ps_inc_calc #Recalculate incremental

    ]

    feed = sav_feed

    ipr_actv$ = sav_ipr

    if tool_op$ <> 208,

    [

    #Bug2 is off to prevent execution crashes with long strings

    bug2$ = zero

    #Write the cycle profile, sequence are written now

    rc3 = one

    while rc3 <= size3,

    [

    #Write the lathe canned cycle profile

    string3 = rbuf (three, rc3)

    if rc3 = two,

    [

    #Add the finish spindle speed to the first move

    speed = n1_ss

    pbld, *n$, *string3, e$ #*speed,

    ]

    else,

    [

    if omitseq$ = one & rc3 = size3 + one, pbld, *n$, *string3, e$

    else, pbld, n$, *string3, e$

    ]

    ]

    #Close the buffer

    result = fclose (three)

    #Remove the ext file

    result = remove (sbufname3$)

    bug2$ = sav_bug2

    ]

     

    pfcc_call$ #G70 recall output postblock

    if cc_stop_fcc = zero,

    [

    pread_g70

    if foundcc = zero, result = mprint(sfccerror)

    ]

    no_nc_out$ = zero

    cc_stop_fcc = zero

     

    pread_g70 #Read G70 recall buffer

    foundcc = zero

    size2 = rbuf (two, zero)

    wc2 = one

    while wc2 <= size2 & foundcc = zero,

    [

    fcc_subid = rbuf (two, wc2)

    if fcc_subid = sub_op_id$,

    [

    gcodecc = zero

    ng70s = fcc_ng70s

    ng70e = fcc_ng70e

    pbld, n$, *scclgcode, *ng70s, *ng70e, e$

    foundcc = one

    ]

    ]

     

    pwrite_g70 #Write G70 recall buffer

    fcc_subid = sub_op_id$

    fcc_ng70s = ng70s

    fcc_ng70e = ng70e

    fcc_subid = wbuf (two, rc2)

     

     

    I appreciate your cooperation in my learning.

  4. Hello Colin, thanks for your support. I'm sure this will help me.

     

    I have the MP documents, but the V9, very old. I'm looking for the X7 version.

     

    Dear Colin, I have a question. How could I get access to the contents of the "Generic Fanuc 5X Mill.psd" or similar?

     

    What kind of information exist in this post-processor?

     

    Being a generic, do not understand why we do not have access to it!

     

    Thank you my friend.

  5. Hello Colin, thanks for replying to my message, I really understand that this is no easy task, but I will not give up, I can already learn a lot about post-processors for my own. I get some materials about about 5 simultaneous axes and positioned (3 + 2). I will continue studying and achieve my goal creating my post-processor. I've done many post to study and learn about it. About modulo mill-turn, I've seen many materials on it, including the already tested. It really is very good. But I have not much information about how to create more machines. Here in Brazil the current distributor does not pass on such information. But thank you for helping me.

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