LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to copy a file from windows to rt by labview programmatically

Solved!
Go to solution

hi community

i want to send a txt file to rt,how can i achieve this by labview program

please help me

0 Kudos
Message 1 of 7
(184 Views)

hi follow the following :

 a-Open the FTP Connection:

  • Use the FTP Open VI to establish a connection to your RT target.
  • Input the IP address of the RT target, along with any required credentials (username/password).

b. Change Directory (Optional):

  • If you need to place the file in a specific folder on the RT target, use the FTP Change Directory VI to navigate to the right folder.

c. Upload the File:

  • Use the FTP Put File VI to send the text file. You will need to provide the local file path of the text file and the destination path on the RT target.

d. Close the FTP Connection:

  • Finally, use the FTP Close VI to close the connection after the file transfer is complete.
CLA
0 Kudos
Message 2 of 7
(176 Views)

does RT running the FTP Service as default?

i mean if i need to set something in RT before i use ftp to transfer files?

0 Kudos
Message 3 of 7
(145 Views)

Hi Yuan,

 

recent LabVIEW (RT) versions don't install FTP by default as it is considered as "legacy technology".

You need to explicitely install the FTP service (using MAX) on your cRIO!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(136 Views)

i uesd a stupid method to workaround my problem

1. map rt to my windows pc,as driver Z

2. use copy to vi to copy file to Z

 

maybe there is a general methodto achieve

and i am still waiting for a good program method

0 Kudos
Message 5 of 7
(132 Views)

Hi Yuan,

 


@Yuanxj wrote:

maybe there is a general methodto achieve


There is no "general method" as each cRIO can be used in a variety of (network/hardware/software) systems…

 


@Yuanxj wrote:

and i am still waiting for a good program method


Suggestions:

  • Define a command/response system between your cRIO and your host computer
  • Create code in your cRIO program to handle all those host commands
  • Send a command to create a new (text) file in the cRIO
  • Send the data for the file and save the data in the cRIO
  • Send a command to close the file in the cRIO

This would be one possible "program method"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(126 Views)
Solution
Accepted by topic author Yuanxj
0 Kudos
Message 7 of 7
(124 Views)