Mitsubishi Electric Melsec Q Series Programming Manual page 371

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]
[G10]
[F20]
6583.333...
(4) When the conversion result to be stored in the device specified with (D) is not an
integer value, its fractional portion is rounded down.
(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.
• (S3) is not an even-numbered device.
• The number of points at the point table specified with (S3) is outside the range
of 2 to 4000.
• 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 -32768 to 32767.
(1) 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.
16-bit scaling
//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)
PX0
//Standby until PX0 turns ON
//Positive conversion execution (Output value is
stored in D3106)
SCL K0,K7500,D3000,D3106
END
Y
8000
Point 2
4000
Point 1
Point 0
0
5000
to X
, Inverse conversion: Y
0
N-1
The output value is calculated from the setting value
of Point 2 and 3 since the input value "7500" is
Point 3
between point 2 and 3.
Output value = 6000 +
X
10000
7500
5 - 148
to Y
) is not in
0
N-1
7000 - 6000
10000 - 4000
= 6583.333...
A fractional portion is rounded down.
D3106
K6583
(7500 - 4000)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents