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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-14-2005, 02:21 PM
 
Join Date: Dec 2004
Location: USA
Posts: 27
hatchmar is on a distinguished road
G83 Macro

Hi all, We have a shop full of Miyano LE22's turning/milling ctr's and none of them have the ability to do a G83 deep hole pecking cycle. They have G74 pecking cycles but G74 does not do a full retract. our solution to this has been to just write out all the rapids and feeds line-by-line and on some of the holes that are fairly deep, this can be a time consuming as well as memory consuming process. Is there a way to create a Custom Macro that will mimic a G83 full retract cycle? the Miyanos have Fanuc Series O-T controls and judging by the manual, they do have Custom macro A and B ability. Ive tried to understand how these work by reading the book, but anybody that has seen the infamous "Yellow FANUC Book" knows that they arent written well, i guess something getslost in the translation. anyway, does anybody have any ideas on how to do this without taking up alot of memory or time?
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 01-14-2005, 02:46 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 15,713
Al_The_Man is on a distinguished road
Buy me a Beer?

Yeah, the manuals are written in 'Jinglish' , there are a few options, but if you have macro A & B, this allows parametric programming and you could use G65 followed by the values you want to plug into the specified variables in the subroutine that is called by the G65. You would then have to write the subroutine only once.
If you want to do any Macro programming in length, I would recommend getting hold of a 3rd party book on the subject as there is a quite a bit you can do in the way of programming. I believe the canned routines such as G74 exsist in the programs 9000 & up. Hopefull someone here may have done this particular routine to help you get started.
Al
__________________
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

  #3  
Old 01-14-2005, 04:27 PM
wms's Avatar
wms wms is offline
Moderator
 
Join Date: Mar 2003
Location: United States
Posts: 938
wms is on a distinguished road

Guys,

This was given to me years ago..for this very reason..deep hole peck drilling on a Fanuc OT.

I never used it as I let the cam system output code for this.

See if it helps or you can use it..unfortunatly I will be of no help if you have questions as Macros are not my thing...dumb as a rock as far as they are concerned..but maybe with this Macro and some help from some other user here you can get up to speed.

Below is the Nc program, a hard copy of the nc file, and some instructions.

Please note the program numbers is 9136 and the samples show 9135..must just be a typing error.
Attached Files
File Type: zip drill_macro_instructions.zip‎ (74.3 KB, 282 views)
File Type: zip drill_macro_hardcopy.zip‎ (351 Bytes, 253 views)
File Type: zip DRLMACRO.zip‎ (363 Bytes, 249 views)
__________________
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

  #4  
Old 01-14-2005, 05:12 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 15,713
Al_The_Man is on a distinguished road
Buy me a Beer?

Looking at it, That seems like it might do the trick, anyway if not it is should be almost there and you can fine tune it to your liking.
Al
__________________
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 01-15-2005, 03:52 PM
 
Join Date: Dec 2004
Location: USA
Posts: 27
hatchmar is on a distinguished road

WOW! man, I expected to get some help here maybe pointing me in the correct direction but you guys hit the nail on the head. This Is exactly what I need. I mean exactly! I havent tried it yet because I want to understand how it works but i will take AL's advise and read up on it and ill take WMS's code and put some lipstic on this pig!
thanks very much
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6  
Old 01-16-2005, 11:53 PM
wms's Avatar
wms wms is offline
Moderator
 
Join Date: Mar 2003
Location: United States
Posts: 938
wms is on a distinguished road

Hatch,

Your welcome. Glad to help.

Hope it does the trick.

Stop by more often.

OH and Pigs need love too.. : )
__________________
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 02-02-2005, 10:42 AM
ghyman's Avatar  
Join Date: Feb 2005
Location: USA
Posts: 214
ghyman is on a distinguished road

I wrote this macro on a Citizen swiss machine; it allowed me to do a 'regressive' peck cycle... each peck is slightly less than the previous one. This let me keep the bore clear of chips, keep oil on the drill, and eliminated broken drills.
This will work for a 'long-hand' peck cycle without actually requiring 128K of rapid/feed moves to be programmed. Just set the variables and go!

As I said, this was on a Citizen control, so I had to reverse the Z direction, but it should work on any control that has a Fanuc 'look and feel'.

(Fadal users, I can convert it to use V/R variables if need be.)


Set the following values in your program before moving to the first hole.
Set #534 to 1.00 for a 'standard' peck cycle,
Otherwise, it will reduce the length of each peck by a percentage (in this case, 85%)... this is good for really deep holes, where chips, coolant, etc are a concern.
If you do use a regressive peck, make sure #533 is valid for the drill you are using.

(SET-CONDITIONS)
#531=4.361(DEPTH-TO-DRILL)
#532=0.160(FIRST-PECK-DEPTH)
#533=0.010(MIN-PECK-DEPTH)
#534=0.850(REGRESSION-PERCENT)
#535=0.1(Z-START-POSITION)
#536=0(RESERVED)
#537=0(RESERVED)


Then, move to the X/Y hole location, and give it a "M98 H310" on the next line.
Then, for each hole, do an X/Y move, then another "M98 H310"
Finally, at the end of your program, add this:


