www.vtiinstruments.com
APPENDIX B
41
R
ETRIEVING
D
ATA
The Digitizer/DSA driver provides two ways to retrieve data from EMX-4250/4350/4380. The
acquired data is stored in the instrument’s FIFO buffer. The data in the FIFO can be read using
standard
Read
method. The 2
nd
method is data streaming. The streaming mechanism makes it
possible to transfer data faster than standard FIFO
Read
method with some tradeoffs.
FIFO Read
Once the measurement is triggered and data becomes available in the instrument’s FIFO buffer, data
can be retrieved using the
Read
method in the
Measurement
interface. The
Read
method returns the
specified number of data records from all enabled input channels in a channel order in the
Channels
array. The
NumFIFORecords
property in
Measurement
interface returns the number of data records
currently available in the instrument’s FIFO buffer. This value decreases when the data is retrieved
by the host, and increases when new trigger events are processed. FIFO buffer overflow may happen
when the trigger events arrive faster than the host can retrieve data. See the
FIFO
description in the
Data Acquisition
section for more information.
Streaming
Streaming data is an alternative method for retrieving data from the EMX-4250/4350/4380. Unlike
the FIFO read function, instruments send new data records to the host PC as soon as it becomes
available when streaming data. The data is kept in the host memory buffer managed by
Digitizer/DSA driver. The data in this memory buffer is then retrieved to the user’s application
through the
MemoryRead
method. The streamed data can be directly written into disk files. In order
to use this streaming mechanism, it must be enabled by
EnableStreaming
method in
StreamingData
interface.
The key advantage of the streaming method over the FIFO Read method data transfer speed. It
provides the best data transfer performance. However, this method may be less convenient when
data transfer speed is not important since the retrieved data records using streaming are not sorted
to the channel order when more than one instruments are involved in the data acquisition. The
streamed data is returned to the user or written to the host disk file in the order of arrival to the host.
One way to avoid this channel order problem is to open a driver session for each card separately.
User Application
M
e
m
o
ry
R
e
a
d
FIFO
Buffer
Host
Memory
Disk
Stream
Streaming
Stream
Files
Fi
le
Re
ad
Sampled
Data
FIFO
Rea
d
Host Disk
EMX-4250/4350/4380
Figure 4-5: FIFO Read and Streaming