CNC | M198 Code | External Subprogram Call (Quick Guide)

In this article, we describe how to use M198 code to calling external subprogram for CNC machines with all details and examples.

0
1863

M198 Code Introduction

During memory operation, you can call and execute a subprogram registered in an external device (such as a Memory Card, Handy File, or Data Server) connected to the CNC.

You may be interested also:
“CNC | M98 and M99 Codes | Subprogram Functions”

M198 Code Format

M198 Pxxxxxxxx Lyyyyyyyy ;

Parameters

M198 : Call external program
Pxxxxxxxx : Program number (or file number)
Lyyyyyyyy : Number of repetitive calls

Call program with a file name

M198 <xxxx> Lyyyyyyyy ;
xxxx : File name of an external subprogram
Lyyyyyyyy : Number of repetitive calls

Call program with a 4-digit program number

The following command format is valid only when a 4-digit program number is used.

M198 Pxxxx yyyy ;
xxxx : Number of repetitive calls
yyyy : Program number (or file number)

M199 Code

M199 : End of subprogram in external device

M198 Code Examples

M198 <SMPL100> L10; Calls SAMPL100 ten times.
M198 <SMPL200> L20; Calls SAMPL200 twenty times.
M198 P1234 L5 ; Calls O1234 five times.

 


Need to More?

Our volunteers have worked together and carefully prepared the articles published here in their native language without using machine translation. You can search the entire site for more information on the subject. You can start a discussion on CNCarea.com forums and join us to get support, ask questions, improve a published article or give your opinion.


Previous articleCNC Milling | Sample Program of a Scaling in Each Axis
Next articleFanuc Loader Control Function