Download med-pc® iv programmer`s manual

Transcript
M E D A S S O C I AT E S I N C .
MED -PC IV PROGRAMMER’S MANUAL
Syntax:
COPYARRAY P1, P2, P3
Where:
P1
P2
P3
P1
P3
=
=
=
&
=
The source array from which data will be copied.
The array into which data will be copied.
The number of elements of P1 to copy to P2.
P2 must be the name of an array.
Variable, constant, number, array element, or mathematical expression.
Example:
In the following example, the current cumulative response totals on inputs 1-3 are transferred from
array A to array B every 5’ and then printed. This technique ensures that all data are printed from the
same moment (see description of PRINT command).
DIM A = 2
DIM B = 2
PRINTVARS = B
S.S.1,
S1,
#R1: ADD A(0) —-> SX
#R2: ADD A(1) —-> SX
#R3: ADD A(2) —-> SX
S.S.2,
S1,
5’: COPYARRAY A, B, 3; PRINT —-> SX
\ From A to B Copy 3 Elements
\ (0, 1, 2) and then Print.
ZEROARRAY
This command sets all of the elements of an array to 0. The command takes the name of the array to
zero as its only argument.
Syntax:
ZEROARRAY P1
Where:
P1 = Must be the name of an array declared by LIST or DIM.
Example:
S.S.2,
S1,
5’: COPYARRAY A, B, 3; ZEROARRAY A; PRINT —-> SX
The above uses the same S.S.2 from the COPYARRAY example; however, this time the counter in array
A is also zeroed every 5’.
111