01-28-2016 09:06 PM
Hi all,
I encountered a rather bizarre yet simple issue. In my myRIO project, I used to save files directly on myRIO (using a file path constant), and it works. For example, the path I saved this following file(RawData_Fly2_E1_F_2016Jan26.tdms) is this:
/c/RawData_Fly2_E1_F_2016Jan26.tdms
With the above address, this file is saved to this location: R:\c\RawData_Fly2_E1_F_2016Jan26.tdms
However, now my project started to generate very big files, so I want to save the files directly to my computer, to which the myRIO is connected via a USB device cable. I specifiled my file to be saved directly under C disk.
I did the following changes: I used the File Path Control to specify the location, instead of using file path constant.
But with this change, my file cannot be found. It basically is gone...All the files that contain this change of location cannot be found in the specified location or original location.
Here is a screenshot of my file path control and file path indicator directly reading the file path.
Would you guys help me how to correctly save files directly from myRIO to computer?
Thank you!
Solved! Go to Solution.
01-29-2016 09:09 AM
Think of the myRIO as a computer - running its own OS and with it's own file system. The LabVIEW code you write runs on that computer so, without some sort of networking/file transfer, it can't acccess your computer.
Typically you would either:
1) Stream the data over the network to a VI running on your computer (e.g. network streams) which then saves it to disk on your computer.
2) Use some method of transferring the files from the myRIO to your computer either automatically (e.g. FTP, network folder (??), HTTP POST the files), or manually (FTP / WebDAV)
02-05-2016 06:29 PM
Thank you, Sam_Sharp. Apologies for the delayed response due to my hardware failure and cannot test myRIO this past week.
Is there pros and cons for the two methods you mentioned? Would you give me some recommendation/links of NI whitepage as to how to inplement either methods? I don't have a computer background but I am willing to learn and want to solve this problem.
Many thanks!
02-10-2016 11:19 AM
Here are a few pros/cons - there are obviously lots more - it's up to you to decide what you need and which to go for.
Streaming Data:
+ Data is immediately available and visible on the host PC so you can view/analyse it live
- If you lose connection, the PC crashes or you shutdown your application, you will start to lose data
Saving to files:
+ If the transfer fails, you still have the files to manually transfer them later
+ Using WebDAV / FTP to access your myRIO doesn't require any extra coding
- It will use up disk space on your myRIO so you might run out (unless you save to a large USB stick!)
- If you use a web server to POST the files, you need a web server, and a script to handle the incoming files
There are lots of whitepapers/tutorials about network streams - google them. Saving files on the myRIO is as simple as specifying a path local to the myRIO (see here: http://www.ni.com/tutorial/14669/en/) and then transferring the files by whatever means you have.
02-12-2016 05:09 AM
Hi
I am a fan of the later method especially if you want to guarantee that no data is being lost.
Why don't you use an USB storage device that you attach to myRIO and later transfer the files with WebDAV (which is faster than FTP based on my experience).
03-28-2018 04:26 AM - edited 03-28-2018 04:27 AM
Hello,
I try using WebDAV / FTP code for myRio but it not work. Can you for me an example