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 02-06-2008, 08:07 AM
 
Join Date: Sep 2007
Location: USA
Posts: 33
JSaindon is on a distinguished road
G65

We have an old Allen Bradley 9/240 control on a grinder and it seems to hang up after the dressing subprogram with coolant still on. It seems that the G65 paramacro was the culprit, I just was not sure why. Here is the program in question.

(XO96L PLUNGE GRIND)
G65P993
#500=58 (Position of pocket to cut)
G65P9302C2D0F10I1.0J.125K1.2R2.0S105U0W0X0Y-.100Z.0000 (Cut Part)
G65P901A90D.003E07M0R2S70U1V1 (Dress Roll)
M9 (Coolant Off)
G65P994 (Return to Load Position)
M30

Since the machine came up with no alarms, I wanted to dig into the programming and check for any redundancies and errors. I noticed the G65P994 was in all of the programs that would "hang up". Here is what I read about the G65.

The key difference between a subprogram and a G65 paramacro is that a
paramacro always gets a new set of local parameters; a subprogram uses
the same set of local parameters that the main program used.

The G65 command is non-modal. The macro is executed only at the time
the control executes the G65 block. The control calls the macro specified
by the G65 block as programmed by the P word.
Once I removed G65 and just used the P994 call, the program hasn't hung up yet. From what I read about it I don't see why it would matter if it were in there or not. All P994 does is move the table to the loading position. If anyone knows more about the G65 or modal/non-modal paramacros, could you explain maybe in more general terms what these are and if the G65 is necessary in my case? I could post the P994 program also if needed.
Reply With Quote

  #2   Ban this user!
Old 02-06-2008, 11:05 AM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

I'm not sure on a A-B control, but the G65 in your program (for other controls) is a macro sub call to program number 994. If I were to guess, your program 994 has a problem with it and that's the hangup. If you strip the G65 and you're not hanging up, I'd say that the control is just simply blowing past through the "P994" line. Essentially ignoring it. You could post your 994 program. Maybe we'll see something wrong there....
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #3   Ban this user!
Old 02-06-2008, 12:55 PM
 
Join Date: Sep 2007
Location: USA
Posts: 33
JSaindon is on a distinguished road

Here is the P994 program. The table does go back to the loading position though.

O00994(TO LOADING POSITION)
(25-NOV-1993)
#2101=#5508/2
#5321=0,#5322=0,#5323=0
T1
G1G59G61G90Y#545F0
M09M79T0
X#544Z#546
M99
Reply With Quote

  #4   Ban this user!
Old 02-07-2008, 07:49 AM
 
Join Date: Sep 2007
Location: USA
Posts: 33
JSaindon is on a distinguished road

The program actually hangs up in the P901 program though. At least that is the line of code that is displayed on the screen when it hangs up. Unless the actual line of code the control hangs up on would be passed the one displayed, I'm not sure of this.

Would the program not execute the P994 without a paramacro call before it? Couldn't I just use M98 to call the subprogram?

When a G65 is executed, where does the new set of local parameters come from? If the parameter was altered in the main program, is there a backup of that parameter that gets loaded to the original value when the G65 is executed? I got confused at the manual's explanation.

If P994 is being skipped why would the table go back to the load position then? So many questions I cannot find the answers to. The programming manual alone doesn't explain enough for me to grasp what is going on in my situation. Knowing only what I read in the manual doesn't help much either.
Reply With Quote

  #5   Ban this user!
Old 02-08-2008, 08:29 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

Any "Look Ahead" on the control may confuse the issue as well. If you can, what you'll want to do is bump through the program in single block mode. This way, when the machine reaches the line with the problem, it will stop on that line. When a machine has any look ahead, its possible to "bomb out" before it actually gets to the line with the problem... especially if its contained within a macro sub or standard subs.

Normally, a P address by itself will not jump to a sub unless it has a G65, G66, M98, .. or any other sub call commands. Some machines can be set up differently though. Yours may jump to the P address but it may have limited functions in the way its handled (as a simple M98 for example) so you'll have to go over the books on that.

For G65, the "parameters" or variables gets loaded from that line of the call. Something like this:

G65P8855E12.R.005

