The Daily CLAD

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

Re: CLAD2017 - Fundamentals - FileIO - Read Data File

SercoSteveB
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

 

 

Comments
keshavboss
Member

1.B

2.C

3.A

4.D

crossrulz
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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
nik35324
Member

1B, 2C, 3A, 4D

Murali_Chennai
Member

Capture.JPG


@SercoSteveB Ans:

1.B

2.C

3.A

4.D

Muralidharan Dasarathan
A.Bernau
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 😉