8 subprogram call up function (m98, m99), Table 4.1.8.1 subprogram call m code – Yaskawa YASNAC PC NC Programming Manual User Manual

Page 204

Advertising
background image

4 - 67

YASNAC PCNC Programming Manual

Chapter 4: Enhanced Level Commands

4.1.8

Subprogram Call Up Function (M98, M99)

This function can be used when subprograms are stored in the part program memory. Sub-pro
grams registered to the memory with program numbers assigned earl be called up and executed as
many times as required.

The created subprograms should be stored in the part program memory before they are called up.

0 • • • • • • • • • ?

Program

number

• • • • • • • • • • • • ;

• • • • • • • • • • • • ;

• • • • • • • • • • • • ;

M99;

? Program number

(1) Commands

The M codes indicated in Table 4.19 are used.

Table 4.1.8.1

Subprogram Call M Code

(a) Subprogram call (M98)

By specifying “M98P • • • L • • •;”, the subprogram of the program number that is
specified by P is called up and executed by the number specified by L. If L is omitted,
the subprogram is executed once. If the specified program number is not found, alarm
“0390” occurs.

Nesting of subprograms is possible - the allowable nesting level is four. If the nesting
level exceeds this limit, an alarm occurs.

By specifying “M98P • • • L • • • Q • • •;” the subprogram specified by the P command
is executed from the block specified by the Q command. A sequence number must be
specified by a numeral of up to five digits.

M Code

Function

M98

Subprogram call up

M99

End of subprogram

Advertising