CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 08-20-2010, 07:13 PM
maz43's Avatar  
Join Date: May 2009
Location: USA
Posts: 92
maz43 is on a distinguished road
Yasnac G13 for Fanuc?

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?
Reply With Quote

  #2   Ban this user!
Old 08-21-2010, 08:16 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

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
Reply With Quote

  #3   Ban this user!
Old 08-21-2010, 12:16 PM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

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.
Reply With Quote

  #4   Ban this user!
Old 08-21-2010, 12:17 PM
maz43's Avatar  
Join Date: May 2009
Location: USA
Posts: 92
maz43 is on a distinguished road
macro

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..
Reply With Quote

  #5   Ban this user!
Old 08-21-2010, 05:56 PM
christinandavid's Avatar  
Join Date: Aug 2009
Location: New Zealand
Posts: 573
christinandavid is on a distinguished road

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
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-22-2010, 07:27 PM
 
Join Date: Feb 2007
Location: USA
Posts: 531
skullworks is on a distinguished road
Arrow G13

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
%
The macro does use several machine control specific variable calls that you will have to look up for your machine.

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
Reply With Quote

  #7   Ban this user!
Old 08-23-2010, 06:55 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by beege View Post
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.
Thanks for the info Beege.

Stevo
Reply With Quote

  #8   Ban this user!
Old 08-23-2010, 03:47 PM
 
Join Date: Feb 2007
Location: USA
Posts: 531
skullworks is on a distinguished road
Macro Posted.

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.
Reply With Quote

  #9   Ban this user!
Old 08-23-2010, 04:55 PM
christinandavid's Avatar  
Join Date: Aug 2009
Location: New Zealand
Posts: 573
christinandavid is on a distinguished road

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
Reply With Quote

  #10   Ban this user!
Old 08-23-2010, 05:41 PM
maz43's Avatar  
Join Date: May 2009
Location: USA
Posts: 92
maz43 is on a distinguished road

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...
Thanks for the ideas everyone.
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.......
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 08-23-2010, 11:35 PM
 
Join Date: Feb 2007
Location: USA
Posts: 531
skullworks is on a distinguished road
Exclamation My Variables and some splaining...

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.
Reply With Quote

  #12   Ban this user!
Old 08-24-2010, 04:14 PM
samu's Avatar  
Join Date: Feb 2007
Location: quebec
Posts: 216
samu is on a distinguished road

@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.
Attached Thumbnails
Click image for larger version

Name:	spiral.jpg‎
Views:	40
Size:	88.5 KB
ID:	113370  
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 11:45 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361