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.
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.
06-12-2009 10:04 AM
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
06-12-2009 10:21 AM
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,
06-12-2009 10:31 AM
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
06-12-2009 10:37 AM
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:
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. 😉
06-12-2009 10:40 AM - edited 06-12-2009 10:41 AM
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.
06-12-2009 10:59 AM
06-12-2009 11:09 AM - edited 06-12-2009 11:12 AM
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")
06-12-2009 12:18 PM