LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read .txt from SD & plot angle vs. time

Solved!
Go to solution

Hey all,

 

I am trying to read the .txt file below into LabVIEW to then be plotted into either an XY graph or a Waveform Graph. 

The first colum on the text file is "time" and the second colum is the "angles."

The .vi we have created thus far runs but does not plot. Any help is appreciated!

 

 

Download All
0 Kudos
Message 1 of 5
(2,663 Views)

FileReadArrayManipulation[1]_BD.png

 

You forgot to specify a delimiter.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 5
(2,654 Views)

Jim,

 

Thanks. That definitely made it plot. However, just by looking at the resulting graph I can tell something is still not quite right.. I'm esentially getting a straight line when it should not be.

If you look at the DATALOG file, you can see the highest angle achieved is around ~140. On the graph obtained after running that .vi, the max reading I see is around ~20. Additionally, the straight line is really sharp, as in, most readings seem to be getting plotted at 0.01-0.02 seconds and does not go any further... Any ideas as to what could be wrong? I really appreciate it!

 

Edit: Actually, it is only reading/plotting the very first row now that I've taken a close look at it. Would I need a While loop around all of it to make sure it iterates through all the data? 

0 Kudos
Message 3 of 5
(2,640 Views)
Solution
Accepted by topic author IsabellaTestini

The data is stored in two columns. The VI you posted looks at the first row, twice. Connect the zero constant to the column input.

 

Lynn

 

Plot columns.png

Message 4 of 5
(2,618 Views)

...tunnel vision.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 5
(2,595 Views)