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


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.

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.