![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Haas Lathes Discuss Haas lathe here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hello all, First post to this forum and probably won't be my last. My question is this. I have a program in the machine to make a part and a subprogram for a bar puller. At the the end of the part program I have M98 P1; At the end of the bar puller program (P1) I have a M99 which returns to the part program. I'm able to get this to run continuously, so how do I get it to stop say after 10 parts? The Manual says to insert L10 after M98 but that wants to run the bar puller 10 times. Any thoughts or ideas would be appreciated Thanks Z |
|
#3
| |||
| |||
| Thanks I did a search and got a few ideas. Basically I need to write a program to perform the part program x number of times which calls up the bar puller program. So as I understand it there are three separate programs, correct Thanks Z |
|
#4
| ||||
| ||||
Yes, this is one way to do it. There are a few others but this is the simplest and it is easy to understand. |
|
#5
| |||
| |||
| The Pnnnn refers to a line number Nnnnn that is immediately after the the M30 command. I have posted examples here but cannot remember where. If you like tomorrow I can attach one of our programs that uses a barfeed which is equivalent to a puller. You could load it in your machine and watch it in Graphics or simply single block through without any tools installed.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
| Sponsored Links |
|
#6
| |||
| |||
| Thanks Geof, That would be great if it is no trouble. I'll try the three program deal tomorrow and if I get some spare time I'll check in here at work and try yours. Always open to learning and trying new things. Thanks for the quick responses everyone. This seems like a valuable resource of information Thanks Z |
|
#7
| |||
| |||
| I attached the program as a text file. If you simply loaded this into your machine and put some tool offsets in you can run it in Graphics. Our style is to put the different tools in their own subroutine which is why it seems to have a lot of subroutine calls. I will walk you through by line number starting with loading a new length of bar. Go down to line N19 and you see a Block Delete / in front of the M97 jump to line N31. When starting with a new length of material the material is loaded through the barfeeder by the operator so it just sticks out of the chuck a short distance (we do not have a magazine barfeeder). Now Block Delete is turned on so the M97 is not executed and the program chooses tool 12 at N22, moves it in to place with 3" of Z space at N23, opens the chuck at N24, moves the stop forward to push the bar up to Z.01, closes the chuck, homes the turret and stops on the M30. The reason we have the push is so that if the bar is sticking out a couple of inches the stop does not crash into it; the push is G98 because the spindle is not running. The bar is in position to start the run so Block Delete is turned off, now the program does the line jump down to N31 then at N32 there is a subroutine M97 call with an L48 count to N100. The program goes through all the tools and parts of the finished piece then goes to tool 12 again; M97 P12000. Subroutine N12000 slows down the spindle, brings the stop to Z3. again, opens the chuck, pushes the bar back to Z0.01 and returns to line N116 then to line N32, increments the L count and goes through everything again. For using a Puller the only significant difference is that you stop the spindle, bring the puller in the grip the bar, open the chuck, pull the bar out, close the chuck and then move the puller away. Our barfeeds are designed to work with the spindle running just to save time.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ground Loops and Missed Steps | cbcnc | General Electronics Discussion | 34 | 03-16-2008 02:34 PM |
| gcode nested loops | ldaniels | Mach Mill | 3 | 10-26-2007 06:21 PM |
| loops and subs | d.dixson | Mach Mill | 5 | 04-07-2007 05:25 PM |
| Benefit of Speed and Current(Torque) PID loops ? | andy55 | Servo Motors and Drives | 1 | 08-12-2006 11:07 PM |
| Anyone using closed loops (encoders) on their stepper motors? | RMS | Stepper Motors and Drives | 2 | 08-04-2006 04:23 PM |