Mitsubishi Electric R16MTCPU Programming Manual page 168

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Program example
■Program which sets 4 points of scaling conversion data to D3000 to D3017 and substitutes the
output value, which is positively converted based on the input value "-65000", to D3106L.
[F10]
//Scaling conversion data set
D3000=K4
D3001=K0
//Set the point 0 to 3
D3002L=K-100000L
D3004L=K-70000L
D3006L=K-40000L
D3008L=K-60000L
D3010L=K-20000L
D3012L=K-30000L
D3014L=K0L
D3016L=K-10000L
[G10]
X0
[F20]
//Positive conversion execution (Output value is
stored in D3106L)
DSCL K0,K-65000,D3000,D3106L
-80000
-64166.666...
Point 0
4 OPERATION CONTROL PROGRAMS
166
4.8 Data Control
32-bit scaling
//Number of point=4
//Unusable area
//Point 0
//(X0, Y0)=(-100000, -70000)
//Point 1
//(X1, Y1)=(-40000, -60000)
//Point 2
//(X2, Y2)=(-20000, -30000)
//Point 3
//(X3, Y3)=(0, -10000)
//Standby until X0 turns ON
END
Y
-40000
0
Point 3
Point 2
-40000
Point 1
-80000
-65000
The output value is calculated from the setting value of Point 0 and 1
X
since the input value "-65000" is between Point 0 and 1.
(-60000 - (-70000))
Output value = -70000 +
(-40000 - (-100000))
= -64166.666...
A fractional portion is rounded down.
D3106
D3107
K-64166
×
(-65000 - (-100000))

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents