From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Im getting an error 7 saying the file cannot be found,

  I am trying to operate a set of programs that have been written by some on else.  When I try to start the program I get this message error 7 occured at Openfile+.vi: Open file                         File not found.  The file might have been moved or deleted or the filepath msy be incorrectly formatted.   

 

What are the steps I should take to solve this problem?

 

 

Thanks

0 Kudos
Message 1 of 8
(3,085 Views)

Hi Jimbo,

 

Good afternoon and I hope your well today.

 

Do you have the VI / can you post it?


Firstly, I would check the file path input the file open vi is using. Its likely you've moved the file to a different location to that where it was development, or even, you don't have the file on your machine. Just as the error explains. 

 

Is this only an exe or a LabVIEW VI? If its the first, you need to contact the maker/creator.. if you have the source code, take a look at the block diagram. 

 

Hope this helps, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 8
(3,081 Views)

Here is the VI i am having troubl with.  I did recieve this file from someone else and it was not originally developed on this pc.  I did a .vi search and I found the Open File+.vi but I do not know how to redirect the pathway so that the Final calibration.vi can use it.  I have attached the program, any help is greatly appreciated.

 

Thanks

0 Kudos
Message 3 of 8
(3,076 Views)

Obviously, the programmer had a path hardwired in the code and the file is not there. Could e.g. be a file containing initial configuration settings.

 

When you say "program", do you mean a set of VIs or a standalone executable created using the LabVIEW application builder?

 

 

If it is an executable, there is nothing you can do. If you got an installer, try to reinstall and make sure not to move files around after reinstallation.

 

 

All fingers point to sloppy code. Errors like that should be explicitely handled. Do you know who wrote the program?

 

Possible problems: 

  • It could be that paths are defined as strings instead of path constants, which will break all paths when switching platforms (e.g. MAC vs PC vs Linux).
  • If this is an executable, paths relative to the toplevel VI need to be modified.
  • ...

 

If you have a set of VIs, you can inspect the code and find out exactly what's happening and even make corrections.

How familiar are you with LabVIEW programming? Feel free to attach the code here and we take a look. 😉

Message 4 of 8
(3,074 Views)

jimbio wrote:

Here is the VI i am having troubl with. 


It reads from two hardwired files. These must exists on your system for the program to work:

 

c:\motorsteps.csv

c:\polynomials.csv

 

Both are defined as strings instead of path constants, proving my point of sloppy code.

 

Message Edited by altenbach on 06-12-2009 08:41 AM
Message 5 of 8
(3,073 Views)
So how can I determine where those pathways are linked to?
0 Kudos
Message 6 of 8
(3,065 Views)

They are defined as string diagram constants.

 

Easiest would be to just create them using e.g. notepad. Of course you need to know what numbers should be in them, else nothing makes sense. Motorsteps is easy, because it gets rewritten with every iteration. Start with a file containing zero.

 

c:\motorsteps.csv reads a single number, nothing else.

c:\polynomials.csv reads a line with a set of numbers seperated by commas.

 

(it reads c:\polynomials.csv as a 2D array then does some extremely convoluted processing via dynamic data to get a small 1D array of polynomial coefficients.)

 

Unless you know what numbers should be in these files, you're out of luck. If you know the values, open notepad, type in the numbers, then save as e.g. "motorsteps.csv" on C:\. (make sure to enter the file name in quotes, else notepad would append .txt, making the file "c:\motorsteps.csv.txt")

Message Edited by altenbach on 06-12-2009 09:12 AM
Message 7 of 8
(3,061 Views)
Thank you for your help
0 Kudos
Message 8 of 8
(3,050 Views)