7 subroutine return (ret) – Yaskawa MP900 Series Motion Programming Manual User Manual

Page 108

Advertising
background image

Advanced Programming

3.1.7 SUBROUTINE RETURN (RET)

3 -18

Subroutine Restrictions
The following restrictions apply to the motion program coding within a subroutine. Write subroutines with
care.

S

A maximum of two parallel executions with the PFORK command.

S

When the PFORK command is used within a subroutine, axis move commands can be coded on only

one side.

S

From 1 to 256 main programs (MPMjjj) and subroutines (MPSjjj) can be used. The same

number cannot be used for both a MPM and MPS.

S

If the program number of a main program is called by the MSEE command, the program will not be

executed.

3.1.7 SUBROUTINE RETURN (RET)

J

Overview

The SUBROUTINE RETURN (RET) command is designated at the end of a subroutine.

J

Description

The RET command is designated as follows:

RET;
Subroutine ended.

With the RET command, program execution proceeds to the next block of the program (main
program or subroutine) after the SUBROUTINE CALL (MSEE) command that called the sub-
routine.

MPM001

MOV [axis1]1000;

....

MPS002

MOV [axis2]1000;
MOV [axis3]1000;

RET;

....

MSEE MPS002;

3

IMPORTANT

Advertising
This manual is related to the following products: