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 08-26-2008, 09:58 AM
 
Join Date: Jul 2007
Location: USA
Posts: 78
maximusek is on a distinguished road
GOTO jump instruction

Hi

In Nakamura TW-10 with controller Fanuc 18T I'm not able to jump over the block of the program GOTO10, GOTO#10 (as book says) gives me back alarm message 004 adress not found. I'm sure there is block N10 in my program. Any clue?? Thank You for any advise
Reply With Quote

  #2   Ban this user!
Old 08-26-2008, 10:21 AM
jamesweed's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 82
jamesweed is on a distinguished road

GOTO10 would be correct
GOTO#10 will not work
It can only jump to a line number, not a varible number. You will need to have macros enabled on your control to use GOTO command.
Reply With Quote

  #3   Ban this user!
Old 08-26-2008, 11:54 AM
 
Join Date: May 2007
Location: US
Posts: 779
Andre' B is on a distinguished road

Originally Posted by jamesweed View Post
GOTO10 would be correct
GOTO#10 will not work
It can only jump to a line number, not a varible number. You will need to have macros enabled on your control to use GOTO command.
But this should work just fine.
Code:
#10 = 10
GOTO#10 
.
.
.
.
N10 ...
Reply With Quote

  #4   Ban this user!
Old 08-26-2008, 12:40 PM
jamesweed's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 82
jamesweed is on a distinguished road

I dont think you can assign varibles to line numbers.
Reply With Quote

  #5   Ban this user!
Old 08-26-2008, 02:36 PM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

The correct syntax for MY Fanuc is GOTO10

Sometimes you can use

M99P10

Instead of the GOTO statement

Does the same thing, unless its from a sub, then it would return to the main program looking for an N10
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-26-2008, 05:11 PM
 
Join Date: Jul 2007
Location: USA
Posts: 78
maximusek is on a distinguished road

Thank U Guys, I think "You have to enable macros in your machine" is correct :-); In my swiss simple GOTO10 works without any problem, GOTO#10 is taken from Fanuc Programing Manual. Now I have to figure out how to check "macros enabling" in my TW-10, heh I love this job...:-)

for all
Reply With Quote

  #7   Ban this user!
Old 08-26-2008, 09:06 PM
jamesweed's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 82
jamesweed is on a distinguished road

Originally Posted by maximusek View Post
Thank U Guys, I think "You have to enable macros in your machine" is correct :-); In my swiss simple GOTO10 works without any problem, GOTO#10 is taken from Fanuc Programing Manual. Now I have to figure out how to check "macros enabling" in my TW-10, heh I love this job...:-)

for all
"GOTO#10 is taken from Fanuc Programing Manual"... Ive never seen such a example, but to check if you have macro option just MDI #1=1 If it alarms out, you dont have the option my friend If you do have macro option, then GOTO10 should work just fine
-Jim
Reply With Quote

  #8   Ban this user!
Old 08-27-2008, 09:40 AM
 
Join Date: May 2007
Location: US
Posts: 779
Andre' B is on a distinguished road

It has been a while since I used it and now that I think of it some controls may want the variable in []. I have used this type of program on both Mit and Fanuc controls.
GOTO[#10]


It is just like when you use a variable in a gcode word like the code below.
Set #3 to 0 and the path goes around counter clockwise, set it to 1 and the path goes around clockwise. You can do this type of thing when you want to mirror the cut but still climb mill on both mirrored and non mirrored parts.

Code:
#3=1  (0 COUNTER CLOCKWISE, 1 CLOCKWISE)

G0X0Y0
G1G[41+#3] X1.000 D1 F20.0
G1 Y[-0.750*[[#3*2]-1]]
G[3-#3] X0.750 Y[-1.000*[[#3*2]-1]] R0.250
G1 X-0.750
G[3-#3] X-1.000 Y[-0.750*[[#3*2]-1]] R0.250
G1 Y[0.750*[[#3*2]-1]]
G[3-#3] X-0.750 Y[1.000*[[#3*2]-1]] R0.250
G1 X0.750
G[3-#3] X1.000 Y[0.750*[[#3*2]-1]] R0.250
G1 Y0.000
G1G40 X0 Y0
Reply With Quote

  #9   Ban this user!
Old 08-27-2008, 09:46 AM
 
Join Date: Jul 2007
Location: USA
Posts: 78
maximusek is on a distinguished road

Originally Posted by jamesweed View Post
"GOTO#10 is taken from Fanuc Programing Manual"... Ive never seen such a example, but to check if you have macro option just MDI #1=1 If it alarms out, you dont have the option my friend If you do have macro option, then GOTO10 should work just fine
-Jim
Because I don't like to be a liar :-) Fanuc 16Tc-18Tc Operators Manual - chapter 16 Custom Macro - 16.5.1 Unconditional Branch (GOTO Statement) page 290. It wasn't Programming Manual though - sorry

Thank You for second part of your post...

Last edited by maximusek; 08-27-2008 at 04:00 PM.
Reply With Quote

  #10   Ban this user!
Old 08-27-2008, 10:05 AM
jamesweed's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 82
jamesweed is on a distinguished road

maximusek,
I wasn't calling you a liar! and your right its in my macro section as well...so i'm the liar! It doesnt give a example how to use this GOTO#10
I will have to check this out today. I've never seen such a thing??? learn something new all the time. Did you find out if you have macros?

%
#10=1;
GOTO#10;
;
;
N2;
N1;
M30;
%
Okay, this does work. My apolgies to everyone involved in this thread. I learned macros on Allen/Bradley contols and this doesn't work there. I learn new stuff all the time. Which is why I like to program macros in the first place. I think what I was thinking was this...N#10. That would not work.(or would it??? )

Last edited by jamesweed; 08-27-2008 at 10:14 AM. Reason: checked on control
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 08-27-2008, 04:16 PM
 
Join Date: Jul 2007
Location: USA
Posts: 78
maximusek is on a distinguished road

jamesweed,

I know You didn't call me liar, maybe I should answer different way, I apologize. The reason I asked about is: making program is one thing but setup is another. Many times I have to compromise cycle time and f.ex. good surface finish or tool life. It is very usefull to jump over the part of the program using just GOTO (next block) to change the order of operations etc.etc. When First Part Raport is done and spindles are still in the same place I clean everything to prepare final version to back it up, but during setup, program looks like war zone :-). I was very suprise when in my swiss GOTO100 works ok and in tw-10 Nakamura not. Maybe tomorrow I'll check it out, interface looks like MS-DOS, I suspect I don't have macros enabled. That lathe is the oldest machine we have. That may be a problem. Anyway thank You Guys for help- jamesweed, Andre'B, beege -
Reply With Quote

  #12   Ban this user!
Old 08-28-2008, 11:05 AM
jamesweed's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 82
jamesweed is on a distinguished road

maximusek you have a private message.
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
Using GOTO in a mazak program CAMCRASH G-Code Programing 8 03-16-2012 05:31 AM
GOTO Z button TMaster Mach Mill 10 05-30-2009 07:18 AM
Z goto 0 first ? SScnc Mach Mill 7 08-10-2008 12:31 PM
Need Help!- GOTO Z monte55 Mach Software (ArtSoft software) 12 02-06-2008 09:03 AM
Goto Z's button... also the @#$%#$% wizard... InspirationTool Mach Mill 2 04-01-2007 09:54 PM




All times are GMT -5. The time now is 12:04 AM.





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