LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the filepath to create a file and write data directly on the cRIO?

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

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

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,298 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(1,293 Views)

@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.

0 Kudos
Message 4 of 6
(1,255 Views)

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

0 Kudos
Message 5 of 6
(1,254 Views)

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.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(1,246 Views)