2 creating user functions – Yaskawa MP930 User Manual

Page 82

Advertising
background image

3.5 Functions

3 -23

3.5.2 Creating User Functions

The body of the function (program) and the function definitions can be set by the user. The
maximum number of user functions is 500 per drawing.

For details on the CP-717 operation methods, refer to the MP9jj Machine Controller Pro-
gramming Software User’s Manuals
(SIEZ-C887-2.2-1, SIEZ-C887-2.2-2). For details on
instructions, such as the FSTART instruction, refer to the MP9jj Machine Controller Ladder
Programming User’s Manual
(SIEZ-C887-1.2). The methods for creating user functions is ex-
plained according to the following procedure.

1. Determining I/O Specifications

Determine the number of inputs and outputs and the data types.

2. Defining Function I/O

Input using the CP-717.

3. Programming the Body of the Function

Prepare in the same way as the drawings, except that different registers are used. Program
according to the correspondence between the register numbers used in the body of the
function program and the I/O data used when calling the function.

4. Preparing the Program that Calls the Function

Input using the following procedure:

a)

Use the FSTART instruction to input the function name.

b)

Use the FIN instruction to connect the input data.

c)

Use the FOUT instruction to connect the output data.

J

Determining the I/O Specifications

When a user function is created, the function capabilities, the number of inputs and outputs
required to satisfy the function, and other specifications must first be determined. Determine
the four types of specification shown in Table 3.9.

Table 3.9 Overview of Function Definition Values

Specification to

be Determined

Overview

Function Name

Up to eight characters can be input.

Number of Inputs The number of arguments input into a function. Up to 16 can be input.

Up to 17 arguments are possible if the address input is also counted.

Number of
Address Inputs*

The designated number of addresses required by the function. A maximum of
one value can be input.

Number of
Outputs

The number of outputs from the function. Up to 16 can be input.

* Indicates the number of pointers to be provided for the external function registers

used by the function.

3

Advertising