Section 7. Installation
196
b) scaling an array, for example converting all of the FREQ/HZ returned by a
group of AVW200's into digits, strain, level, etc.
c) creating boolean arrays based on comparisons with a scalar or another array
The main drivers at the time of starting down this path were
1) multiple years of feedback from customers asking me how to more tersely
initialize and scale arrays - often trying to compare CRBasic to Matlab or Python.
2) Easier ways to scale vibrating wire measurements and transpose their resulting
data arrays:
CRBasic provides an array notation that allows one to easily operate on a single
dimension of an array. Using this notation one can easily:
•
initialize an array dimension
•
copy a dimension to a new location
•
scale an array dimension
•
perform a mathematical or logical operation for each element in a
dimension using scalar or similarly located elements in different arrays
and dimensions
Here are some syntax rules and behaviors. Given the array, Array(A,B,C):
•
The () pair must always be present, i.e., reference the array as Array() or
Array(A,B,C)().
•
Only 1 dimension of the array can be operated on at a time. To select the
dimension, negate the element index.
•
Operations will not cross from 1 dimension into another. We access
from the specified starting point to the end of the dimension, where the
dimension is specified by a negative or by default is the least significant.
•
If indices are not specified, or none have been negated, the least
significant dimension of the array will be assumed.
•
The offset into the dimension being accessed is given by A,B, and C in
Array(A,B,C)().
•
If the Array is referenced as Array(), then the starting point is assumed
Array(1,1,1) and the least significant dimensioned is accessed.
7.6.3.6 Declaring Local and Global Variables
Advanced programs may use
subroutines
(p. 384)
or functions, each of which can
have a set of
Dim
variables dedicated to that subroutine or function. These are
called
local
variables. Names of local variable can be identical to names of
global variables
(p. 585)
and to names of local variables declared in other
Summary of Contents for CR6 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 76: ...Section 5 Overview 76 FIGURE 20 Half Bridge Wiring Example Wind Vane Potentiometer ...
Page 80: ...Section 5 Overview 80 FIGURE 23 Pulse Input Wiring Example Anemometer ...
Page 136: ......
Page 454: ...Section 8 Operation 454 FIGURE 104 Narrow Sweep High Noise ...
Page 459: ...Section 8 Operation 459 FIGURE 106 Vibrating Wire Sensor Calibration Report ...
Page 535: ...Section 8 Operation 535 8 11 2 Data Display FIGURE 121 CR1000KD Displaying Data ...
Page 537: ...Section 8 Operation 537 FIGURE 123 CR1000KD Real Time Custom ...
Page 538: ...Section 8 Operation 538 8 11 2 3 Final Storage Data FIGURE 124 CR1000KD Final Storage Data ...
Page 539: ...Section 8 Operation 539 8 11 3 Run Stop Program FIGURE 125 CR1000KD Run Stop Program ...
Page 541: ...Section 8 Operation 541 FIGURE 127 CR1000KD File Edit ...
Page 546: ......
Page 552: ......
Page 610: ...Section 11 Glossary 610 FIGURE 137 Relationships of Accuracy Precision and Resolution ...
Page 612: ......
Page 648: ......
Page 650: ......
Page 688: ......
Page 689: ......