
SECTION
10. PROCESSING
INSTRUCTIONS
N' is
the number
of input scans
in the last
averaging
period
NT
is
the total
number of input
samples
processed
in
the Output
Interval
INTERMEDIATE
STORAGE REOUIREMENTS
The number
of
Intermediate
locations
will
depend upon
the number of input
values
and
outputs desired:
1.
Define
K
as the number
of input values.
2. Define
S as
the maximum of
either the
variances,
standard deviations,
or C, where
C
=
K if K <
the number of
correlations
requested,
or
C
=
numberof
correlations + 1 if K >
the
number
of
correlations
requested.
3.
Define
Q
as the maximum
of either
the
covariances
or
correlations desired.
4,
Define
P
as the
total
number
of outputs
desired.
The amount
of intermediate memory
locations
(lML)
required,
is then
given
by:
IML=K+S+Q+P+2
EXECUTION TIME
lf
K,
S, and
Q
are
defined
as in
the
previous
section, the execution
time
of the
CV/CR
Instruction in milliseconds
can be approximated
by:
T(ms)
=
1.1K
+ 0.5S
+
0'9Q + 1.8
When evaluating
how frequently input
samples
can be
processed
by
the
CV/CR Instruction
(i.e.,
determining the minimum
program
table
execution
interval),
the time
required
to make
the
measurements
and order the input
values
must be added
to the CV/CR execution
time.
Two alternatives
exist for
the measurement
portion
of
the
programming.
The fastest
method
is
to
group
as many
sensors as
possible
into the
fewest
measurement
instructions, ignoring
the
Input location
order required by the
CV/CR
Instruction.
After
the measurements
are made,
use
"ii1ove"
instructions
(i.e.,
31 and 54)
to
obtain the
proper
input
order.
The
slower
alternative is
to order
separate
measurement
instructions directly
as required by
the CV/CR
Instruction. While
avoiding
"move"
instructions,
this approach
uses more measurement
instructions. The
reason
the first method is in
general
faster is
that less
overhead time is
required
in
going
from
one measurement
to
another within a single instruction
(using
the
"repetitions"
feature)
than in
going
from
one
measurement instruction
to another.
ln many
situations, the 21X
must
perform
measurement
and
processing
tasks
in
addition
to
those associated with
the CV/CR
Instruction.
Uninterrupted operation
of the
CV/CR
Instruction is
assured
by entering
it in Program
Table 1
(highest priority)
and
placing
the
additionaltasks in Program
Table
2.
A covariance correlation
example
is
given
in
Section 8.
***
66 ARCTAN
***
FUNCTION
Calculate the angle
in
degrees whose tangent is
)(/Y. The
polarity
of X and Y
must
be known
to
determine the
quadrant
of the angle,
as shown
here. lf
0
is entered for Parameter
2,
the
Arctangent of
X
is the result
(limits
of the
function
are
-90o
<
ARCTAN <
90o).
Quadrant
Sign of X Sign of Y
l++
ll +
ill
lV+
PAR.
DATA
NO. TYPE DESCRIPTION
4
Input location
of X
txl
4
lnput location
of Y
IYI
4
Destination
input location for
ARCTAN(X
r)
Input locations altered: 1
01:
02:
03:
10-14
Komentáře k této Příručce