LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Import Semi-Colon data into waveform

Hi I just started using LabVIEW this week, and I am currently evaluating LabVIEW 2011. I am trying to come up with a SIMPLE program, where I can analyse a daily temperature reading on a waveform. But the raw data is in .txt format.

 

I tried exploring Read from Measurement File function but realized that I can only set the delimiter as either Comma or Tab. Thus the problem is that my raw .txt file delimiter is Semi-Colon!

 

Would really appreciate any help!

 

Download All
0 Kudos
Message 1 of 9
(4,400 Views)

That's the limitation of using Express VI's.  They can get you something working quickly, but if you need some variation that wasn't designed into it, you need to do your own programming.  Look at the File I/O palette for lower level VI's for reading text files.  Also the string palette for the Spreadsheet string to Array VI that will let you pick whatever delimiter you want.

 

But there is a way to get your Express VI to do what you want without a whole lot of programming.  Right click on the express VI and pick, Open Front Panel.  It will convert it to a regular subVI.  If you open that, you will see a string constant there that will either be a comma or a tab character.  Just change that to a semicolon.  You'll need to save your new subVI, and I would recommend changing the name to something that won't ever get confused with files in the VI.lib library.

Message 2 of 9
(3,381 Views)

I tried what you said! (the express vi way) Its really impressive! I'm still trying to work out using the read text file and spreadsheet string to array VI. Is it possible if you can send me an example that I can refer to it at home? Cos I'm in school right now and i dont have any internet access at home!

 

Much appreciations from Singapore!

 

 

 

0 Kudos
Message 3 of 9
(3,376 Views)

This should get you started.

 

Having the timestamp part at the front complicates things in doing a conversion to numeric data.  Since I'm not sure how you want to handle the time component, I'm going to leave that alone for now.

 

Right now it imports the data and puts it into a string array.  Depending on what data you want to work with (time vs. any of the numeric columns), I'll leave it up to you to figure out how you want to convert the string array elements to numeric values.

Message 4 of 9
(3,368 Views)

I had made a start before Ravens' post, so I'll post mine anyway.

Some bits of this code may be useful.

Semicolon.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 5 of 9
(3,359 Views)

Thanks for the help Ace! I tried creating your block diagram but found out that it was too intensive!

 

And Raven, I tried working on your example for hours, but still cannot get anything out of it. But I kinda understand roughly what you have guided me with.

 

So basically, I have achieved trying to import my .txt file which was semi colon delimited. To move on, I need to disply the array on a waveform graph.

 

I tried dabbling with the get waveform and build waveform functions but to no avail.

 

And is it possible to call which columns of the array I wish to display on the waveform? Because I only want to plot the 1st on the y axis, 7th and 8th column on the x axis, but at the same time, still displaying the array.

 

Feel so stupid right now. Really hope you guys can help me! Ive attached the mod file, which I have included the graph that I wish to use.

Download All
0 Kudos
Message 6 of 9
(3,349 Views)

You can drag and drop that on to a block diagram. Basically just chose the waveforms you want to display and delete the rest. Resize the index array and the merge signals accordingly. I have attached the vi as well.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 7 of 9
(3,333 Views)

I tried dragging the image and drop it into a block diagram. But only a url appeared.

0 Kudos
Message 8 of 9
(3,329 Views)

sorry didnt saw the vi you attached! thanksssssss i will try yours out while waiting for raven's.

0 Kudos
Message 9 of 9
(3,326 Views)