
NIDisk User Guide
19
will acquire two channels for 60 seconds at 50 kHz sample rate per channel with a gain
multiplier of 10, to a two-channel SIGNAL-format sound file called myAcqFile, while
simultaneously playing the sound file myPlayFile.
If the filename or filename prefix includes embedded spaces, enclose the entire name in
quotation marks, for example:
nidisk a 2 60 50000 10 s "\my project\myfile"
Calling NIDisk from SIGNAL
NIDisk can be called from SIGNAL using the EXEC command. Include the full pathname of
the NIDisk executable, and enclose this in quotes if it contains embedded spaces, as in the
example below. Two applications are: 1) enclosing NIDisk in a SIGNAL program loop to
automate and time repetitive playbacks (using DOLOOP and TWAIT), and 2) using TWAIT
to run NIDisk at a particular time of day, for scheduled recording. The following example
(which should be presented on a single line) will perform the acquisition described above:
EXEC "c:\Program Files\Engineering Design\Signal 4.0\nidisk"
a 2 60 50000 10 s "\my project\myfile"
Calling NIDisk from DOS
A NIDisk command can also be run from a DOS batch file. This avoids entering parameters
manually into the parameter setup screen, to perform the same process repeatedly. Create a
one-line .bat file containing the command line text, such as "nidisk a 2 60 50000 10 s myfile"
without the quotes. Then either 1) double-click on this file in Windows Explorer, or 2) open
a DOS window (in the Start menu, click Programs | Accessories | Command Prompt) and
type the .bat file name.
Status File
NIDisk writes acquisition and playback status files to enable communication with a calling
program. These files are called NIDiskAcqStatus.txt and NIDiskPlayStatus.txt, and are
located in the NIDisk program directory. These files contain one line in the format
status=status
where status is the status of the current or just-completed I/O process:
ACTIVE = in progress
DONE = successfully completed
ABORTED = aborted by the user
ERROR = terminated by the program due to error
Normally, status will be ACTIVE during acquisition or playback and DONE after the I/O
process completes. The user can call NIDisk from SIGNAL, then poll the status file (using
Comentários a estes Manuais