16: C
OORDINATE
C
ONVERSION
I
NSTRUCTIONS
16-4 FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
Example: Linear Conversion
The following example demonstrates setting up two coordinate points to define the linear relationship between X and Y. The two
points are (X0, Y0) = (0, 0) and (X1, Y1) = (8,000, 4,000). Once these are set, there is an X to Y conversion, as well as a Y to X
conversion.
M8120 is the initialize pulse special internal relay.
At startup, XYFS specifies two points.
When input I0 is on, CVXTY converts the value in D10 and stores
the result in D20.
When input I1 is on, CVYTX converts the value in D11 and stores
the result in D21.
The graph shows the linear relationship that is defined by the two
points:
If the value in data register D10 is 2,000, the value assigned to
D20 is 1,000.
For Y to X conversion, the following equation is used:
If the value in data register D11 is 2,500, the value assigned to
D21 is 5,000.
M8120
XYFS(I) Y1
4000
END
I0
CVXTY(I) D1
D20
I1
CVYTX(I) S1
D21
S1
0
X0
0
Y0
0
X1
8000
S1
0
S2
D10
S1
0
S2
D11
(X0, Y0)
(X1, Y1)
X
Y
0
D10 D21
D20 (1,000)
D11 (2,500)
8,000
(2,000) (5,000)