02-22-2021 12:43 PM
I'm having a hard time finding any information on how to write data to a compactRIO. I'm assuming the only difference between writing to my PC and writing to a cRIO is the file path that I set in the VI. I attached a basic test VI that I'm using to figure it out.
Also, where will I be able to see the data text/csv file? Will it be accessible from the project window, somewhere in the tree? Any help is greatly appreciated
02-22-2021 12:53 PM - edited 02-22-2021 12:55 PM
Hi David,
@David99999 wrote:
I'm having a hard time finding any information on how to write data to a compactRIO. I'm assuming the only difference between writing to my PC and writing to a cRIO is the file path that I set in the VI. I attached a basic test VI that I'm using to figure it out.
What about reading the UserManual? It tells you facts about the filesystem…
@David99999 wrote:
Also, where will I be able to see the data text/csv file? Will it be accessible from the project window, somewhere in the tree? Any help is greatly appreciated
You can use MAX to connect to your cRIO and access its filesystem…
Or you install the web support on cRIO and use a browser to access the cRIO. (This might be restricted to IEplorer as NI still uses Silverlight…)
Btw. I don't think "C:\Users\jeffc\Documents\stuff.txt" is a valid path on your cRIO - instead it looks like a valid path on your Windows development computer!
The cRIO has its own filesystem, it has NO ACCESS to your computers harddrive!
02-22-2021 12:54 PM
I would start here: Working with File Paths on Real-Time Targets
If you are saving the file to the cRIO, then you need to use WebDAV or FTP to get the file from the cRIO.
02-22-2021 02:28 PM
@GerdW wrote:
Btw. I don't think "C:\Users\jeffc\Documents\stuff.txt" is a valid path on your cRIO - instead it looks like a valid path on your Windows development computer!
The cRIO has its own filesystem, it has NO ACCESS to your computers harddrive!
Yes, I'm aware. I've been testing out file writing, and I was originally doing it on my PC. I am now ready to look at saving directly to the rio.
I will inspect the links.
02-22-2021 02:30 PM
I've already gone through that, and still did not see anything regarding the actual path name for writing to the rio.
Thanks for the info on getting the file from the rio
02-22-2021 02:41 PM - edited 02-22-2021 02:41 PM
Hi David,
the manual I linked in my previous message says:
In order to facilitate the porting of applications from those targets, this target supports the Windows-style /C home directory. This path is bound to the UNIX-style directory /home/lvuser.
So your path should start with /c…
You may also use the AppDir file constant to get the folder of your RTExe. I usually use a "/data" subfolder to store data on the cRIO.