User`s manual
CYDAS UDR Library User’s Guide Analog Input Boards - CYDAS 4020
31
If contiguous memory is required, follow the InstaCal procedures below to set the size of the contiguous
memory to reserve:
1. Run InstaCal, select the CYDAS 4020 board and click the Configure tab.
2. In the Memory Size edit box for the Contiguous Memory Settings, enter the amount of memory in
kilobytes that you need for the acquisition.
To calculate the number of kilobytes required, use the following formula:
(# of kilobytes (KB)) = {(# of samples) x (2 bytes/sample) x (1 KB/1024 bytes)}
or
(# of KB) = {(# of samples)/512}
Memory is allocated in blocks of 4 KB. As a consequence, InstaCal adjusts the amount entered upward to
the nearest integer multiple of 4 KB. For example, the contiguous memory requirements for a 10,000-
sample acquisition would be:
(10,000/512) = 19.5 rounded up to multiple of 4 KB = 20 KB.
Note that the maximum number of samples allowed for the given contiguous memory size is displayed as
the Sample Count (displayed below the Memory Size edit box).
3. Reboot the computer. The CYDAS UDR Library attempts to reserve the desired amount of contiguous
memory at boot up time. If it is unable to reserve all the memory requested, the amount successfully
reserved memory displays in the Memory Size entry when you run InstaCal.
4. Run InstaCal. In the Memory Size entry, verify the size of the contiguous memory that was successfully
reserved.
Repeat this procedure to change or free the contiguous memory.
The size of the block shown in InstaCal is the total contiguous memory that is available to all boards
installed. Other installed boards that call the
cbWinBufAlloc() function or WinBufAlloc() method will also
use this contiguous memory, so plan the size of the contiguous memory buffer accordingly.
With the following functions and methods, be aware of packet size, and adjust the number of samples
acquired accordingly:
cbAPretrig()/APretrig()
cbAInScan()/AInScan() with the CONTINUOUS scan option.
These functions and methods use a circular buffer. Align the data by packets in the buffer. For these functions,
the total number of samples must be greater than one packet (refer to the following table), and must be an
integer multiple of packet size. In addition, contiguous memory must be used if noted in the following table.
The minimum value for contiguous memory is calculated using the formula from step 2 above:
( # of KB ) = {( # of samples ) / 512}
For example, to run
cbAInScan on one channel at 18 MHz with the CONTINUOUS option set, determine the
minimum sample size from the table to be 262,144 (since the
Rate is between 14 and 20 MHz). The minimum
contiguous memory is calculated as:
(262,144 / 512 ) = 512 KB