Reading 1D or 2D Data from Binary Files

Complete the following steps to read 1D or 2D data from a binary file.

  1. Write to the file.
  2. Select the Read From SGL File VI on the Functions»File I/O»Binary File VIs palette and place it on the block diagram.
  3. Right-click the 2D number of columns input and select Create»Constant from the shortcut menu. A numeric constant appears.
  4. Enter 1 into the numeric constant to indicate that you want to read one element or column in the array. Increase the number to read more elements in the array.
  5. Right-click the 1D array output and select Create»Indicator from the shortcut menu. A 1D array indicator appears on the front panel.
  6. Run the VI. The Choose file to read dialog box appears.
  7. Navigate to the file you want to read and click Open.