10 inverse function generator instruction (ifgn) – Yaskawa Ladder Works Programming Manual User Manual

Page 147

Advertising
background image

7.10 INVERSE FUNCTION GENERATOR Instruction (IFGN)

7-26

7.10 INVERSE FUNCTION GENERATOR Instruction (IFGN)

[Outline]

The IFGN instruction generates a function curve according to the contents of a previously set
parameter table. The input to the IFGN instruction can be integer, double-length integer, or real
number data.
The configuration of the parameter table differs according to the type of data.

If the data set in the parameter table for the IFGN instruction are Xn and Yn, the data must be set so
that Yn is less than or equal to Yn+1. The IFGN instruction searches for an Xn/Yn pair within the
parameter table in which Yn is less than or equal to Y which is less than or equal to Yn+1 from input
value Y and calculates the output value X.

Table of Integer Type IFGN Instruction Parameters

ADR

Type Symbol

Name

Specification

I/O

0

W

N

Number of data

Number of pairs of X and Y

IN

1 W X1

Data

1

IN

2 W Y1

Data

1

IN

3 W X2

Data

2

IN

4 W Y2

Data

2

IN

2N-1 W XN

Data

N

IN

2N W YN

Data

N

IN

Table of Real Type IFGN Instruction Parameters

ADR

Type Symbol

Name

Specification

I/O

0

W

N

Number of data

Number of pairs of X and Y

IN

1 W -

(Reserve) Reserve

register

IN

2 L/F X1

Data

1

IN

4 L/F Y1

Data

1

IN

6 L/F X2

Data

2

IN

8 L/F Y2

Data

2

IN

2N-1 L/F XN

Data

N

IN

2N L/F YN

Data

N

IN

If the data set in the parameter table for the IFGN instruction are X

n

and Y

n

, the data must be set so

that X

n

≦Y

n+1

. The IFGN instruction searches for an X

n

/ Y

n

pair within the parameter table for

which Y

n

≦Y≦Y

n+1

and computes the output value Y according to the following formula:

X

n+1

– X

n

X = X

n

+

Y

n+1

– Y

n

× (Y – Y

n

) ( 1≦n≦N – 1 )

If the X

n

/ Y

n

pair, which satisfies Y

n

≦Y≦Y

n+1

for an input value Y, does not exist in the parameter

table, the result will be as follows:

IF Y<Y

1

X

2

– X

1

X = X

1

+

Y

2

– Y

1

( Y – Y

1

)

IF Y>Y

1

X

n

– X

n-1

X = X

n+1

+

Y

n

– Y

n-1

( Y – Y

1

)

Advertising