User`s guide
Universal Library User's Guide Analog Input Boards - PCI-DAS4020 Series
47
# of Channels
Rate requiring contiguous memory
(when sample count > 2048)
1
> 4 MHz
2
>2 MHz
4
>1 MHz
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 PCI-DAS4020 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.
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).
Note: You can set the size of the contiguous memory up to 262144k, or 134,217,728 samples.
3. Reboot the computer. The Universal 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}