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 09-10-2010, 07:28 AM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road
Unhappy Custom Macro Containing G65

I am hoping someone with a lot more Macro experience will be able to help me. I have inherited a Custom Macro program (and the original machines that the program was written for and works on) from a sister company. The original machines are a Fanuc 16i (I think) and I am trying to get it to work on an 18i-T. The program is designed to generate slots with the X and C axis. I have alot of questions. I am hoping that someone is familiar with this and can help!!!
Reply With Quote

  #2   Ban this user!
Old 09-10-2010, 08:03 AM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

I would think the code for the 16i would run on the 18i without a problem. Have you tried it? Do you get alarms?
Reply With Quote

  #3   Ban this user!
Old 09-10-2010, 08:25 AM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road

I am getting a 2017 alarm, which is pretty much a generic alarm in my opinion. I have contacted Fanuc with no luck. The machine that is currently running this program is a Mori DL-151. The program works on one side but not on the other. So right now I am assuming that there are some parameters that perhaps have been turned on. I just ahve not had the time to compare the two yet. These programs are pretty interesting. I would like to have been inside the guys head when he was writing these.
Reply With Quote

  #4   Ban this user!
Old 09-10-2010, 12:29 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Is there a description with the alarm or does the screen just show 2017? I agree with Dave that this should run without too many issues from the 16 to the 18 as they are pretty similar controls. Do you have any MTB manuals that can reference this alarm?

Is the program long? Can you post it and show us where the alarm is being generated in the code?

You don’t want to be inside the head of a macro guy, they are a bit off in the head if you know what I mean. I have dreams about macros. My wife says I’m sick.

Stevo
Reply With Quote

  #5   Ban this user!
Old 09-10-2010, 01:05 PM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road

The alarm says machine/robot. It gives me that alarm for many various problems. We use the G70/G71 canned cycle with G42 and if you put in a TNR that it doesn't like that's the alarm you get. The 18i doesn't like to ROUND either and it gave me that alarm. To me it's a catch all.

The program is pretty long. There are three separate programs. They end up being nested. I can try to post some of it. This one is the last of the three that sets the RPM and Feedrate.

