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) = (8000, 4000). Once these are set, there is an X to Y conversion, as well
as a Y to X conversion.
XYFS(I)
M8120
CVXTY(I)
I0
CVYTX(I)
I1
Y
D11 (2500)
D20 (1000)
0
(X0, Y0)
S1
X0
Y0
0
0
0
8000
S1
S2
D1
0
D10
D20
S1
S2
S1
0
D11
D21
D10
D21
(2000)
(5000)
« FC4A M
19: C
M8120 is the initialize pulse special internal relay.
X1
Y1
4000
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.
END
The graph shows the linear relationship that is defined
(X1, Y1)
by the two points:
If the value in data register D10 is 2000, the value
assigned to D20 is 1000.
For Y to X conversion, the following equation is used:
8000
X
If the value in data register D11 is 2500, the value
assigned to D21 is 5000.
S
U
'
M
ICRO
MART
SER
S
ANUAL
C
OORDINATE
ONVERSION
1
=
-- -X
Y
2
X
=
2Y
»
I
NSTRUCTIONS
19-5