The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

CLAD2017 - Fundamentals - FileIO - Read Data File

Active Participant

Assuming the File Path for each VI points at DataFile.txt and that the format of the DataFile.txt is as shown below.  Match each VI to the corresponding Numeric Array Out?

 

ReadFilesDataFile.png

1)

ReadFromDataFileA.png

2)ReadFromDataFileB.png3)ReadFromDataFileC.png4)ReadFromDataFileD.png

 

ReadFilesAnswers.png

 

 

Combined.png

Comments
Member

1.B

2.C

3.A

4.D

Knight of NI

1B

2C

3A

4D


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Member

1B, 2C, 3A, 4D

Member

Capture.JPG


@SercoSteveB Ans:

1.B

2.C

3.A

4.D

Muralidharan Dasarathan
Member

For me it was the most time consuming D-CLAD for the last months, so I had to change from a “help file based” approach to a “real coding with LabViEW” Approach:

1-b         I guess the function Read Delimited Spreadsheet was designed for such purposes. So no further explanation necessary.

 

2-c          Important is, the Read File function reads the whole content of the file in the first Iteration and returns an empty string in the second iteration. The carriage return Linefeed symbol located in the lower right corner means “Convert End of Line” and NOT Read “line wise” as I thought first. For the output, only the second iteration is relevant. So the output array should be empty.

 

3-a         During the last iteration once again we read an empty string. With this output tunnel only answer A) makes sense.

 

4-d         Because Steve printed an D close to the output ;-)