LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Locking and LabVIEW

I am writing a bunch of data to a file from a LabVIEW VI. I am
using the standard file I/O routines. I would like to view this
file with another program while LabVIEW is running -- this is
no problem with programs that open the file for reading only, but
most programs attempt to open it with write-permissions as well
which fails under Windows95. Is there a way I can tell LabVIEW
to relax all locking on the file itself so that I can view it with
wordpad or others?

Andrew Berkley
Department of Physics
University of Maryland
0 Kudos
Message 1 of 4
(5,190 Views)
> I am writing a bunch of data to a file from a LabVIEW VI. I am
> using the standard file I/O routines. I would like to view this
> file with another program while LabVIEW is running -- this is
> no problem with programs that open the file for reading only, but
> most programs attempt to open it with write-permissions as well
> which fails under Windows95. Is there a way I can tell LabVIEW
> to relax all locking on the file itself so that I can view it with
> wordpad or others?
>

In LV you can look at changing the Deny Mode setting on the file
Open function. You may also want to use this in conjunction with
the Range Locking if you do allow the other app to modify the file.
Both of these are in the File I/O > Advanced Palette, and you will
need to turn on the Deta
iled Diagram Help in the Help window to get
more information on the parameters.

The other option is to look at the help on Notepad. I'm not at a PC
right now, but many text editors can be launched with a view or
noedit flag, disabling their editing features and allowing them to
open files they don't have write access too.

Greg McKaskle
0 Kudos
Message 2 of 4
(5,190 Views)
In article <377CC578.6975511C@austin.rr.com>,
Greg McKaskle wrote:
>> I am writing a bunch of data to a file from a LabVIEW VI. I am
>> using the standard file I/O routines. I would like to view this
>> file with another program while LabVIEW is running -- this is
>> no problem with programs that open the file for reading only, but
>> most programs attempt to open it with write-permissions as well
>> which fails under Windows95. Is there a way I can tell LabVIEW
>> to relax all locking on the file itself so that I can view it with
>> wordpad or others?
>
>In LV you can look at changing the Deny Mode setting on the file
>Open function. You may also want to use this in conjunction with
>the Range Locking if you do allow the other a
pp to modify the file.
>Both of these are in the File I/O > Advanced Palette, and you will
>need to turn on the Detailed Diagram Help in the Help window to get
>more information on the parameters.
[...]

The default deny mode is to allow all other users to read/write the file.

Somehow it still doesn't work. I open the file with the advanced open VI
and leave the deny mode unwired (which should allow all other users to access
the file) and still when I start up wordpad or word it complains that the file
is in use. Any ideas? The real reason for this is that it would be nice to
run an ftp server on the machine so I can check the data files from elsewhere
as labview is running. The FTP server cannot open the files for the same
reason as word or wordpad, etc.

Andrew
0 Kudos
Message 3 of 4
(5,190 Views)
> [...]
>
> The default deny mode is to allow all other users to read/write the file.
>
> Somehow it still doesn't work. I open the file with the advanced open VI
> and leave the deny mode unwired (which should allow all other users to access
> the file) and still when I start up wordpad or word it complains that the file
> is in use. Any ideas? The real reason for this is that it would be nice to
> run an ftp server on the machine so I can check the data files from elsewhere
> as labview is running. The FTP server cannot open the files for the same
> reason as word or wordpad, etc.
>

If I were you, try different locking settings. Sometimes documentation is
wrong as to what the default is. If it turns out not to work, this may be
a limitation
on a particular platform; so please look it up in the
knowledge-base and/or report it.

Greg McKaskle
0 Kudos
Message 4 of 4
(5,190 Views)