9090(SAVE)(RPM FEED)
#137=ROUND[#4120/100.] <-----It stopped here and gave me a 2017 alarm
#138=2900.+#137
#139=#[#138] <-----So I changed this to a 1 to get past here
#133=#13(DIR)
#148=#19(RPM)
#149=#9(FEED)
IF[#139EQ1.]GOTO10
IF[#139EQ3.]GOTO30
#3000=9(ROTARY TOOL RATIO)
N10(1 TO 1 RATIO)
IF[#13GT1.]GOTO20
#133=13.
N20#140=240.(SFM)
#141=3000.(MAX RPM)
#142=3.5(FEED RT)
GOTO40
N30(1 TO 3 RATIO)
IF[#13GT1.]GOTO35
#133=14.
N35#140=480.(SFM)
#141=9000.(MAX RPM)
#142=4.0(FEED RT)
N40
#143=[#18*3.1416]/12.(CIRCUM)
#144=[#140/#143](RPM)
IF[#144LE#141]GOTO50
#144=#141(RPM EQ MAX)
N50
#145=[#144*#143](SFM)
#146=[#142/[#140/#145]](FEED)
IF[#19GT.01]GOTO100
#149=#146-[SQRT[#18+#18]](FEED)
#148=ROUND[#144/#139](RPM)
N100M99 <---- Then I got another 2017 alarm here. I can't get past here now.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 09-10-2010, 01:07 PM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road

This is the program that it is supposed to go back to:

:9025(SAVE)(RADIUS OD SLOTS)
(A=#1=OD DIA)
(B=#2=SLOT DIA ACROSS)
(C=#3=SLOT RADIUS)
(D=#7=DEPTH)
(E=#8=THICKNESS)
(F=#9=FEED RATE)
(I=#4=NUMBER OF SLOTS)
(J=#5=ANGLE OFFSET -OPTIONAL)
(K=#6=DEPTH OF CUT)
(M=#13=SPINDLE DIRECTION)
(R=#18=TOOL DIAMETER)
(S=#19=SPINDLE RPM)
IF[ABS[#5]GT0.]GOTO40
#5=0.
N40
#15=0.
IF[#18GT0.]GOTO70
#15=ABS[#18](Z RAPID)
#18=#3*2
N70
#110=.05+#18+#1(OD+TOOL+CLER)
#120=#2(SLOT DIA)
#122=#3-[#18/2](SL RAD-TOOL RAD)
#123=#120+[#3*2](SLOT PLUS SLOT RAD)
IF[[#18/2]LE#3]GOTO80
#3000=1(DIM R LARGER THAN DIM C)
N80
IF[ABS[#5]LE360.]GOTO90
#3000=2(J DIM GREATER THAN 360)
N90
IF[[#123+.05]LT#110]GOTO100
#110=#123(START X)
N100
#10=0.(SLOT COUNT)
#24=[360./#4](ANGLE)
#25=#5
N110
IF[#6LT.01]GOTO120
#14=#6
IF[#14LT#7]GOTO160
#3000=3(DEPTH OF CUT --- K)
N120
#14=#7
N160
G65P9090F#9M#13R#18S#19(SUB RPM FEED)
G113
M46
M5
G90G98G00X#110Z[#8+.1]
M8
M23
G28H0
G97S#148M#133
N170(INDEX LOOP)
G1X#110F30.
G00C#25(ANGLE)
G1Z[#8-#14]F50.
G112
G1C#122F50.
X#123F#149
IF[#122GT.0002]GOTO210(MUST GENERATE)
N200
IF[#15EQ0.]GOTO220(NO Z FEED)

IF[#14EQ#7]GOTO205
G1X#110F20.
G113
GOTO600
N205

G113
N208
G1Z[#8+.1]F#15
GOTO600
N210
G3X#123C-#122R#122F#149
N220
G1X#110F[#149*2.]
G113
GOTO600
N300
G113
G00Z[#8+.1]
#10=[#10+1.]
IF[#10EQ#4]GOTO500
IF[#6LT.01]GOTO330
#14=#6
N330
#25=[#25+#24]
IF[#25LE360.]GOTO170
#25=[#25-360.]
GOTO170
N500
M5
G113
M24
G00Z[#8+.1]
M9
G53Z-1.0
M99
N600(CHECK DEPTH)
IF[#14EQ#7]GOTO300
#14=#14+#6
IF[#14LT#7]GOTO170
#14=#7
GOTO170
Reply With Quote

  #7   Ban this user!
Old 09-10-2010, 01:33 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

For one thing it is really weird that if it was actually the syntax of the macro code the machine will usually alarm out with a PS alarm related to Fanuc issues.

I apologize but I am just finishing up and trying to get out of here on my first day off in weeks so at a quick glance I am going to give a few suggestions to try. Some of the suggestions should not matter code wise one way or the other as your code looks ok (where it is alarming) but I have seen some quirky things before.

#137=ROUND[#4120/100.] <--- Try #137=ROUND[#4120]/[100.] I am not quick sure why he is using this function because #4120 is the variable for the modal T() value which I would not think would need to be rounded unless he is trying to strip any offset calls with it.

#139=#[#138] <----Try #139=#[138] be careful with this one because it may be grabbing a value different then it was intended. Not sure what he is doing here without digging into the code. You typically use the # before the [ if you intend to keep valuing up and getting data from the next variable.

N100M99 <----Not quite sure about this one. The only possible problem I see with this is the fact that when you are running program 9025 and it calls program 9090 and reads the N100M99 it is suppose to go back to program 9090 to block N100 however the N100 is before the G65P9090 and has already been read. I don’t think this should matter but I have never proven it.

Good luck..I will check tomorrow if I can or someone else can jump in. If not I will try to strip everything down later.

Stevo
Reply With Quote

  #8   Ban this user!
Old 09-10-2010, 01:55 PM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road

Thanks for the input. I will give it a try. I did need to turn on some parameters in the 18i. I'm not sure if I told you this or not but the program will run on one side of out Mori DL151, but not the other side. The guy that wrote this was ahead of his time in Macro programming and is no longer availble to help. I don't think he left the company on good terms.

I hope you enjoy your day off.

Thanks,
Jackie
Reply With Quote

  #9   Ban this user!
Old 09-10-2010, 02:18 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Yup…still here

Ok now that I know that then there is probably nothing wrong with the syntax of the program. My guess is variables are not set properly or there is something specific from the MTB standpoint that it does not like something. If you are getting the same alarm on entirely different types of code then it is probably not the code.

Stevo
Reply With Quote

  #10   Ban this user!
Old 09-10-2010, 02:47 PM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road

Alright. At the risk of sounding stupid, what is MTB? I'm really new at this and could use all the info that I can get.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 09-10-2010, 02:51 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

No worries.

Machine Tool Builder (MTB). In your case it's Mori.

And yes I am still here. Told my wife I was leaving 3hrs ago.

Stevo
Reply With Quote

  #12   Ban this user!
Old 09-10-2010, 02:57 PM
 
Join Date: Sep 2010
Location: USA
Posts: 11
LostInMacro is on a distinguished road

You're not going to have a wife for long. No wonder you dream about Macros.

Now that I know what an MTB is almost makes sense. One machine is a Mori the other is a Wasino. But I still don't know why it works on one side of our DL151 and not the other side. This whole thing is really driving me nuts (short trip) and I've only been working on this for one week.
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
Custom Macro B rlgx4 Parametric Programing 7 08-02-2010 04:05 PM
Custom Macro? cncwhiz Fanuc 9 06-23-2010 10:11 PM
"difference between Custom Macro A and Custom Macro B" arulthambi Parametric Programing 4 10-05-2009 03:34 PM
Custom Macro B On A 18t. JIMMYZ Fanuc 3 10-18-2006 10:08 PM
custom macro The Metal Daewoo/Doosan 2 09-28-2006 07:26 AM




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