LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfering data with datasocket read and FILE protocol in LabVIEW

Solved!
Go to solution

High,

 

I'm trying to transfer  ASCII file with datasocket read function using FILE protocol. It works for files on the local maschine but doesn't work for network maschines.

What is a right sequence for transfering data from network?

 

thx

 

Trajan

0 Kudos
Message 1 of 7
(4,328 Views)

Hi Trajan,

it depends on your system. Do you write both sides of the transfer? You could write it with TCP/IP function. Write a client and a server. You can also use FTP commands if you have an FTP Server on your target system, or your target is linked as a disk drive, then you can copy your file.

 

Mike

0 Kudos
Message 2 of 7
(4,325 Views)

Hi Mike,

 

thanks for your quick answer. I know that is possible to do with TCP/IP client-server and FTP. It also works with HTTP nad DS read but dosn't work with FILE protocol. In the article DataSocket Tutorial is written that DataSocket supports reading binary or text files with FILE protocol but it dosen't work if the text file resides on network comupter.

 

regards

 

Trajan

0 Kudos
Message 3 of 7
(4,311 Views)

Hi trajan,

 

Sounds like you might have a network communication issue (firewall, etc.?). Have you tried wiring the error output of DataSocket Read to an error handler to see what comes out?

Jeff | LabVIEW Software Engineer
0 Kudos
Message 4 of 7
(4,279 Views)

Hi Jeff,

 

By my opinion the firewall is not a problem. Look at the attached example. The sequence  file:\\127.0.0.1\c:\ni.txt[text] doesn't work but the sequence file:c:\ni.txt[text] works. Also I attached a picture that explains generated error. If this example will work well on a local maschine it will work alsowith the remote maschine.

 

regards 

 

Trajan

Download All
0 Kudos
Message 5 of 7
(4,265 Views)
Solution
Accepted by topic author trajan

It simply comes down to permissions on the file. I made a shared directory on my local machine and it worked fine with a coworker.

 

For instance: file:\\ <computer name>\ToBeShared\SineData.txt[text] where I have a shared folder on the directory. It could also be the firewall.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 6 of 7
(4,241 Views)

Hi Jeff, your explanation is useful and now program works fine with the local and network computer. Thanks a lot. I suggest, this infomation  of shearing directory to be included in the article DatSocket Overview.

 

regards 

 

Trajan

0 Kudos
Message 7 of 7
(4,232 Views)