User`s manual
23
6
How to Use the "Streamer" File Functions
File functions overview
The CYDAS UDR Library can collect very large amounts of data to a "streamer" file. Once all of the data is
streamed to a file, your program reads it back into arrays and processes it in chunks. This feature is
particularly useful when you are using the CYDAS UDR Library from DOS, where memory is limited. The
library contains four functions that are used with "streamer" files:
cbFileAInScan() and cbFilePretrig() read the A/D and store the data in a "streamer" file. The
equivalent UDR Library for .Net methods are
FileAInScan() and FilePretrig().
cbFileGetInfo()returns information about the streamer file (the equivalent UDR Library for .Net
method is
FileGetInfo().)
cbFileRead() reads data from a "streamer" file to an array (the equivalent UDR Library for .Net method
is
FileRead().)
In addition to these library functions, the library comes with three utility programs for use with the
16-bit version of the library; MAKESTRM.EXE, FRAGTEST.EXE and RDSTREAM.EXE. These utilities
are not compatible with the 32-bit version of the library.
MAKESTRM creates a "streamer" file. When using the 16 bit library, this program should be run to allocate a
file large enough to hold all of the data that will be later collected with
cbFileAInScan() or
cbFilePretrig() / FileAInScan() or FilePretrig(). The syntax is:
C:\MAKESTRM filename # <enter>
FRAGTEST checks an existing disk file to see if it is fragmented. In order to run at the faster sampling rates,
the "streamer" file must not be fragmented. Refer to "Speeding up Disk Files (De-fragmenting)
" on page 24
for more information. The syntax is:
C:\FRAGTEST filename <enter>
RDSTREAM reads a "streamer" file and prints its contents on the screen. The syntax is:
C:\RDSTREAM filename <enter>
Hard disk vs. RAM disk files
The simplest type of file to use is a standard DOS file on a hard disk. Hard disk files have the disadvantage of
being slower than RAM disks. RAM disk (or virtual disk) files are faster but they are limited in size by the
amount of available memory in your computer.
Maximum sampling speed
The maximum sustainable sampling rate that can be specified with the cbFile functions is very hard to
predict. It depends on the speed of the CPU and the speed of the disk.
In addition to the variation in sampling speed from machine to machine, there can also be variations on the
same machine between consecutive operations of the same program. When reading an A/D to memory (non-
streaming modes) there is a hard and fast maximum sampling speed that cannot be exceeded. When using the
streaming modes the maximum rate is much fuzzier and must be arrived at by trial and error.