![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Is there a way to repeat a program without making a sub prog? Im using a barpuller and i want to repeat the a program 30 times, i have tried M98 L30 but it just repeats the program forever. This is what the end looks like: ................ G01 Z2. M98 L3 G00 X200. Z200. M5 M30 % |
|
#2
| |||
| |||
| At the end of your prg. you have to setup a counter like this. There are many differnt ways to do this, this is just one example. #529=30.(NUMBER OF PARTS TO BE MACHINED); You can put this at the front of the program so it is easier to change. #530=1.; #531=[#531+#530]; IF[#531EQ#529]GOTO900; M99; N900 #529=#0; #530=#0; #531=#0; #3006=100(COUNT UP); M30; We also use a dedicated loop program like this G28U0; M98P304545; M30; It will run program #4545 30 times and then hit the M30 and reset. |
|
#3
| |||
| |||
| Hi. You can try M97 to call local Sub-Program. O#### (Main Program) ... M97 P1000 L3 (Call Local Sub-Program at line N1000 and repeat 3 times) ... M30 N1000 (Local Sub-Program) ... M99 (End of Sub-Program and return to Main-Program) % |
|
#6
| |||
| |||
| M97 won't work either... that's a Haas code. You'll probably need a counter like above examples. You could also try this: M98H????L30 (where H is the "N" number or sequence number to start from). Using the M98 like this is similar to a Haas M97.
__________________ It's just a part..... cutter still goes round and round.... |
|
#7
| |||
| |||
| Tried like this but only got illegal format alarm. Why wont this work and on a Mazak T32? This is my current testprog: O5002 ( TEST 12-26-2007 ) ( MAZAK T32-3 ) ( TOOL:10 CLAW ) ( OPERATION: BAR PULLER ) N10 G18 G21 G53 G98 M302 G00 X200. Z200. M202( SVARVNING ) T1010 G97 S0 M04 G00 X0. Z2.5 Z-17.5 G01 Z-25.0 F2000.00 M5 M8 (KLAW GRIP) G04 X2000 M6 (CHUCK OPEN) G04 X500 Z-5.0 F2000.00 M7 (CHUCK CLOSE) M9 (KLAW OPEN) G04 X1500 G01 Z2.5 F2000.00 G00 X200. Z200. M5 #529=2.(REP) #530=1. #531=[#531+#530] IF[#531EQ#529]GOTO30 M99 N30 #529=#0 #530=#0 #531=#0 #3006=100(COUNT UP) M30 % |
|
#9
| |||
| |||
| Its a Mazatrol T32-3 system with EIA/ISO option, i have never used variables in iso and im not sure how the T32 handles the variables, cant find anything about it in the books. I will get a alarm at the first line of variables, " illegal format " The program works fine up to the variables. Is variables the only way to make it count? |
|
#11
| |||
| |||
| Try this to test macro option: #500=10. And see if it puts a "10" into #500 or gives you a format error. A T32 with macro options should handle variables like any other machine.
__________________ It's just a part..... cutter still goes round and round.... |
![]() |
| 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 |
| Anyone familier with (KipwareM cnc prog) | Holmes_ca | General CAM Discussion | 5 | 05-01-2011 08:55 PM |
| Fanuc Ot PMC prog problems | F.Sharifi | Fanuc | 4 | 09-07-2010 10:25 AM |
| Alarm 913 prog: Fanuc 6T | mrvirtue | Machine Problems, Solutions , Wireless DNC, serial port | 1 | 10-30-2006 04:14 PM |
| Need Prog. Manual For Boss 5! | MrHorsepower | Bridgeport and Hardinge Mills | 6 | 07-23-2005 07:14 PM |