beautypg.com

Fileread.vi – Measurement Computing UL for NI LabVIEW User Manual

Page 88

background image

Universal Library Virtual Instruments (VIs)

Streamer File VIs

FileRead.VI

Reads data from a streamer file. Refer to the board-specific information contained in the Universal Library
User's Guide (available on our web site at

www.mccdaq.com/PDFmanuals/sm-ul-user-guide.pdf

) to determine

if this function is supported on your board.

Summary:

Inputs:

FileName

[abc] - Name of streamer file.

FirstPoint

[I32] - Index of first sample to read.

NumPoints

[I32] - Number of samples to read.

Outputs:

NumPoints

[I32] - Number of samples read.

DataBuffer

[I32] - Data buffer that data is read into.

ErrCode

[I32] - Error code. See ErrMsg.VI.

Arguments:

FileName

Name of streamer file in which the A/D measurements are stored.

FirstPoint

Index of first sample to read from the streamer file.

NumPoints

(input)

Number of samples to read from the streamer file.

NumPoints

(output)

Number of samples actually read.

DataBuffer

Array of A/D measurements in binary counts read from the file. Use ToEng.VI to

convert from binary counts to engineering units (volts or mAmps).

ErrCode

Error code returned from the Universal Library. Zero if no error occurred. Use the

ErrMsg VI to convert

ErrCode

into a readable string.

Notes:

Data format: The data is returned as 16 bits. The 16 bits can represent 12 bits of analog, 12 bits of analog plus
4 bits of channel, or 16 bits of analog. Use ACvtData.VI to correctly load the data into an array.

Loading portions of files: The file can contain much more data than can fit in

DataBuffer

. In those cases, use

TotalCount

and

FirstPoint

to read a selected piece of the file into

DataBuffer

. Call FileInfo.VI first to find out

how many points are in the file.

88