Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Macro Arrays Buf0-Buf7, BufV
Eight BufN macro arrays or "buffers" Buf0 through Buf7 each consist of 1024 signed fixed-point real numbers with 32-bit integer and 32-bit fraction parts, for 64-bit overall precision. The integer range is approximately +/-2 billion; the fraction resolution is about 1 part in 4 billion, or better than 9 decimal places.
Buf0 = Buf1[A] / Buf2[B-C]
If the index has a fractional part, it is truncated (not rounded). (But you can use Buf0?i[X] to interpolate between values... see Array Math Operations.)
However, the main use of BufN arrays is with operations that act on the entire buffer as a unit. These operations have the general form Buf0="<+(K)", where everything to the right of the equal sign is in quotes, and a left caret (<) follows the quote immediately. The symbol or code for the operation follows the caret. In this example, each element of Buf0 will have the current value of K added to it as described in Array Math Operations.
Note that the N in BufN must be an explicit digit 0-7 (but see below). However, certain commands refer to a buffer number on the right side of the equation, such as Buf0="<=B1" to copy each element of Buf1 to the corresponding element of Buf0. In such cases, the explicit digit may be replaced by an expression by enclosing it in parentheses, as in Buf0="<=B(X+Y)".
You can use BufV on the left side instead of an explicit-digit BufN. This allows a variable buffer number, which you must previously set via Ch=N. This will work with all buffer operations.
Many array operations will be on data obtained from raw input or output processes. See Macro Data Unit Conversions for scaling and calibration issues.
Alternatively, instead of 64-bit values, each array element can hold up to 8 characters of ASCII text, and elements can be accessed in groups of 2, 4, or 8 to provide string arrays of up to 64 characters per entry.
Note that you can also use MemArbs as general-purpose arrays for values in the +/-32767 range. These arrays can have sizes of 1024, 2048, 4096, 8192, or 16384 values.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved