![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I use Router-Cim to create g-code for the Komo router. I am in cabinet construction. I recently started looking into Macro B programming and can not get this to work. All I want to acheive is for the operator to fill in x dim y dim and qty of rectangles to cut. here is my code % :01(MACRO TO CUT MULTIPLE RECTANGLES ON 0.725 THICK PLYWOOD) G00G17G20G28G40G80G91Z0M5 G90 G52X0Y0Z0 G08P1 M08 (ROUTER-BIT .375 DIA.) G28G91Z0M05 G90T2001M06 T102 M03S16000 G00G17G55X.0635Y1.9198 G00G43H1Z.975 G65 PO100 Y4.0 X36.0 Q4(THIS LINE Y4 IS WIDTH OF PART_X36 IS HOW LONG THE PART_Q4 IS HOW MANY PARTS) G28G91Z0M5 G28G91X0M09 G90 G52X0Y0Z0 G08P0 M30 O100(Begin Sub Program) #100=0 #101=0.0(ZERO POINT X) #102=0.0(ZERO POINT Y) #103=#17 #104 = #25 #105 = #24 WHILE [#100 NE #103]DO1 Z.825 G42D01G01Y#3+1.7135F375. Y#102+.0635Z0. X#105+.4365F750. Y#104+.4365 X#101+.0635 Y#103+.0635 X#101+.4385F750. X#101+2.0885Z.825 G00Z.975 G40G00X#101+2.2948 #100=#100+1 #102=#102+#104+0.5 END1 M99 % Here is the error 127 nc, macro statement in the same block Can anyone point out where I am failing? |
|
#2
| ||||
| ||||
| [QUOTE=W00dM@n;826453]I use Router-Cim to create g-code for the Komo router. I am in cabinet construction. I recently started looking into Macro B programming and can not get this to work. All I want to acheive is for the operator to fill in x dim y dim and qty of rectangles to cut. here is my code % :01(MACRO TO CUT MULTIPLE RECTANGLES ON 0.725 THICK PLYWOOD) G00G17G20G28G40G80G91Z0M5 G90 G52X0Y0Z0 G08P1 M08 (ROUTER-BIT .375 DIA.) G28G91Z0M05 G90T2001M06 T102 M03S16000 G00G17G55X.0635Y1.9198 G00G43H1Z.975 G65 P100 Y4.0 X36.0 Q4(THIS LINE Y4 IS WIDTH OF PART_X36 IS HOW LONG THE PART_Q4 IS HOW MANY PARTS) G28G91Z0M5 G28G91X0M09 G90 G52X0Y0Z0 G08P0 M30 O100(Begin Sub Program) Your sub should be a separate program #100=0 #101=0.0(ZERO POINT X) #102=0.0(ZERO POINT Y) #103=#17 #104 = #25 #105 = #24 WHILE [#100 NE #103]DO1 Z.825 G42D01G01Y#3+1.7135F375. Should this be Y#103? Y#102+.0635Z0. X#105+.4365F750. Y#104+.4365 X#101+.0635 Y#103+.0635 X#101+.4385F750. X#101+2.0885Z.825 G00Z.975 G40G00X#101+2.2948 #100=#100+1 #102=#102+#104+0.5 END1 M99 %QUOTE] Also use [] a bit more often to keep things orderly - I once had a macro that was trying to look for #3.5....(#7/2) DP |
|
#5
| |||
| |||
| Sorry, but I'm struggling and learning To save the sub as separate program does the name of the file need to be 100 or O100? or can it be anything. Is the following good? % O100(Begin Sub Program) #100=0 #101=0.0(ZERO POINT X) #102=0.0(ZERO POINT Y) #103=#17 #104=#25 #105=#24 WHILE [#100NE#103]DO1 Z.825 G42D01G01Y#103+1.7135F375. Y[#102+.0635]Z0. X[#105+.4365]F750. Y[#104+.4365] X[#101+.0635] Y[#103+.0635] X[#101+.4385]F750. X[#101+2.0885]Z.825 G00Z.975 G40G00X[#101+2.2948] #102=[#102+#104+0.5] #100=[#100+1] END1 M99 % |
| Sponsored Links |
|
#6
| |||
| |||
| You can choose any number between 1 and 9999. If you choose 100, the first line of the program should be O100 or O0100. (Note the difference between O and 0) It is called (once) by P100 or P0100 Correction: G42D01G01Y[#103+1.7135]F375. Correct, but brackets not needed: #102=[#102+#104+0.5] #100=[#100+1] |
![]() |
| 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 |
| Hello from another newbi | Rik H | Europe Club House | 4 | 09-18-2010 06:57 PM |
| Need Help!- Newbi Help please Parameter List slant turn 30 | TOBYC | Mazak, Mitsubishi, Mazatrol | 0 | 05-24-2010 04:03 AM |
| Testing program for Macro (Fanuc Macro B) | NickDP | Fanuc | 2 | 03-27-2009 03:15 PM |
| Jeep Fender Flares (newbi q's) | jdougn | Vacuum forming, Thermoforming Etc | 28 | 10-06-2008 08:44 AM |
| CNC Newbi, What software do I need? | Blacksunshine | DIY-CNC Router Table Machines | 2 | 02-15-2007 11:12 AM |