What's new
What's new

Subprogram end of program error

fuck it, I sometimes forget there is a very good reason I got out of CNC machining.

Picking up the scattered parts from ignorant programmers who refuse to listen to their own advice being a major one.

Later, enjoy misinforming the world.
One can only comprehend from your last Post, that you're talking about yourself. ALL of your posts here and other areas, have been misleading. You exhibit all of the traits of having little, or no understanding of Basic programming principles, not having bothered to read a programming manual, and no desire to learn. You wouldn't have been a loss to the CNC world when you got out of that line of work; and there would have been an immediate gain in IQ in the CNC fraternity when you pulled the pin.
 
Last edited:
One can only comprehend from your last Post, that you're talking about yourself. ALL of your posts here and other areas, have been misleading. You exhibit all of the traits of having little, or no understanding of Basis programming principles, not having bothered to read a programming manual, and no desire to learn. You wouldn't have been a loss to the CNC world when you got out of that line of work; and there would have been an immediate gain in IQ in the CNC fraternity when you pulled the pin.

I've said it before, but this site really needs some kind of downvote mechanism to bury posts that are wrong or dangerous. He's far from the first to post something that could be catastrophic were a greenhand to come and take it as gospel.
 
(O3013 DRILL3)
G54.1 P37
M09
M01
G17 G90 G94
N15 G100 T63 X-0.2755 Y-1.3313 G43 Z0.878 L19 H63 D63 S3409 M03
M08
G00 X-0.2755 Y-1.3313
G00 Z0.878
G17
G00 Z0.478
G73 X-0.2755 Y-1.3313 Z-0.057 R0.4615 Q0.07 F7
X0.2755
G80
G28 G91 Z0 Y0
G90
M99

What happens if you put a G00 on the G28 G91 Z0 Y0 line?
Or better yet, a G00 on the G80 line.
 
Richard, make sure you have the semicolon at the end of the M99 line (and every line!), example:

program text;
program text;
G91G28Z0;
M99;

If you don't have the semicolon, the machine doesn't see that line as completed.

For the others, the M400 and M401 codes turn on and off the Chip Wash pump with a user definable delay.
 
I've said it before, but this site really needs some kind of downvote mechanism to bury posts that are wrong or dangerous. He's far from the first to post something that could be catastrophic were a greenhand to come and take it as gospel.
True, but it must also be said that google-fooing G28 on the world-wide-whatever also mostly results in an incorrect definition.
The correct definition is:
G28 is a two shot command, which returns the specified axis to the Reference Return Position through an Intermediate Point.
Governing words in bold!
The fact that such position happens to be machine zero on most machines is coincidental and depends on design of the equipment.
For example on a Makino wire EDM commanding G28 returns the X and Y axes to smack in the middle of their travel because that is the reference return position (home) for those axis, and accordingly, the machine coordinate reads X and Y as a positive value.
Ditto for U and W axis. The only one homes to it's end of travel is Z.
IOW the only way to send X and Y to actual machine zero is by programming G00 G53 X0 Y0
G28 G91 X0 Y0 will end up ( on my machine ) somewhere @ X5.6 Y5.1 in machine coordinate.
 
Mind posting an example of it?
AS Frank mentioned, at least on the Brother

G80;
G28 G91 Z0 Y0;
M90 (With and without);
M99;

works but

G80;
G28 G91 Z0 Y0;
M90 (With and without);
M99
does not work
Easy to do, write a sub, hit save without hitting <CR> or copy a sub from one to another which I do all the time and not pick up that last character
 
IOW the only way to send X and Y to actual machine zero is by programming G00 G53 X0 Y0
Hello Seymour,
The only issue there is that G53 is an optional feature on a Fanuc Control at least and therefore, not all machines have it. G28 is present on all Fanuc controls, except for the very earliest that used Dial Indicators to set the Reference Return Position on initial power on, or when, for whatever reason, the operator had to get the axes back to a known position.

Regards,

Bill
 
Last edited:
Hello Seymour,
The only issue there is that G53 is an optional feature on a Fanuc Control at least and therefore, not all machines have it. G28 is present on all Fanuc controls, except for the very earliest that used Dial Indicators to set the Reference Return Position on initial power on, or when, for whatever reason, the operator had to get the axis back to a known position.

Regards,

Bill
Bill

I was specifically talking about the Makino wire EDM-s.
At least since the Duo series, the machine home position is in the middle of the workzone for X and Y ( same for U and W also )
It is an arbitrary position determined at the factory during assembly.
Basically there are 2 limit switches as you'd expect, but unlike typical setups only one switch is used for End Of Travel with 2 dogs on either ends.
The other switch is is used exclusively for homing and it has it's own dog, bolted somewhere in the middle of the travel.

Anyhow, G28 will only move to the Home position, so if you need to move to absolute machine zero for whatever reason, the only option is G53.


That said, I did not know that G53 is an option on Fanuc.
I've got 3 others ( aside from the Makino version of Fanuc ), all lathe controls, and they all came with G53 as standard, even the Oi Mate.
 
That said, I did not know that G53 is an option on Fanuc.
I've got 3 others ( aside from the Makino version of Fanuc ), all lathe controls, and they all came with G53 as standard, even the Oi Mate
If the machine is equipped with Workshift Offsets (G54 - G59), which is also an optional feature, it will also have G53. I've seen many Lathes that only have the one basic Workshift, that don't have G53.

Kevin, AKA Vancbiker has a CNC mill that has no G53 option, which I help him out with a Macro called by the Custom "G" code G53, that mimicked all the attributes of G53, that he was able to modify to work with his version of User Macro. I've seen a few other basic machining centers that didn't have G53 available.

Regards,

Bill
 
Richard, make sure you have the semicolon at the end of the M99 line (and every line!), example:

program text;
program text;
G91G28Z0;
M99;

If you don't have the semicolon, the machine doesn't see that line as completed.

For the others, the M400 and M401 codes turn on and off the Chip Wash pump with a user definable delay.
Thank you, Frank.

My post editor that I copied from does not show the Semicolon but when I load it, every line has one.

I created two small drill cycles from other programs with different WCS. The fix, I did not catch but someone did in this thread earlier, empty space under the M99. Thank you guys.
 
Last edited:








 
Back
Top