beautypg.com

Yaskawa MP940 User Manual

Page 80

background image

3.5 Functions

3-33

3

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.9 Pointer Designation for Address Input Registers

4. Create a motion program that calls the function.

User functions can also be called from motion programs.

The user functions shown in the Relationship Between I/O Data and Internal Function
Registers Table would be called from a motion program using the following coding:

UFC TEST DB000000 DB000001 DF00001 DW00003,MA00300,

DB000020 DB000021 DL00010 DW00012;

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.

UFC DB000000

• • •

, MA00300, DB000020

• • •

;

Condition

DB000020==ON

MVS [X]100. F10000;

.
.
.

AW00000
AW00001
AW00002
AW00003

MW00300
MW00301
MW00302
MW00303

MA00300

Internal function

External registers

Pointer

INFO