beautypg.com

2 creating user functions, 3 determining the i/o specifications – Yaskawa MP940 User Manual

Page 76

background image

3.5 Functions

3-29

3

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 32 per drawing.

The methods for creating user functions is explained according to the following procedure.

• For details on CP-717 operations, refer to MP9

††

Machine Controller User’s Manual Program-

ming Panel Software (SIEZ-C887-2.3 (for simple operation) (To be prepared), SIEZ-C887-2.4 (for
standard operation) (To be prepared)).

• For details on using instructions such as FSTART, refer to MP9

††

Machine Controller User’s

Manual Programming (SIEZ-C887-1.2).

3.5.3 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 the following table.

Table 3.8 Overview of Function Definition Values

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

registers used by the function.

                           

                           

Determining I/O Specifica-

tions

Determine the number of inputs and outputs and the data

types.

Defining Function I/O

Input using the CP-717.

Programming the Function

Prepare in the same way as the drawings, except that differ-

ent registers are used. Program according to the correspon-

dence between the register numbers used in the body of the

function program and the I/O data used when calling the

function.

Preparing the Program for

Calling the Function

Input using the following procedure:

1. Use the FSTART instruction to input the function name.

2. Use the FIN instruction to connect the input data.

3. Use the FOUT instruction to connect the output data.

INFO

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.