beautypg.com

5 creating the body of the function – Yaskawa MP940 User Manual

Page 78

background image

3.5 Functions

3-31

3

The following figure shows an example of the I/O definitions of a function.

Fig 3.7 Graphic Representation of a Function 2 (Example)

I/O signal addresses are automatically allocated from the highest signal on the graphic repre-
sentation. For the example given in the figure shown above, the allocation of each I/O regis-
ter will be as shown in the following table.

Table 3.9 Allocation of I/O Registers

Note: XW00000 and YW00000 of the X and Y registers are used for bit

data.

The function I/O registers shown in the above figure are allocated automatically. The exter-
nal framework of the function is completed at this stage.

3.5.5 Creating the Body of the Function

The body of the function is created in the same way as the drawings except that the types of
register used are different. For details on the registers, see 3.6.3 Types of Register.

Name

Data Type

I/O Register

IN _ 01(BIT1)

Bit

XB000000

IN _ 02(BIT2)

Bit

XB000001

IN _ 03(FLT1)

Real number

XF00001

IN _ 04(INT1)

Integer

XW00003

IN _ 05(ADR)

Address input

AW00000

OUT _ 01(BIT3)

Bit

YB000000

OUT _ 02(BIT4)

Bit

YB000001

OUT _ 03(LNG1)

Double integer

YL00001

OUT _ 04(INT2)

Integer

YW00003

TEST

IN_01

IN_02

IN_03

IN_04

IN_05

OUT_01

OUT_02

OUT_03

OUT_04

BIT1

BIT2

FLT1

INT1

INT2

LNG1

BIT4

BIT3

===>

===>

===>

===>

ADR

Bit numeric input

Bit numeric input

Real number

numeric input

Integer numeric

input

Bit numeric output

Bit numeric output

Double integer

numeric output

Integer numeric

output