LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File transfer via ethernet: cRIO to PC and PC to cRIO

Hi all,

 

my system consists in a Windows PC (the host) and a RT cRIO (the target) connected via 1Gb/s ethernet.

 

The communication mechanism is realized in this way:

 - the host sends a configuration file (XML type) to the cRIO

 - the target sends a measurement file (TDMS type) to the PC

 

I'm wondering which is the best method to realize this exchange and i'm thinking to shared folders. Is this the right method to use? If yes, it is possible for the cRIO to access a shared folder previously created on the PC? Moreover, on the contrary, is it possible for the PC to access to a specific folder on the cRIO?

 

Thanks,

 

aRCo

0 Kudos
Message 1 of 6
(6,085 Views)

Transferring files to the CompactRIO should easy using the LabVIEW FTP VIs - you can use those to transfer files across to the CompactRIO. For the reverse (cRIO -> PC) you could set up an FTP server on the PC and use the FTP VIs.

 

Alternatively, you could use the TCP VIs to send the files, but this may require a bit more programming to initiate a connection and process the transfer.

 

I'm not sure about shared folders - I don't know how well the cRIO would handle network paths etc. it's not something I've ever tried.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 6
(6,078 Views)

@aRCo wrote:

is [it] possible for the cRIO to access a shared folder previously created on the PC? Moreover, on the contrary, is it possible for the PC to access to a specific folder on the cRIO?


Accessing "shared folders" is done via a protocol known as Samba or maybe even CIFS, and there is no current support for Samba or CIFS shares via cRIO controllers.  

 

-Danny

0 Kudos
Message 3 of 6
(6,062 Views)

I am also curious about this question.

 

I tried TCP method to transfer data from cRIO to PC, but I dont know about FTP method. Which method is more reliable?

0 Kudos
Message 4 of 6
(6,027 Views)

If your task is very urgent and you dont have enough time for establish the transfer, you can try to save the data from cRIO to USB flash, and then read it in PC.

 

Related link:

https://decibel.ni.com/content/docs/DOC-6103

 

I tried it, and it works!

0 Kudos
Message 5 of 6
(6,024 Views)

@jennyzzz wrote: 

I tried TCP method to transfer data from cRIO to PC, but I dont know about FTP method. Which method is more reliable?


They're the same method under the hood.  FTP uses TCP, but in a known/portable way.  You can use the TCP method as well, but it's more work for you.  If you're not savvy in TCP programming, the reliability factor in the TCP method may completely hinge on your programming skill and experience in working with TCP.  If that statement made you at all uneasy, go with FTP.

 

-Danny

0 Kudos
Message 6 of 6
(6,016 Views)