5 - 147
5 OPERATION CONTROL PROGRAMS
POINT
When the input value is outside the range of scaling conversion data or calculation
result of output value is outside the range of -32768 to 32767, an operation error
will occur.
[Functions]
(1) Conversion of the input value specified with (S2) is executed according to the
search/conversion method specified with (S1), using the scaling conversion data
of device (S3) or later. The conversion result is stored in the device specified with
(D).
(2) In the scaling, point data used for output value calculation must be searched from
the input value, and the search method is specified with (S1).
The search method is either sequential search or binary search, and the features
are shown below. Specify the search method according to the intended use.
Search times when the
number of points is 4000
Processing time Precaution
Sequential
search
1 to 4000 times
0.03 to 10.7 [ms]
Since the data is searched in order from the
head in sequential search, the maximum
processing time increases in proportion to the
number of points.
During search processing, whether the point data
corresponding to the input value is in ascending
order can be checked. If the input value is not in
ascending order, an operation error will occur.
Binary
search
12 times
0.05 [ms]
Binary search requires relatively short search
time since the processing time does not
increase in proportion to the number of points.
During search processing, point data required for
the binary search are only referred to. If the data
is not in ascending order, the calculation result of
output value could be unexpected one since all
of the point data corresponding to the input value
cannot be confirmed.
(3) The device No. specified with (S3) should be an even number. Set the point data
in the specified device as follows.
Off set Name Description Range
+0
The number of
points (N)
Set the number of points for the scaling conversion data. 2 to 4000
+1 Unusable Set 0. 0
+2
Point 0
X0
Set the point data of (X
0, Y0) to (XN-1, YN-1) so that the
device No. is in consecutive order.
-32768 to
32767
+3 Y0
+4
Point 1
X1
+5 Y1
+6
Point 2
X2
+7 Y2
: :
+ (2N)
Point (N-1)
XN-1
+ (2N+1) YN-1
POINT
Set the point data corresponding to the input value in ascending order. (Positive
conversion: X
0 < X1 <.....< XN-1, Inverse conversion: Y0 < Y1 <.....< YN-1)