LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7 while reading text file

Hi,

I am trying to develop a vi that will read some text files and will do specific functions using sbRIO-9631. When the Vi is being run as a standalone vi withough the FPGA parts in it then it runs fine. But when I deploy the vi under the chassis of the sbRIO9631 and try to read the text files then it throws error-7 at me. PFA the vi as well as the screenshot of the error. If the same files are on disk and when I run the vi on disk, then it performs well and the files are read without any problems but on the chassis it never finds the files. Please advise me what to do under these conditions.

Regards,
Robot77

0 Kudos
Message 1 of 9
(3,576 Views)

Does the cRIO chassis have a file system?  If it does, does it have the same directory structure as your PC?  In your case, you are reading from files in C:\Users\sureshm\Desktop\LUT_data\ so I doubt your cRIO has a file system with that same path structure.

0 Kudos
Message 2 of 9
(3,530 Views)
Pardon my ignorance but can you please let me know how to check if sbRIO has a file system? Also if there is a file system, will I get the path from the same procedure? I too doubt that the path given by me in the deployed code is what is messing things up and I tried giving the IP address\file name. It was then throwing error 1430 at me and I doubt if anything is correct while I am doing that. Please do let me know what to do to find out the correct file path.
0 Kudos
Message 3 of 9
(3,528 Views)

Write a simple VI that has the File/Directory Info function from the File I/O palette.  Use the path c:\ and deploy it to the sbRIO.  See what it returns and whether it causes and error.

0 Kudos
Message 4 of 9
(3,526 Views)

I am not havin the hardware with me now but if this is what you mean, I , earlier in the day just tried to see the vi's path using a function in File I/O and it returned c:\ni-rt\startup\filename.vi. So do you think I must use a build path function with the base path as c:\ni-rt\startup and then append the filename.txt as the string and use that file name? If so I will test this tomorrow morning and will let you know how it goes. Thanks for the idea!

0 Kudos
Message 5 of 9
(3,522 Views)

I don't have any RIO devices, but that path sounds just like the ones I have on my compact Fieldpoint devices.

 

So what you'll need to do is place your files on the RIO with a path like that and have your file path constants point to your files there.

0 Kudos
Message 6 of 9
(3,516 Views)

I placed the files on the RIO chassis by adding files under chasis in the project window and then pointed my path constants to c:\ni-rt\startup\filename.txt but it is still giving me error 7 open file+.vi error and I found one ni-rt folder on my desktop and I added files under that folder under startup folder but still of no use. Please do let me know where am I going wrong

0 Kudos
Message 7 of 9
(3,504 Views)

I don't know whether putting the files under the chassis in the project windows is actually the same as deploying those files to the chassis.

 

I would try doing and FTP into the chassis to see if they are there, and copying them to there by FTP if they are not.

Message 8 of 9
(3,495 Views)

Actually FTP works like magic....the files are placed only when they areFTPed. Now it is working fine. Thanks a lot for all your time and suggestions!!

0 Kudos
Message 9 of 9
(3,492 Views)