N310(REGRESSIVE-PECK-CYCLE)
#536=#535
#537=#532
N320(HERE-WE-GO!)
#536=[#536-#537]
IF[#536LE#531]GOTO330(DONE)
G1Z#536F.0016(DRILL-NEXT-DEPTH)
G0Z#535(RETRACT)
G0Z[#536+.005](CLEAR)
#537=[#537*#534](REDUCE-PECK)
IF[#537GE#533]GOTO325
#537=#533(NOT-TOO-SMALL)
N325GOTO320
N330G1Z#531
G0Z#535
M99

Gives you a LOT of control, with no canned cycles, and very little extra code!
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 02-18-2005, 08:14 PM
 
Join Date: Dec 2004
Location: USA
Posts: 27
hatchmar is on a distinguished road

well., i have been trying to get these programs loaded into the machine but i keep getting "004" alarms. this happens when i try to download the code into the machine and it will load only untill it sees a # sign. ive noticed it will load anything that has a letter in front of it such as " Z#532 " evewn if i try to manually type the code in, it wont allow me to put #'s in until i have a letter in front of it. any ideas?
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 02-19-2005, 07:19 AM
ghyman's Avatar  
Join Date: Feb 2005
Location: USA
Posts: 214
ghyman is on a distinguished road

Maybe my O-T memory is a little fuzzy, but an error 004 is what you get when you try to use a code that does not exist (Like trying to give a Y-axis move on a machine with only X/Z)... I would think that if you did NOT have macro variables available, that you would get an error 115...

Can you call up the Macro Variables in the 'offset' screen? That would be the first place to look and see if you have the Macro A/B functionality.
If you have #501-#531 available, but not any higher, then you just don't have the 'extended' variables... try re-coding the routine using #501-#507 instead of #531-#537. This will use the basic variables instead.

Or, try this:
In MDI mode, type in
#501=1 EOB INSERT
and hit cycle start
If no errors, then type in
T#501 EOB INSERT
and hit cycle start... you should get a tool change to tool 1.

If you DO get an error with the first code, then try using #101 in place of #501.

If the error continues, then it would appear that you do NOT have the Macro A/B capability, or that there is some other problem...

As a last resort, try the same sequence, only use #1 instead of #101 or #501.

If you can get the #501 or #101 to function in MDI mode, then recoding the peck cycle using the #501-#507 (or #101-#107) should do the trick. If the #1 works, then try re-coding the peck cycle subroutine with #1, #2, ... #7 instead of #531-#537

As I said, my OT memory is a little rusty (I've had 18's for the past 3 years), but you should still have some of the basic variables available.

Let me know!!!
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 02-27-2005, 01:22 PM
 
Join Date: Dec 2004
Location: USA
Posts: 27
hatchmar is on a distinguished road
re re re re re re errrrr

ok, I really have been trying to get this by reading the *cough* FANUC manual. part of my problem was that I was trying to change the variables in the wrong place.... oops. we do have a macro screen on the offsets page and i am now trying that. I still have the problem where I cant just type #536=#535. It looks like I have to use a G65 followed by an H code (ex. H01 is = H02 is addition ...) then a P,Q,and/or R. It is starting to make a little sense and I did get the machine to move but it only does one peck and the program ends. another thing im not too sure about with OT controls is the GOTO function. it isnt anywhere in any of the manuals and we have never used it here. I cant even MDI it in but if I upload it, it shows up but doesnt seem to do anything. here is how I have coded it:

O0083
G65H01P#515Q#514 (H01 DEFINITION, SUBSTITUTION)
G65H01Z#507Z#511
N320
G65H03P#515Q#515R#507(H03 SUBTRACTION)
G65H86P330Q#515R#510 (H86 IF<=THEN)
G65G1Z#515F0.0016
G65G0Z#514
G65G0Z#515
G65H04P#507Q#507R#513(H04 PRODUCT)
G65H85P325Q#507R#512 (H85 IF>=THEN)
G65H01P#507Q#512
N325GOTON320
N330G65G1Z#510
G0Z#514
M99
%

PS- i do get an alarm right at the beginning- 025(unusable variable) but if i start from N320 there are no alarms. It says unusable var. in the book but we have variables in the macro screen from 500-531
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-27-2005, 01:39 PM
 
Join Date: Dec 2004
Location: USA
Posts: 27
hatchmar is on a distinguished road

OOPS- THAT 125 ALARM IS "unusable address in G65 command" im assuming that something is wrong with my N numbers?
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 02-27-2005, 03:20 PM
 
Join Date: Dec 2004
Location: USA
Posts: 27
hatchmar is on a distinguished road

ok, got rid of the alarm, it was on the 2nd line- i had 2 Z's where it should have been a p and a q. it runs trrough but only does one big peck
Tweet this Post!Share on Facebook
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
AutoCAD 2 G-Code macro ger21 Autodesk Software (Autocad, Inventor etc) 224 11-06-2011 01:02 PM
Pro/manufacture -number of decimal places arc events dsergison Post Processor Files 4 05-27-2005 01:50 PM
Engraving Macro MachineSMM General CNC (Mill and Lathe) Control Software (NC) 12 03-03-2005 06:32 AM
ProE G83 Problem Joe_CNC PTC Pro/Manufacture 2 05-21-2004 11:12 PM
Drilling Macro mandrew35 General CAM Discussion 14 07-07-2003 03:58 PM




All times are GMT -5. The time now is 11:35 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