
Originally Posted by
angelw
HAAS use both methods of registering and calling Sub Programs. M98 calls a Sub Program registered as a separate program in the way Fanuc does, and M97 to call a program registered after the M30 in the same program area as the main Program.
This is not possible directly with a Fanuc Control, but you could emulate the same procedure by using a Macro GOTO_ statement, or M99 P_. In this case, you would use a unique sequence number at the start of the pseudo Sub Program, registered after the M30 in the Fanuc main program, to correspond to the GOTO or P reference. Of course, you would have to provide code at the end of the pseudo Sub Program to return control to the actual Main Program. M99 alone at the end will not function like M99 at the end of an external Sub Program and return control to the block following from whence it was called. You would have to have a GOTO_ or M99 P_ at the end of the routine to return control to the desired location in the Main Program.
Regards,
Bill