01-12-2021 12:16 PM - edited 01-12-2021 12:28 PM
Hello,
I am using a cRIO 9030 and wanting to use it to output data in real-time. I have mostly been running my RTMain from the PC to debug and develop the LabVIEW project. I am at the point where I want the cRIO to independently run the project and not need the PC. I properly built the project and deployed the startup and rtexe files (so I thought).
Through some debugging I have found the cRIO is not accessing text files like it should when run by itself. However, when running the RTMain from the PC, the file functions are executed properly. It looks like all file vis are looking at the correct files paths: /home/lvuser/natinst/bin, where the text files and startup and rtexe files are located.
The cRIO is run by Linux and I have read that Linux sometimes denies access to certain folders. Could this be the case? If so, how do I give the rtexe file permission to access files?
01-12-2021 01:03 PM
01-12-2021 01:12 PM
GerdW,
The cRIO directory I am using is /home/lvuser/natinst/bin. I have my rtexe and text files in there as well as two additional folders. One is one that I created and using and another called 'project' that I do not remember creating (this project folder that an errors folder which then has folders with different language names on them).
Did you have you files in that project folder?
01-13-2021 03:48 AM
Hi elvis,
Are you sure that the path being searched by the RTEXE is the same as you expect?
In particular, if you use Application Directory, Current VI's Path, or similar, it might change - I don't recall exactly which change in which ways right now, but you could either a) test or b) check the documentation with care (I'd guess a) is faster/more confidence inspiring if the hardware is easily available).
You might have already tried this, but adding Path Indicators and connecting to the remote VI to debug (via Operate > Debug Application or Shared Library and then entering the IP address of the cRIO, with debugging enabled) could be useful.
Alternatively you can try writing some text file with the path values (but then you have to hunt down the text file, which if the problem is related to path handling, could be an extra annoyance to deal with).
The opposite side of the problem is potentially deployment of the text files you're reading - you can check these most easily with the Silverlight-based web browser (which probably means using I.E only) and browsing to the cRIO IP address, then using the file browser after logging in.
Alternatively you can check using the command line, e.g. via SSH onto the cRIO if that is enabled (via MAX).