User`s manual

CYDAS UDR Library User’s Guide How to Use the "Streamer" File Functions
25
RAM disks
A RAM disk is not really a disk. It is a device driver that sets aside some of the computer's memory and
makes it appear to DOS as a disk drive. When you install a RAM disk on your computer, it appears exactly as
if you have another VERY fast hard disk drive. For example, if you have one hard disk (drive C:) then when
you install the RAM disk it will appear as if you have another hard disk, drive D.
After the RAM disk is installed, all DOS commands work exactly the same on the RAM disk as on the hard
disk. For example you can COPY, DEL, MKDIR, CD just as you would on a hard disk.
Installing a RAM disk
The RAM disk driver comes with DOS. Refer to your DOS manual for more information. In older versions of
DOS it is called either RAMDRIVE.SYS or VDISK.SYS. To install it you must add one line to your
\CONFIG.SYS file. Find which directory the DOS files are installed in on your machine. CD to that directory
and look for a file called RAMDRIVE.SYS or VDISK.SYS. If it is not there look at the other .SYS files in the
directory and refer to your DOS manual to find out if any of them are a RAM Disk driver. After you have
located the file add an entry to the \CONFIG.SYS file.
If the RAMDRIVE.SYS file was in a directory called DOS then you would add the following line to the
\CONFIG.SYS file.
device=c:\dos\ramdrive.sys
The default size for the RAM disk is usually 64K. You will almost certainly want to make it larger than that.
The larger you make it the more data you can collect but the less memory will be available for other
programs.
To set up a 4 megabyte RAM disk, add the following line to your
CONFIG.SYS file:
device=c:\dos\ramdrive.sys 4000
If your computer is an 80x86, install the RAM disk in extended memory (above 1M) by specifying the /e
option:
device=c:\dos\ramdrive.sys 4000 /e
After you add the new line to the \CONFIG.SYS file, reboot the computer (Press CTRL-ALT-DEL) to install the
RAM disk. When the machine reboots it should print a message on the screen that describes the RAM disk.
Using the RAM disk
To use the RAM disk, specify the drive letter in the FileName argument of cbFileAInScan() or
cbFilePretrig()/FileAInScan() or FilePretrig(). For example, if the RAM disk is drive D: on your
system, you could set the name of the "streamer" file in your program to "D:TEST.DAT"
This file can be created with the MAKESTRM.EXE program supplied with the CYDAS UDR Library. To set
up a file large enough to hold a million samples, include the following line in your AUTOEXEC.BAT file:
C:\CB\MAKESTRM D:\TEST.DAT 1000000
The name TEST.DAT is an example. Use the name of your preference. When you execute cbFileAInScan() or
c
bFilePreTrig()/FileAInScan() or FilePreTrig(), it will fill up the file on your RAM drive. This file
will be lost as soon as the power is switched off, so if you wish to keep the data you must copy it to the hard
disk before turning the computer off.