LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read-Write Update a file..

hello all,
i wanted to develop a VI where, when a user makes any changes to a
text-field on the front panel the changes are reflected in a file, and
when changes are made to the file it is reflected on the front-panel.

I use "wait for front panel activity" to see if changes are made to
any field. and then write to the file.

my problem or sticky point is how do i reflect the changes
immediately ? on both sides...
is it a better idea to uses "FLUSH" ?


and the reverse i have no idea, how do i check if the file content has
changed ?? "compare strings"...any help is welcome...

thank you ,
cheers,
-U
0 Kudos
Message 1 of 6
(3,048 Views)
Hi,
to determine if a file content has been changed you can embed in your application a continous call to the File Info function (advanced file functions)and see if the Last Mod output has changed.
One way to do it is adding a parallel while loop in your application with inside the File Info function, use a shift register to track changes in the Last Mod output and place a time delay of 1 second in the loop, this shouldn't cause any particular overhead to your application.
Hope it helps,
Alberto
0 Kudos
Message 2 of 6
(3,048 Views)
Hi Alberto,
Thanks for taking the time to help, i am still slightly in the
dark...cant get a handle on Last Mod output. what exactly does it do?

thanks,
-U
0 Kudos
Message 3 of 6
(3,048 Views)
from help:

last mod indicates the date and time at which the file or directory was last modified in seconds since the standard reference time, 12:00 a.m., January 1, 1904, Universal Time.
0 Kudos
Message 4 of 6
(3,048 Views)
please ignore my previous post, it was a totally useless one.

the one about "Last Mod"...
0 Kudos
Message 5 of 6
(3,048 Views)
thanks for all the suggestions i have managed to get the Vi done its
functioning perfectly...

cheers,
-U
0 Kudos
Message 6 of 6
(3,048 Views)