11-21-2023 05:57 AM
Hello,
I am working with a RT program which runs on a cRio-9024. I am trying to read a spreadsheet with the Read Delimited Spreadsheet VI. I initially ran into the Error 7, File not Found, even though the file is in the project. I am sure that there is not an issue with the file path because when I run the same bit of code on a project not connected to the cRio, it works properly.
I believe the heart of the issue is that the project is not really running on the laptop, which has the desired file, but on the cRio, and so I should use FTP or WebDAV to put the file on the cRio. I believe I have succeeded by simply directing to the ftp://IPaddress directory from the Windows file explorer and copying the file I want there. However, I am not sure how to call the file within the LabView program so that the cRio can access it. When I provide the full ftp://IPaddress/.../filename.csv, I receive Error 1430, that I should provide an absolute path. However, I'm not sure how much more absolute I could be.
I would welcome any ideas. I realize that there may be an issue with my file upload as well as the file path call within the program.
Thanks
11-21-2023 07:51 AM
Hey a_b_c_dean,
you can use the WebDAV API to copy/move the files from/to your cRIO:
Using WebDAV to Transfer Files to Real-Time Target - NI
In the article, there's also described how to use correct path format depending on your OS on the cRIO - in your case VxWorks.
11-21-2023 07:57 AM
ftp://IPaddress/.../filename.csv is the path you used on the host PC to transfer file to the RT target.
On the RT target, you don't specify the IP address. See Working with File Paths on Real-Time Targets
11-21-2023 09:01 AM
@a_b_c_dean wrote:
Hello,
I am working with a RT program which runs on a cRio-9024. I am trying to read a spreadsheet with the Read Delimited Spreadsheet VI. I initially ran into the Error 7, File not Found, even though the file is in the project. I am sure that there is not an issue with the file path because when I run the same bit of code on a project not connected to the cRio, it works properly.
I believe the heart of the issue is that the project is not really running on the laptop, which has the desired file, but on the cRio, and so I should use FTP or WebDAV to put the file on the cRio.
I would welcome any ideas. I realize that there may be an issue with my file upload as well as the file path call within the program.
So here is the Important Question -- when you run your program, will the cRIO be connected to a PC, or will it be running "stand-alone", connected (via USB or TCP/IP) to no other system?
If the cRIO is connected to a PC (running LabVIEW), then it is running as the Real-Time partner of a LabVIEW Real-Time program, with the PC acting as the "Host" and the cRIO acting as the "Real-Time Target" (it runs a Real-Time Operating System, probably NI Real-Time Linux). Under this scenario, all of the "User Interface" (Controls, Indicators, Bells, and Whistles) reside on the PC, which is connected to the Target using TCP/IP. Under this model, while you can read and write to the cRIO's (limited) storage, to visualize the data, you need a connection to a PC, which also has such things as Hard Drives (including pluggable USB drives) and provides communication paths utilizing TCP/IP with the cRIO.
The virtue of utilizing the (deliberate) design of NI's Real-Time OS is that you have two processors working on your problem, each optimized for a particular aspect of your task. The PC, running LabVIEW, handles the interaction with the User, providing Front Panel Controls for entering information (numeric values, Strings and Paths, Boolean on/off, etc.), visualizing the information (numbers, strings, charts, etc.), and storing/retrieving large volumes of data of various formats.
In my Real-Time Projects, I have such a "division of labor" between the Host and the (cRIO) Target. I use Network Streams to communicate between the two. I generally have two streams for "message communication" between Host and Target (one H->T, the other T->H) and streams from Target to Host designed for data transfer (the Host "listens" for data coming from the Target and streams it to a waiting file on the PC's disk).
Since you are probably going to process any data that you get from the cRIO, you'll (eventually) want to get the data to a PC where you have more storage, where you can write "analysis routines" (in LabVIEW, I hope), and where you can archive/share the data.
Bob Schor