What's new
What's new

semens 808D

daabren

Plastic
Joined
Aug 11, 2019
Hey all.
Can anyone help with programming a subroutine/subprogram please ?

The program is Fanuc on Seimens 808D basic.
I have 2 datum points set up on the milling table G55 and G56
I will call the subprogram .....LABEL1
I know I must finish the subprogram with M17

I will position the cutter at the respective Datum points and call the subprogram. My problem is what is the command to call the subprogram ?
Also do I write the subprogram at the start of the main program ?
Thanks for any advice offered.
Dave.
 
Hey all.
Can anyone help with programming a subroutine/subprogram please ?

The program is Fanuc on Seimens 808D basic.
I have 2 datum points set up on the milling table G55 and G56
I will call the subprogram .....LABEL1
I know I must finish the subprogram with M17

I will position the cutter at the respective Datum points and call the subprogram. My problem is what is the command to call the subprogram ?
Also do I write the subprogram at the start of the main program ?
Thanks for any advice offered.
Dave.
Hello Dave,
The program is saved as a separate program; this allows it to be called by any other program, including other Subprograms. The Subprogram is called by specifying its name in a separate NC block when its required. M17 at the end of the Subprogram returns Control to the Calling Program.

Regards,

Bill
 
Ok don't know siemens, so it may not apply. In Fanuc, there are 2 types of subprograms, local and global(?) Not sure of exact terminology as I don;t use them much... One uses M98 to call the subprogram and one uses M99. Don't remember which is which... one is local contained in the main program body, and one is global(?) contained in the controller as it's own program if that makes sense...

edit: sorry, think it might be M97 and M98 as M99 is the loop command...
 
Last edited:
Ok don't know siemens, so it may not apply. In Fanuc, there are 2 types of subprograms, local and global(?) Not sure of exact terminology as I don;t use them much... One uses M98 to call the subprogram and one uses M99. Don't remember which is which... one is local contained in the main program body, and one is global(?) contained in the controller as it's own program if that makes sense...

edit: sorry, think it might be M97 and M98 as M99 is the loop command...
Hello Mike,
Still no Cigar.

With a Fanuc Control that is able to Call a Subprogram by Sequence Number (introduced with the FS16i control) M98 is used to Call both Local and External Subprograms; with a Q address for a Local Subprogram, with a P address for an External Sub, with a P and Q address to start at a particular Sequence Number (specified by the Q address) in the External Sub. Whether Local, or External Subprogram, M99 is used to return control to the Calling Program. Haas uses M97 to call a Local Subprogram and M98 for an External Subprogram.

Regards,

Bill
 
Hello Mike,
Still no Cigar.

With a Fanuc Control that is able to Call a Subprogram by Sequence Number (introduced with the FS16i control) M98 is used to Call both Local and External Subprograms; with a Q address for a Local Subprogram, with a P address for an External Sub, with a P and Q address to start at a particular Sequence Number (specified by the Q address) in the External Sub. Whether Local, or External Subprogram, M99 is used to return control to the Calling Program. Haas uses M97 to call a Local Subprogram and M98 for an External Subprogram.

Regards,

Bill

LOL of course you are correcting me. ;)

Yes most of my Fanuc exp is the Haas branded version of it. I ran a robodrill for a while, but don't think we used subs with it so much as we used camplete and mastercam...

edit: in my defense, our sodick uses those M97/98 codes for subs too... (not that we do much subbing..)
 








 
Back
Top