LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write a table to/from a file with LabVIEW 7.1 - how?

I have a table (with numbers and strings in it) and I want to save the content of the table into a file and read it back later.

 

I managed to write the content into a file but I have problems reading it out. I use the "Write File.vi" with the Open and Close vis. Or should I better use the "write characters to file.vi"?

 

All the examples, which I found on ni.com, I cannot open, because I am using LabVIEW 7.1. I would be pleased if you could tell me where I can find an example for LabVIEW 7.1.

 

Greetings

Johannes

Message 1 of 10
(10,906 Views)
Hello.. 🙂 Can you please mention in which file you are writing..? I mean in txt or in xls...? So it will be easy to answer... 🙂
Message Edited by Rupali on 09-24-2008 05:01 AM
0 Kudos
Message 2 of 10
(10,903 Views)

Hi,

I don't mind what type of file it is to which I am writing the data. Currently I use a text-File, but if it makes things easier, I could also use an excel-file.

I attached my first try. Writing to file is more or less ok, but I don't know how to read it from the file. Just connecting the Read from File.vi to a local variable of the table (Sequence) does not work (Error says Connection not possible ... The type of the source is string. The type of the sink is 2-D array of string.)

 

Greetings

Johannes

Message Edited by candidate on 09-24-2008 06:23 AM
0 Kudos
Message 3 of 10
(10,886 Views)

Do you want to labview should create a file or you can create a file and then perform your task...? Is it OK for you to first create a file & then perform task...? 

0 Kudos
Message 4 of 10
(10,879 Views)

Hi,

yes both is ok.

Best would be, if LabVIEW creates the file, if it does not exist. And if it exists, LabVIEW may overwrite it.

0 Kudos
Message 5 of 10
(10,873 Views)

Hey I have attached VIs where you have to create file first & then you can perform the task... Just have a look & try to modify it.. If you still have any problem let me know.. 🙂

 

Best luck.. 🙂

Download All
0 Kudos
Message 6 of 10
(10,870 Views)

Hi,

thank you very much for your help.

Unfortunately my LabVIEW does not find some Subvi's in your example. Do I have to install something first? Do I need some specific dlls?

 

I've found another thread which is very similar to my problem: http://forums.ni.com/ni/board/message?board.id=170&message.id=232440&query.id=4057#M232440 

 

I used the attached example and modified my program. Now it is very simple. Have a look!

 

Greetings    Johannes

0 Kudos
Message 7 of 10
(10,866 Views)
... and you need these vi's  😉
0 Kudos
Message 8 of 10
(10,863 Views)

Hello.. 🙂

 

So you got the answer... That's great.. 🙂

 

Best luck.. 🙂

Message Edited by Rupali on 09-26-2008 11:27 PM
0 Kudos
Message 9 of 10
(10,825 Views)

luck? where i'm going i don't need luck

At least I have chicken
0 Kudos
Message 10 of 10
(8,698 Views)