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:

Bar puller


Diesel Tom
 Share

Recommended Posts

Hi I have a Mori Seiki SL-25 Fanuc 10T and Im having my post modified to make a bar puller work in X5 I need a posted code to test so i can give them a sample I don't even know were to start. I need the bar puller tool to be called up and to go to position un-calmp the jaws M11 then pull bar out stop then clamp the jaws M10 then bar puller retracts. Our lathe does not support canned cycles. When I use the Lathe Stock Advance in Master Cam all I get now is

%

O0000

(PROGRAM NAME - test)

(DATE - DEC. 04 2011)

(TIME - 5:43 PM)

N100 G20

(TOOL - 2 OFFSET - 71)

(BAR PULLER. INSERT - NONE)

N110 G54

N120 G0 T0271

N130 G99

N140 M05

N150 G0 X0. Z.2

N160 G28 U0. W0.

N170 M30

%

So If some one has a sample they could reply with that would be great.

 

-Does everyone just use a modified boring bar tool for the bar puller or is there a better tool to use?

-How does one make the program repeat x amount of times after the bar puller pulls each time?

Thanks for your time.

Link to comment
Share on other sites

Okay you know what you need then put up the code how you write in by hande now. You can do the counter a couple ways for the loop. You can do it through a Macro call if the machine supports macros or you can just do it with a sub to main call. Make the par puller program a sub program that you call at the end of your main program. You pull the bar our manually and then at the end of a run part call the sub program. It will run that way until out of stock. If you can use a Macro then you would just want to do a:

O1000(MAIN PROGRAM)

N10 Start of program

N690 M98 P1001

N700 M99

 

O1001(BAR PULLER PROGRAM)

M05(STOP SPINDLE)

G4 X2.(2 SECOND DELAY TO ALLOW SPINDLE TO STOP)

G00 Z -.5(RAPID OT .5 OF STOCK TO GRAB)

G00 X2.0(RAPID TO 2.0 DIAMETER)

G99(SWITCH MACHINE TO INCH PER MINUTE FEED RATE)

G1 X-.5 F20. (FEED MACHINE ON TO DIAMETER OF STOCK)

M11(OPEN JAWS)

G1 Z2.0(MOVE DISTANCE FOR NEW PART) <-- COULD USE A #110 FOR A STOCK LENGTH SO IT IS A UNIVERSAL BAR PULL PROGRAM FOR ALL STOCK

M10(CLOSE JAWS)

G4 X2.(2 SECOND DELAY TO ALLOW SPINDLE TO CLAMP) <-- MAY NOT BE NEEDED)

G00 X10.

G98(MACHINE BACK TO REV PER MINUTE)

M99

 

O1002(SUB PROGRAM)

N970 #100 = [#101 + 1] (COUNTER OF MARCO 100 TO VALUE NEEDED)

N980 IF #100 > 30 GOTO N1000 (COUNTER UNTIL END OF BAR IS REACHED) <-- COULD USE A MACRO VARIABLE HERE TO MAKE IT A UNIVERSAL PROGRAM FOR ALL STOCK

N990 M98 P1000 (KEEP CALLING MAIN PROGRAM)

N1000 M30 (END SUB PROGRAM AT COMPLETION OF BAR)

 

It has been many years since I did a bar pull so I might be a little rusty, but that should point you in the right direction. If not there are plenty of smart people on here that should help you after seeing my attempt.

 

I would check the G and M codes to make sure they are correct for your machine and also check the control. This is written for a Fanuc based machine. For Okuma you need to know the command as well for other control types.

 

HTH

Link to comment
Share on other sites

I did mine through a custom drill cycle. It really works nice. Actually, I did a drill cycle for stock over 1/2" diameter and stock under 1/2" diameter because of the way the puller engages stock differently. Figure out the Z coordinate, figure out the pull amount (input into the peck box) and huzzah. JParis had an example of a post mod to make to do it, so all props go to him. It's a fairly easy post mod to make if you know what you're doing. Do a forum search for it, and you should find it.

Link to comment
Share on other sites

Here's a sample using the bar feed against a tool stop:

 

%

O0123

(MORI SEIKI NL2500Y)

(PROGRAM NAME - TEST)

(DATE=DD-MM-YY - 05-12-11 TIME=HH:MM - 08:18)

(MCX FILE - S:.MCX-5)

(NC FILE - Z:\TEST.NC)

(MATERIAL - WHITE DELRIN - 1.75"DIA X 48" LONG)

(TOOL - 6 - ALUMINUM STOP - OFFSET - 6 - INSERT - NONE - HOLDER - NONE)

G20 M89

 

(TOOL - 6 OFFSET - 6)

(ALUMINUM STOP INSERT - NONE)

G0 G53 X-7. B0.

G0 G53 Z0.

G0 G53 Y0.

G0 T0606

G54

G18 G99

G0 Y0.

M05

(BAR FEED)

/2M98P1111

G0 Z3.

X0.

Z.02

M11

M482

M10

G0 Z3.

G0 G53 X-7.

G0 G53 Z0.

G0 G53 Y0.

M01

/M99

M30

%

Link to comment
Share on other sites

below is an example of a modified post block for bar pull.

The inhouse posts are also a good source of information.

This example uses and incremental Z value for the pull length. This makes it very easy to read/modify the program if needed.

 

 

 

 

