From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write Characters to file

I am creating an application which read and writes strings to a file (see attached image, yes i know its messy..). My problem is that i want the user to be able to open/create new files while the application is running. I have tried different strategies, one beeing using the event structure as in the attached image. I want to use the "File Path Controll", for the user to open/create files. What usually happens is that when the application starts, i get a dialog box to select a file, but when i select one and press ok, none of the file operations work (write/read chars from file).

I am sure there is a "standard" method of doing this, but i have not found this yet. Any help is greatly appreciated!

If there are any "pro's" who could take the time to look at it, i could send the vi by mail.

Cheers!

0 Kudos
Message 1 of 5
(2,409 Views)
0 Kudos
Message 2 of 5
(2,409 Views)
The True case is wired to the cancelled output of the File Dialog function. I'm not sure you want to send the same path to all of the Read characters from file at the same time. It may lock the file once one of them opens it. Could you post the file that you want to read from and your vi.
Message 3 of 5
(2,393 Views)
The attached vi will produce a file dialog box when launched. Create an empty text file, which you select in this dialog.

I want to be able to open/create files while the program is in run mode, not only at startup.

The vi is slightly modified compared to the picture.

Cheers!

0 Kudos
Message 4 of 5
(2,388 Views)
Btw unclebump, if you have any other comments/suggestions, they are greatly appreciated!

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