EasyManua.ls Logo

Mitsubishi Electric R64MTCPU - Page 165

Mitsubishi Electric R64MTCPU
354 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4 OPERATION CONTROL PROGRAMS
4.8 Data Control
163
4
Program example
Program which sets 4 points of scaling conversion data to D3000 to D3009 and substitutes the
output value, which is positively converted based on the input value "7500", to D3106
Output value = 6000 +
7000 - 6000
10000 - 4000
(7500 - 4000)
×
0
X
Y
END
16-bit scaling
[F10]
[G10]
[F20]
5000 10000
4000
8000
7500
6583.333...
Point 2
Point 1
Point 0
//Scaling conversion data set
D3000=K4 //Number of point=4
D3001=K0 //Unusable area
//Set the point 0 to 3
D3002=K0 //Point 0
D3003=K1000 //(X0, Y0)=(0, 1000)
D3004=K2000 //Point 1
D3005=K3000 //(X1, Y1)=(2000, 3000)
D3006=K4000 //Point 2
D3007=K6000 //(X2, Y2)=(4000, 6000)
D3008=K10000 //Point 3
D3009=K7000 //(X3, Y3)=(10000, 7000)
X0 //Standby until X0 turns ON
//Positive conversion execution (Output value is
stored in D3106)
SCL K0,K7500,D3000,D3106
Point 3
The output value is calculated from the setting value
of Point 2 and 3 since the input value "7500" is
between point 2 and 3.
A fractional portion is rounded down.
= 6583.333...
D3106 K6583

Table of Contents

Other manuals for Mitsubishi Electric R64MTCPU

Related product manuals