![]() | |
| 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
| ||||
| ||||
Hello all, I run several Yasnac controlled mills and use g13 cycles quite a bit. We are getting a Kia KV25p with a Fanuc Oi MB control. Why Fanuc doesn't do G13 Beats the hell out of me. As for the first few parts they want-the programs are loaded with g13s. I plan on writing a simple g13 style macro for it. With macro B on that control I believe I can even use a g13 via paramete setting to call the macro instead of g65 Pxxxx . I have no cam in the shop so making a simple G13 I_D_F_ macro would save me some time. On macro B is there a way to make D link to the crc offset like the Yasnac version? example g13 I_ D3 F_ - D3 picks up stored cutter comp offset 3 I have been avoiding macros for too long and need to start somewhere. Any advice out there? |
|
#2
| |||
| |||
| I am not sure what a G13 cycle does on the Yasnac control. However you can use a G13 as a custom code to call a macro program and then go about writing the code that simulates what you want. Providing that the MTB does not use a G13 as a standard code. If that is the case a G13 would call your macro if you set it up that way but if you use a G13 in the macro program it would function as the MTB has assigned it. To setup a custom G13 for the Oi control would be as follows. Parameters 6050-6059 calls programs 9010-9019. So if you wanted to call program 9010 with a G13 you have to set parameter 6050=13. Now everytime that a G13 is programmed it will call 9010. In 9010 you can write the code that you want. Now if you want to pass variables along you can. So if you programmed G13I2D3F4 then program 9010 will be called and #4=2 #7=3 #9=4. Now it looks like you will want to be capturing the tool that you are using to get the cutter comp. This is going to be a bit trickier if you want to make it fool proof. Cutter comp in a Fanuc control is G41 and G42. So you could do something like program a G13D5 in your main program which you will designate D5 as using cutter comp of tool 5. Now in your 9010 program you would write G41D#7 etc. To get more detailed if you did not want to specify tool 5 (D5) in your main program and you just wanted to use a G13 and have the program know what tool is in the spindle then you would need to find a variable that tracks the tool in the spindle or set one up. As an example if you have a variable as an example #500 that is equal to the tool in the spindle or the MTB setup a system variable like #1033 that tracks the tool in the spindle then you could write G13 in your main program and in the 9010 program have G41D#500 or G41D#1033. Hope this helps, Stevo |
|
#3
| ||||
| ||||
| Stevo, IIRC, a G13 is a hole-making code. Starts at center, spirals out CCW (G12 goes CW) and cuts to the desired diameter. Different words in the line mean things like comp or no, how much step each spiral, and any dead passes. |
|
#4
| ||||
| ||||
Thanks Steve O. I will set parameter 6050 to G13 and give it a try. It is just a simple circle with lead in and out using crc. D uses the comp number I want and #103 is the sum of geometry and wear comp offsets in the selected comp #. It is painfully basic for my first macro but here is what I have so far..... O0001 (N1G0G40G80G90 T1M6(3/8CEM) G54X0.0Y0.0S7000M3 G43Z1.0H1M8 G0Z.1 G1Z-.525F16. G13I.2D3F10. G0Z.1 G40 G0Z1.0M9 G40G49Z0.0M19 T1M6 M30 % O9010 (CCW CIRCLE W/CCOMP) IF [#9LE0] THEN #3000=4 (NO FEEDRATE) IF [#4LE0] THEN #3000=5 (NO HOLE RAD) IF [#7LE0] THEN #3000=6 (NO TOOL RAD) IF [#4LE#103] THEN #3000=7 (TOOL TOO LARGE) #101=#7+1300 #102=#7+1200 #103=#101+#102 #8=#4003 #5=#4-#103 #6=#5/2 G91G1X0Y0F#9 G3X#5Y0I#6J0F#9 G3I-#5 G3X-#5Y0.I-#6J0 G1X0Y0 G[#8] M99 % (I HOLE RADIUS) (D COMP NUMBER) (F FEED RATE FOR CIRCLE) (G13 CALL- SET TO PARAMETER#6050) Last edited by maz43; 08-21-2010 at 04:55 PM. Reason: Figured out how to pickup stored comp value-I think.. |
|
#5
| ||||
| ||||
| Yes, thats the right idea - try to get it to arc back to the start point the same way you arc on to the radius (store your starting point in both axes). Next thing to figure out is if you need to rough out in steps specifying an initial radius....good luck.... DP |
| Sponsored Links |
|
#6
| |||
| |||
| My uncle has a Mori Seiki SV50B and another shop which had a bunch of overflow work for the MV40 they had sent us the tooling and fixtures and posted programs. Problem: The SV50B has the MSC-518 (FANUC 18M) vrs the MV40 having Yaznaq. I wrote a quick and dirty macro which would do as close to the Yaznaq as I could get within the time I had. Following the Yaznaq format there are NO Z axis moves in the macro. Getting to depth AND getting out are still the programmers responsibility. During the run I improved it a bit to use prior defined modal F & D values. ( I was half asleep writing this, we were working 18hr days trying to get this family of jobs out.) Due to the fact that "L" is a reserved word in the 18M the macro is not a true copy of the Yaznaq format, it does cover about 95% of the needs. If I can remember to download a copy, I will post it. Code: % :9013(YASNAQ G13 EMULATION)(12-31-2003) #27=#4107 IF[#7AND#27EQ#0]THEN#3000=25(NO D VALUE) IF[#7EQ#0]THEN#7=#27 IF[#7LT1.]THEN#3000=30(D VALUE REQUIRES DECIMAL) IF[#4EQ#0]THEN#3000=26(NO I GIVEN) IF[#9EQ#0]THEN#9=#4109 N1G0G40 #3=[#9*.4] #100=0 #106=0 #140=#5003 #141=#5001 #142=#5002 #144=[#[13000+#7]+#[12000+#7]] IF[#6EQ#0]GOTO9000 IF[#17EQ#0]THEN#3000=27(K WITHOUT Q GIVEN) #10=#6-#144(POCKETRAD-EMRAD) #143=#142-[#10-#4] #145=[#10-#4] #146=[#145*2.] #12=#17(WIDTH-OF-CUT) #104=[#12*.3] N40G0G90X#141Y#142 #14=0 WHILE[[#12+#14]LT[#145]]DO1 G1G91Y-#12F#3 #14=#12+#14 G3X0Y[2*#14]R#14F#9 G3X0Y-[2*#14]R#14 END1 #30=[[#10-#14]/2] G1G91Y-#30F#3 G3J[#14+#30]F#9 N23G90G1Y[#142-#10] N24G3G91X0Y[2*#10]R#10F#9 N25G3X0Y-[2*#10]R#10 N26G3X#104Y[ABS[#104]]R[ABS[#104]] N67G0G90X#141Y#142 GOTO9900 N9000G1G91 #33=[#4-#144] #32=[#33/2] G3X#33I#32F[#9/2] I-#33F#9 X-#33I-#32 G0G90X#141Y#142 N9900G0G90M99 % I'm making a variable table now so you can make sense of it and check your manual for the proper code for your machine control. Someday if "I" buy a machine with a FANUC I'll write a HAAS compatible version. - For my Hurco, they got it all covered. Last edited by skullworks; 08-23-2010 at 03:36 PM. Reason: Added the macro |
|
#7
| |||
| |||
| Stevo |
|
#8
| |||
| |||
If you choose to try this be sure to do it cutting air first. As mentioned above there are control model specific variables which may need to be changed to fit your machine control. - Missing one could cause a surprise you may not like... I will be adding a list later. |
|
#9
| ||||
| ||||
| Does the Haas cycle adjust feedrate to achieve programmed feedrate along the programmed arc? This is something you may want to incorporate if you do a lot of circular pockets that are not much bigger than the cutter. I think the formula is something like: - Feed=Feed x [[Programmed Radius minus Cutter Radius]/[Programmed Radius]] DP |
|
#10
| ||||
| ||||
Skullworks- I will try out my simple version first, but yours has the spiral roughing cycle so I gotta try it out. Both will be tried out several inches above anything solid....... |
| Sponsored Links |
|
#11
| |||
| |||
| Not in order - but kinda from the order they appear. #27= #4107 This loads the last called "D" offset number into #27 IF[#7EQ#0]THEN#7=#27 This sets the prior "D" value to be the current "D" value if you have not defined a new value. NOTE: For some stupid reason when you define the "D" offset in the macro most controls will try to divide that value by 1000 unless a decimal is specifically in place. IF[#9EQ#0]THEN#9=#4109 Sets "F" to last used "F" value if you did not define a new "F" value. #100 & #106 are not used, they were leftover from an idea I had that I decided was better off done in a different macro. #140=#5003 Captures the current Z position at start of macro. #141=#5001 Captures the current X position at start of macro. #142=#5002 Captures the current Y position at start of macro. #144=[#[13000+#7]+#[12000+#7]] Now there is a mouthful! This line pulls the tool radius value from the offset geometry and adds in the wear offset value to load the true tool radius into #144. - This line gets much smaller if your control does not support both geometry and wear. MORE later (I'm posting from work, have to get back to it.) So these are the system variables you will need to confirm. #4107 - Last used "D" offset number #4109 - Last used "F" value #5001 - Axis position for "X" #5002 - Axis position for "Y" #5003 - Axis position for "Z" (not used) #12xxx - Tool geometry or wear table (don't recall which is which at the moment) #13xxx - Tool geometry or wear table All the other variables are local to the macro. |
|
#12
| ||||
| ||||
| @skullworks if i understand correctly your macro, it is not realy a spiral but cocentric circle. To do spiral milling the easiest way is to use the 2 center spiral method wich is a good aproximation of a true spiral. Each center is offset by the step over/4 from the true spiral center and each move is an half of circle radius increase about half the step over at each move. |
![]() |
| 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 |
| Need Help!- how to dnc a yasnac mx1 | matosjulio | G-Code Programing | 1 | 02-06-2009 03:26 PM |
| Fanuc or Yasnac | chuy | Fanuc | 1 | 09-01-2008 06:45 PM |
| Newbie Question-Fanuc vs Yasnac | James K | G-Code Programing | 8 | 01-04-2008 09:11 AM |
| What is the difference between Fanuc and Yasnac? | horst007 | General CNC (Mill and Lathe) Control Software (NC) | 1 | 09-04-2007 09:19 PM |
| Yasnac I80 | Gitanes | General CNC (Mill and Lathe) Control Software (NC) | 0 | 11-23-2005 11:00 PM |