In this line, it will set the variable for E (#8) to 12. and "R" (#18) to .005 .

If the parameter was altered in the main program, is there a backup of that parameter that gets loaded to the original value when the G65 is executed?
Uh... yes and no. What you would need to get into here is called Nesting. This is how you can change levels of the macro to utilize new values while retaining previous values or commands. That's another story though and for the time being, you may want to remain concentrated to simple or single level programming.

Couldn't I just use M98 to call the subprogram?
In your post of the the 994 program call, Yes. You could do the same thing with M98. But, in the same program where it calls "P9302" and "P901"... No. You'll see those lines are also setting values to variables (A, C, D, I, J, K, etc). M98 is simple sub call and doesn't allow for variables. Since the "994" call isn't setting any variables, you could use M98.
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-12-2008, 09:23 AM
 
Join Date: Sep 2007
Location: USA
Posts: 33
JSaindon is on a distinguished road

Thanks for clearing some of my questions up. I now understand clearly how the paramacros are called. Since this is/was an intermittent problem and not really a high priority I won't bother running in steps. I don't need the P994 in there anyway since the table goes back to home anyway. With P994 in there it goes to a slightly different position, so I will just leave it out and it is not an issue. The control doesn't hang up anymore either.

One last thing though about the "look ahead". I am aware of this on these controls, and I was assuming that means that the actual line of code the control is on would be after the line displayed on the monitor correct? So P994 could be the issue since the #1000 comparison is at the end of P901.

Either way, the control works, this just has been bugging me. Thanks again for the input.
Reply With Quote

  #7   Ban this user!
Old 02-13-2008, 02:47 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

I think you're on the right track about look ahead. Basically, its this: Often the look ahead function may stop the control if it detects an error. But physically, your machine may not have reached that point yet. For example:

X-1.Y13.
G1Z-.5F100.
X2.
G0Z.25
X14.
M98P200
.
.
.
O200(SUB 200)
X.6Y-1.
X1.5I-1.5J.875
G1X...
.
.

In the above example, control may appear to stop at the line "M98P200" or possibly one or two lines before it. In reality, the error is in the sub at the line with the arc motion (I and J) because you don't have a G2 or G3 for it. This isn't just a sub routine thing either, it can often happen in root programs as well.

HTH
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #8   Ban this user!
Old 02-14-2008, 09:16 AM
 
Join Date: Sep 2007
Location: USA
Posts: 33
JSaindon is on a distinguished road

I got you. From what I see all the programs seem fine though. I just changed the sub call to M98 and no issues since. I don't know why the programmer put that return to home P994 program in there, the machine goes back to just about the same spot without it. It seems like when the machine finishes the program it goes back to the start position, so P994 is pretty much redundant in my case. Hey, "if it works don't fix it" applies here. Thanks for clearing up some questions I had though. Much appreciated.
Reply With Quote

  #9   Ban this user!
Old 02-14-2008, 09:03 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

One thing to think about... the call line might have been there as a safety line or safety move to retract for things like tool changing, wheel dressing, end of program... a number of things. Maybe a variable in the program got wiped out by accident or code edited mistakenly.
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #10   Ban this user!
Old 02-15-2008, 09:49 AM
 
Join Date: May 2007
Location: US
Posts: 779
Andre' B is on a distinguished road

I can't say I know anything about this control but, I see a line in that 994 sub with a G1 move at a feed of zero.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-15-2008, 11:01 AM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

I missed that.... duh


I think you're right....
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

  #12   Ban this user!
Old 02-16-2008, 02:24 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road
Look ahead

Originally Posted by psychomill View Post
I think you're on the right track about look ahead. Basically, its this: Often the look ahead function may stop the control if it detects an error. But physically, your machine may not have reached that point yet. For example:

X-1.Y13.
G1Z-.5F100.
X2.
G0Z.25
X14.
M98P200
.
.
.
O200(SUB 200)
X.6Y-1.
X1.5I-1.5J.875
G1X...
.
.

In the above example, control may appear to stop at the line "M98P200" or possibly one or two lines before it. In reality, the error is in the sub at the line with the arc motion (I and J) because you don't have a G2 or G3 for it. This isn't just a sub routine thing either, it can often happen in root programs as well.

HTH

I am under the following impression about look-ahead:
1. For a program without radius compensation and without macro statements: One block.
2. For a program with radius compensation but without macro statements: Two blocks.
3. For a program with macro statements: Several blocks of consecutive macro statements.
This is the reason why, in the radius compensation mode, if two consecutive non-motion blocks are specified, the tool does not position it properly at the start of the next line (or arc), because it does not "see" this line (or arc) while executing the previous line (or arc).
I am not an expert, though I have a habit of reading and analyzing. So, please correct me if I am wrong. Thanks.
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





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