Read From I16 File

Reads a 2D or 1D array of data from a byte stream file of signed, word integers (I16). The VI opens the file before reading from it and closes it afterwards. You can use this VI to read unscaled or binary data acquired from data acquisition VIs and written to a file with the Write To I16 File VI. Use this VI with integers.

file path is the path name of the file. If file path is empty (default) or is Not A Path, the VI displays a dialog box from which you can select a file. Error 43 occurs if you cancel the dialog box.
2D number of rows is the number of rows to create if the data returns in a 2D array. The default is 0. To read the entire file into 1D array, set 1D count to <0 (default) and do not wire 2D number of rows. This is the default operation if both inputs are unwired.

To read N elements into 1D array, set 1D count to N and set 2D number of rows to 0 or do not wire it.

To read the entire file into 2D array, set 2D number of rows to <0 and 2D number of columns to N > 0. The VI calculates the number of rows as the integer part of file size/N.

To read M rows or N columns each into 2D array, set 2D number of rows to M and 2D number of columns to N.

Other combinations result in empty arrays.

2D number of columns/1D count2D number of rowsOutput
<0 (default)Value does not matter (default)Entire file into 1D array
N>00N elements into 1D array
N>0<0Entire file into 2D array
N>0M>0NxM numbers into 2D array
2D number of columns/1D count is the number of columns to create if the data returns in a 2D array, or it is the number of elements to return into a 1D array. The default is –1. To read the entire file into 1D array, set 1D count to <0 (default) and do not wire 2D number of rows. This is the default operation if both inputs are unwired.

To read N elements into 1D array, set 1D count to N and set 2D number of rows to 0 or do not wire it.

To read the entire file into 2D array, set 2D number of rows to <0 and 2D number of columns to N > 0. The VI calculates the number of rows as the integer part of file size/N.

To read M rows or N columns each into 2D array, set 2D number of rows to M and 2D number of columns to N.

Other combinations result in empty arrays.

2D number of columns/1D count2D number of rowsOutput
<0 (default)Value does not matter (default)Entire file into 1D array
N>00N numbers into 1D array
N>0<0Entire file into 2D array
N>0M>0NxM numbers into 2D array
start of read offset is the position in the file, measured in characters (or bytes), at which the VI begins reading.
new file path returns the path to the waveform file.
2D array contains the 16-bit numbers read from the file if 2D number of rows and 2D number of columns define a 2D array. Otherwise, this output is empty.
1D array contains the 16-bit numbers read from the file if 1D count and 2D number of rows define a 1D array. Otherwise, this output is empty.
mark after read is the location of the file mark after the read. It points to the character (byte) in the file following the last character read.
EOF? is TRUE if you attempt to read past the end of file.