pstck_bar_fd$ #NCI code = 902 available variables:

misc_op_z1 = stck_init_z$ + stck_clear$

misc_op_z2 = stck_init_z$ - stck_grip$

misc_op_z3 = stck_final_z$ - stck_grip$

misc_op_z4 = stck_final_z$ + stck_clear$

 

# This is only set-up for a simple bar-pull at START of program

 

bpull1 = abs(stck_init_z$ - stck_final_z$)

gcode$ = 0

toolchng = 1

n$, *sgcode, pwcs, "X0", *misc_op_z1, "M5", e$

n$, *misc_op_z2, e$

n$, "M11 (CHUCK OPEN)", e$

n$, "G04 P0.5 (PAUSE)", e$

n$, "G0", *bpull1, "(PART LENGTH + PART-OFF + FACE OFF)", e$

n$, "M10 (CHUCK CLOSE)", e$

n$, "G04 P1. (PAUSE)", e$

n$, "G0", "W.5 (CLEAR)", e$

n$, "G0", "X6. (CLEAR)", e$

 

!gcode$

bar_pull_flag = 1

toolchng = 0

Link to comment
Share on other sites
  • 2 weeks later...

Okay you know what you need then put up the code how you write in by hande now. You can do the counter a couple ways for the loop. You can do it through a Macro call if the machine supports macros or you can just do it with a sub to main call. Make the par puller program a sub program that you call at the end of your main program. You pull the bar our manually and then at the end of a run part call the sub program. It will run that way until out of stock. If you can use a Macro then you would just want to do a:

O1000(MAIN PROGRAM)

N10 Start of program

N690 M98 P1001

N700 M99

 

O1001(BAR PULLER PROGRAM)

M05(STOP SPINDLE)

G4 X2.(2 SECOND DELAY TO ALLOW SPINDLE TO STOP)

G00 Z -.5(RAPID OT .5 OF STOCK TO GRAB)

G00 X2.0(RAPID TO 2.0 DIAMETER)

G99(SWITCH MACHINE TO INCH PER MINUTE FEED RATE)

G1 X-.5 F20. (FEED MACHINE ON TO DIAMETER OF STOCK)

M11(OPEN JAWS)

G1 Z2.0(MOVE DISTANCE FOR NEW PART) <-- COULD USE A #110 FOR A STOCK LENGTH SO IT IS A UNIVERSAL BAR PULL PROGRAM FOR ALL STOCK

M10(CLOSE JAWS)

G4 X2.(2 SECOND DELAY TO ALLOW SPINDLE TO CLAMP) <-- MAY NOT BE NEEDED)

G00 X10.

G98(MACHINE BACK TO REV PER MINUTE)

M99

 

O1002(SUB PROGRAM)

N970 #100 = [#101 + 1] (COUNTER OF MARCO 100 TO VALUE NEEDED)

N980 IF #100 > 30 GOTO N1000 (COUNTER UNTIL END OF BAR IS REACHED) <-- COULD USE A MACRO VARIABLE HERE TO MAKE IT A UNIVERSAL PROGRAM FOR ALL STOCK

N990 M98 P1000 (KEEP CALLING MAIN PROGRAM)

N1000 M30 (END SUB PROGRAM AT COMPLETION OF BAR)

 

It has been many years since I did a bar pull so I might be a little rusty, but that should point you in the right direction. If not there are plenty of smart people on here that should help you after seeing my attempt.

 

I would check the G and M codes to make sure they are correct for your machine and also check the control. This is written for a Fanuc based machine. For Okuma you need to know the command as well for other control types.

 

HTH

Hi how does one get the counter to work i have my lathe working off the sub programs just as you have in your code but i cant figure out what to change to make it stop after say 20 parts my lathe just keeps cycling. Thanks for your help
Link to comment
Share on other sites

O1002(SUB PROGRAM)
N970 #100 = [#100 + 1] (COUNTER OF MARCO 100 TO VALUE NEEDED)
N980 IF #100 > 20 GOTO N1000 (COUNTER UNTIL END OF BAR IS REACHED)  <-- COULD USE A MACRO VARIABLE HERE TO MAKE IT A UNIVERSAL PROGRAM  FOR ALL STOCK
N990 M98 P1000 (KEEP CALLING MAIN PROGRAM)
N1000 M30 (END SUB PROGRAM AT COMPLETION OF BAR)

 

it has been some years since I used this stuff and think I made a mistake it should look like this.

 

HTH

Link to comment
Share on other sites

O1002(SUB PROGRAM)
N970 #100 = [#100 + 1] (COUNTER OF MARCO 100 TO VALUE NEEDED)
N980 IF #100 > 20 GOTO N1000 (COUNTER UNTIL END OF BAR IS REACHED)  <-- COULD USE A MACRO VARIABLE HERE TO MAKE IT A UNIVERSAL PROGRAM  FOR ALL STOCK
N990 M98 P1000 (KEEP CALLING MAIN PROGRAM)
N1000 M30 (END SUB PROGRAM AT COMPLETION OF BAR)

 

it has been some years since I used this stuff and think I made a mistake it should look like this.

 

HTH

This is the first time I've ever used sub programs I don't understand how it works but it works tomorrow morning I'll try the changes and see what happens.How does the lathe see 1002 sub program? Thanks for your time

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