08-28-2014 06:28 AM
Dear
Dear All I want to put a csv file on a server.and multi-computer (12 ) to read/write the csv file. I find that the 12 computer all can read/write the csv file at one time point. thus can't save correct data ,. I have a confuse that why 12 computer can simultaneously read/write the csv file. if execut 3 program in one computer,the 3 program also can read/write the cav file simultaneously. please help. godSolved! Go to Solution.
08-28-2014 06:42 AM
Just as a side note:
in your case structure, in case "0" and "7" you use "Read/Write spreadsheet file" reopening for a second time the same file, since the reference has not been closed yet.
Marco
08-28-2014 06:43 AM
Hi,
safest approach: each executable/PC handles it's own data file. You will combine them later on while data analysis…
Next approach: your software opens the data files with EXCLUSIVE access rights. (The first accessor wins.) All other executables/PCs will have to wait for the first one to finish…
08-28-2014 07:15 AM
I would make a VI that handles the interaction of the file. That VI alone can touch the file directly. All of the other computers will have to talk to that VI through TCP/IP or some other network setup in order to read/write the data.
08-28-2014 08:13 AM
I would use a table in a database and append data there.
Marco
08-28-2014 08:19 AM
@hoover95 wrote:
Dear
Dear All I want to put a csv file on a server.and multi-computer (12 ) to read/write the csv file. I find that the 12 computer all can read/write the csv file at one time point. thus can't save correct data ,. I have a confuse that why 12 computer can simultaneously read/write the csv file. if execut 3 program in one computer,the 3 program also can read/write the cav file simultaneously. please help. god
How reliable is your network?
What happens if connection is lost and data is not saved?
I would save the file locally and copy to a designated directory on the server.
Have a separate program concatenate the data into one file if necessary.
08-31-2014 07:52 PM
MarcoMauri 已写:
Just as a side note:
in your case structure, in case "0" and "7" you use "Read/Write spreadsheet file" reopening for a second time the same file, since the reference has not been closed yet.
Marco
thanks for you help;
When multi computer read/write same csv file in the same server.you said that reopening for a second time the same file, since the reference has not been closed yet.
if have other method to resolve the problem.
thanks.
08-31-2014 08:00 PM
GerdW 已写:
Hi,
safest approach: each executable/PC handles it's own data file. You will combine them later on while data analysis…
Next approach: your software opens the data files with EXCLUSIVE access rights. (The first accessor wins.) All other executables/PCs will have to wait for the first one to finish…
Thanks for you kindly reply
I want to adopt you ''Next approach' that you suggested.but i don't how to realize the software opens the data files with EXCLUSIVE access rights. and All other executables/PCs will have to wait for the first one to finish .Can you give me a hint.I'll appreciate heartly.
Thanks.
08-31-2014 11:03 PM
I would do what crossrulz suggested. You can collect all the error messages using TCP/IP, push them in a queue and periodically save them to a file.
Also, you don't need to read every time the file and override it. You can just wire TRUE to 'append to file?' terminal of the 'Write To Spreadsheet File' and add rows at the end of the file.
And if you wire through the 'path' wire, you don't need the flat sequence structure at all.
09-02-2014 01:01 AM
Hi!
An other option could be to create a lock-file.
The first application writing to the file creates the lock-file.
If a lock-file is present, other applications will wait until it is removed before writing to the file.
Best regards,
Marco