Mitsubishi Electric Melsec Q Series Programming Manual page 374

Motion controller (sv13/sv22)
Hide thumbs Also See for Melsec Q Series:
Table of Contents

Advertisement

5 OPERATION CONTROL PROGRAMS
[Errors]
[Program examples]
[Motion SFC program]
[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]
PX0
[F20]
//Positive conversion execution (Output value is
stored in D3106L)
DSCL K0,K-65000,D3000,D3106L
-80000
-64166.666...
Point 0
(1) An operation error will occur, and the conversion of input value will not be
executed if:
• (S1) is set to other than 0 to 3.
• (S2), (S3), and (D) are not even-numbered devices.
• The number of points at the point table specified with (S3) is outside the range
of 2 to 2000.
• Point table specified with (S3) is outside the device range.
• In sequential search ((S1) is 0 or 1.), the point corresponding to the input value
(Positive conversion: X
ascending order.
• The conversion result is outside the range of -2147483648 to 2147483647.
(1) 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.
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 PX0 turns ON
END
Y
-40000
0
Point 3
Point 2
-40000
Point 1
-80000
-65000
to X
, Inverse conversion: Y
0
N-1
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
K-64166
5 - 151
to Y
) is not in
0
N-1
(-65000 - (-100000))
D3107

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents