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:

HWACHEON HI-TECH350 Lathe post


MSL
 Share

Recommended Posts

Hi,

 I'm modifying a post for Hwacheon HI-Tech350 Lathe. I need to output H value for axis substitution. The H is C's  incremental address.Can someone help me on this please? below is the G-code sample. Thank you.

 

 

N3(TOOL - 3 OFFSET - 3)

( 1/8 FLAT ENDMILL)

(HWACHEON HI-TECH350 YSMC)

(MACHINE GROUP-1)

G0G18G40G80G99

G54

G0G28U0

G28V0

G53Z-8.5

N3 T0303

G18 G98

M28

G28 C0

M8

M39(MAIN CLAMP OFF)

G0 C0.

M38(MAIN CLAMP ON)

G0 X1.2075 Z-.2895 S4200 M103

G18 H0. W0.

G07.1 C.304

G1 X1.1075 C1.235 F500.

X.6887 F3.

Z-2.6163 H-1064.367 F15.

Z-2.4849

Z-.2895 H1004.26

C1.235

Z-.2775 C12.662

Z-2.6343 H-1078.055

Z-2.4769

Z-.2775 H1006.074

C12.662

Z-.2655 C24.088

Z-2.6522 H-1091.743

Z-2.4689

Z-.2656 H1007.845

Z-.2655 C300.232

C300.289

C24.088

Z-.2625 C26.628

Z-.2626 C26.901

Z-.2628 C26.795

Z-2.656 H-1094.697

 

Link to comment
Share on other sites

Sorry, but sample code is a little odd why are you switching between Absolute and Incremental output? What post are using as a base post? I have built 4 different variants of posts for these machines years ago.

 

Look in the pcout and pfcout for result = nwards(strc, cabs) one of these section will need to be modified to output the H for the Sub Spindle. If you are not using a lower turret then you should be okay, but if you are using a lwoer turret on the right spindle be aware of the bug still present where a trick has to be used to get output in the Axis Columns to get correct output. Jimmy Wakeford helped me years ago and you can see the trick with the _ron added to the 4th section of the code.

#Columns-    ABCDEFGH.IJKLMNOPQ
scase_br_c1  : "11000222.111111111"  #Bottom turret/Right spindle, Turning cut
scase_br_c2  : "11000012.111111111"  #Bottom turret/Right spindle, Right Face cut
scase_br_c_2_ron : "11110012.011111111"  #Bottom turret/Right spindle, Left Face cut
scase_br_c_2 : "11110012.111111111"  #Bottom turret/Right spindle, Left Face cut
scase_br_c3  : "11010102.111111111"  #Bottom turret/Right spindle, Cross cut (cuttype = 3)
scase_br_c3r : "11010102.111111111"  #Bottom turret/Right spindle, Reverse Cross cut (cuttype = -3)
scase_br_c4c : "11000222.111111111"  #Bottom turret/Right spindle, Y axis subs. Cycle
scase_br_c4  : "11000222.111111111"  #Bottom turret/Right spindle, Y axis subs.
scase_br_c5  : "11000222.111111111"  #Bottom turret/Right spindle, Multisurf Rotary

It had to be added here:

pltype2         #Bottom turret/Right spindle
      ##"RON_NOTE1 -------------- ",~cuttype,e$
      if cuttype = one,
        [
        #Lathe
        max_speed = max_speedl2
        min_speed = min_speedl2
        sw_string = scase_br_c1
        ]
      else,
        [
        #Mill
        max_speed = max_speedm2
        min_speed = min_speedm2
        sw_string = scase_br_c2 #case two is the default
        if cuttype =  -2,sw_string = scase_br_c_2_ron ####new _ron setting
        #if cuttype =  -2,sw_string = scase_br_c_2    ####old busted setting
        if cuttype = three, sw_string = scase_br_c3
        if cuttype = -3, sw_string = scase_br_c3r
        if cuttype = four & abs(c1_millcc) = one, sw_string = scase_br_c4c
        if cuttype = four & c1_millcc = zero, sw_string = scase_br_c4
        if cuttype = five, sw_string = scase_br_c5
        ]

and here there was a change:

psw_str_mult    #Apply sw_string to variables and strings
      ##"RON_NOTE2 ------------------------  ",~sw_string,e$z
      #c axis type
      #c_axistype = plcval (sw_string, 8)    #c_axistype comes from machine def
      if rot_index = 1, c_axistype = 3
      else,
        [
        if rot_type = 0 | rot_type = 2, c_axistype = 1
        if rot_type = 1, c_axistype = 2
        ]
      #reverse spindle
      spd_rev = plcval (sw_string, 7)
      #plane 0
      rslt_plc = plcval (sw_string, 6)
      if rslt_plc = zero,
        [
        sg02 = sxg02
        sg03 = sxg03
        sg41 = sxg41
        sg42 = sxg42
        ]
      else,
        [
        sg02 = sxg03
        sg03 = sxg02
        sg41 = sxg42
        sg42 = sxg41
        ]
      #plane 1
      rslt_plc = plcval (sw_string, five)
      if rslt_plc = zero,
        [
        sg02_1 = sxg02
        sg03_1 = sxg03
        sg41_1 = sxg41
        sg42_1 = sxg42
        ]
      else,
        [
        sg02_1 = sxg03
        sg03_1 = sxg02
        sg41_1 = sxg42
        sg42_1 = sxg41
        ]
      #plane 2
      rslt_plc = plcval (sw_string, four)
      if rslt_plc = zero,
        [
        sg02_2 = sxg02
        sg03_2 = sxg03
        sg41_2 = sxg41
        sg42_2 = sxg42
        ]
      else,
        [
        sg02_2 = sxg03
        sg03_2 = sxg02
        sg41_2 = sxg42
        sg42_2 = sxg41
        ]
      #plane 0
      rslt_plc = plcval (sw_string, three)
      rslt_upd = updstr (swstr)
      sg17 = swstr
      #plane 1
      rslt_plc = plcval (sw_string, two)
      rslt_upd = updstr (swstr)
      sg19 = swstr
      #plane 2
      rslt_plc = plcval (sw_string, one)
      rslt_upd = updstr (swstr)
      sg18 = swstr
      #plane 0, x axis
      rslt_plc = plcval (sw_string, m_one)
      pl_ax_m0x = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -2)
      pl_ax_m0y = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -3)
      pl_ax_m0z = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -4)
      pl_ax_m1x = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -5)
      pl_ax_m1y = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -6)
      pl_ax_m1z = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -7)
      pl_ax_m2x = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -8)
      pl_ax_m2y = -((rslt_plc * two) - one)
      rslt_plc = plcval (sw_string,  -9)
      pl_ax_m2z = -((rslt_plc * two) - one)
Link to comment
Share on other sites

Ron,

Thank you for your respond. The machine does not have bottom turret. It has top turret with main and sub spindle. I'm trying to use axis substitution on main spindle. The base post is Generic Fanuc 4X MT_Lathe. It was odd for me too switching between Absolute and Incremental. I got the G-code sample from Selway.

 

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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