![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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.
|
|
#2
| |||
| |||
| 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.... |
|
#4
| |||
| |||
| 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. |
|
#5
| ||||
| ||||
| 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 .
__________________ It's just a part..... cutter still goes round and round.... |
| Sponsored Links |
|
#6
| |||
| |||
| 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. |
|
#7
| |||
| |||
| 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.... |
|
#8
| |||
| |||
| 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. |
|
#9
| |||
| |||
| 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.... |
|
#12
| |||
| |||
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. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |