LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different read/write VI's

Hello,

I notice that in labview, I can:

read/write to a SPREADSHEET
This requires FILE_PATH and FORMAT


read/write to a FILE
This requires a FILE_PATH and NO format
(because it is binary data)


I can read lines... BUT I CANNOT write lines


First question: why can I not write lines?


Continuing... there are other ways to read/write.

I can OPEN a file

And, then I can read/write

So: how is THIS read/write different from the ones above.

I can see that THIS read/write requires a refnum from the
open... OK... one structural difference...
This one does not allow for formatting... but yields a BROWN data.

Now, what is this DATA... is it binary?

What is the purpose of the OPEN/read/write/Close
on the second lines of the FIL
E/IO vi's

Can someone describe these and how they relate to each other?

Thanks,

Tom
Hello,
0 Kudos
Message 1 of 2
(2,709 Views)
Tom Impelluso wrote:

> Hello,
>
> I notice that in labview, I can:
>
> read/write to a SPREADSHEET
> This requires FILE_PATH and FORMAT
>

This is called a TAB delimited file that most spreadsheet applications
can read
there is a TAB between columns and and EOL between rows. Writes in ASCII

(I should say ASCII printable since all chars are ASCII)

>
> read/write to a FILE
> This requires a FILE_PATH and NO format
> (because it is binary data)

Yep

>
>
> I can read lines... BUT I CANNOT write lines
>
> First question: why can I not write lines?
>

I found this strange also but, you can use the Write Char or generate
your own VI from
the lower level VIS. Which would be using the Write Char and adding EOL
as the last character in the line
There is a VI called Write + (String) that does not show up in the
palette but is used in some of the other VIs.

>
> Continuing... there are other ways to read/write.
>
> I can OPEN a file
>
> And, then I can read/write
>
> So: how is THIS read/write different from the ones above.

It is a byte stream which could be almost anything from ASCII to G
datatypes

>
>
> I can see that THIS read/write requires a refnum from the
> open... OK... one structural difference...
> This one does not allow for formatting... but yields a BROWN data.
>
> Now, what is this DATA... is it binary?

Not always but it can be. If you open an Excel file in a text editor you
will see
what a complex byte stream file looks like. The data is interspersed
with formatting bytes.

>
>
> What is the purpose of the OPEN/read/write/Close
> on the second lines of the FILE/IO vi's

these are the primitives that are used in all of the other file
functions.
This is the most basic level of what file I/O does.

>
>
> Can someone describe these and how they relate to each other?

The Open/Read/Write/Close are the primitves. The others are built up
from these
for special file types (like spreadsheet). They use the primitives and
add some formatting
and other options.

Dont reply to this e-mail address. My account is down and I am using
someone elses.
Kevin Kent
Message 2 of 2
(2,709 Views)