Yaskawa MP920 User's Manual Design User Manual

Page 102

Advertising
background image

3 Basic System Operation

3.5.6 Creating the Program that Calls the Function

3-28

In the table, address input register AW00000 is allocated to MA00300. That is, registers
AW00000, AW00001, and so on, used inside the TEST function correspond to external
registers MA00300, MA00301, and so on. Therefore, if a given value in AW00000 is
stored inside the function, this value will be stored in MA00300.

Fig. 3.10 Pointer Designation for Address Input Registers

4. Creating a motion program that calls the function.

User functions can also be called from motion programs.

Example: The user functions shown in Table 3.11 would be called from a motion pro-

gram using the following coding:

„

Conditions for referencing a user function from a motion program

• The first item of output data must be bit data.

This output will be the completion signal for moving to the next motion command.

Table 3.11 Relationship Between I/O Data and Internal Function Registers

Name

I/O Data

Internal Function Register

BIT1

DB000000

XB000000

BIT2

DB000001

XB000001

FLT1

DF00001

XF00001

INT1

DW00003

XW00003

ADR

MA00300

AW000000

BIT3

OB00020

YB000000

BIT4

OB00021

YB000001

LNG1

DL00010

YL00001

INT2

DW0012

YW00003

AW00000

AW00001

AW00002

AW00003

MA00300

MA00301

MA00302

MA00303

Internal function

External registers

Pointer

UFC DB000000..., MA00300, DB000020...;

↓ condition BB000020==ON

MVS [X]100. [Y]200. F10000;

.
.

.

UFC TEST DB000000 DB000001 DF00001 DW00003,MA00300,

DB000020 DB000021 DL00010 DW00012;

Advertising