5 user function call (func), Joverview, Jdescription – Yaskawa MP900 Series Motion Programming Manual User Manual
Page 195: Jprogramming examples

6.1 MP2300S/MP2400 Exclusive-use Commands
6 -9
6.1.5 USER FUNCTION CALL (FUNC)
Use in a sequence program
Possible
Use in a motion program
Not possible
J
Overview
The FUNC command calls user functions (ladder programs) from the sequence program.
J
Description
The FUNC command is designated as follows:
FUNC Function name Input data 1, input data 2, input data 3
S
S
S
,
Input address,
Output data 1, output data 2, output data 3
S
S
S
;
Function name: Up to 8 ASCII characters
Input data:
Up to 16 data items (at least 1 data item is required)
Input address:
Up to 1 address
Output data:
Up to 16 data items (at least 1 data item is required)
Notes 1.
Several items for the above input data and output data can be described,
respectively. (At least 1 item must be described.) The input address can
be omitted. When it is omitted, describe only the comma (,).
2.
The FUNC command calls a user function. The execution
proceeds to the next block after FUNC whether or not
the user function execution has been completed.
J
Programming Examples
The following illustration provides a programming example for the FUNC command.
In this example, input data 3, input address, and output data 3 are used.
FUNC KANSUU MB000000 IW0010 MB000020, MA00100
Function name
Input data
Input address
MB000001 MW00201 ML00202;
Output data
INPUT-1
OUTPUT-1
INPUT-2
OUTPUT-2
INPUT-3
OUTPUT-3
INPUT-4
MA00100
IW0010
MB000000
MB000001
MB000020
MW00201
ML00202
Function name
Programming Example for USER FUNCTION CALL (FUNC)
6
6