06-01-2022 03:46 PM
Hello, I am using LabVIEW 2021:
I had nice working VIs (not projects) that I decided I wanted to organize into folders under the same directory such as: "Currently_Used_VIs", "Obsolete_Previous_Version_VIs", "Testing_VIs".
Obviously, I didn't think about issues with dependencies. I noticed a problem when I got a dependency warning saying it found the VI in a different location that expected. It seemed to me like it had fixed the problem by finding it elsewhere, so I closed it. I was tired of those errors, so I read about adding VI Search Paths under "tools->options..." in LabVIEW. I added the new folders, but still got warnings. I foolishly started moving the VIs to a different folder that it was searching for by default. Now my VIs do not work at all. When I click the "run" arrow, it just flashes the double black arrow like it is going to run, then comes back to the single white arrow immediately, and I get no errors or warnings at all. I have opened a support ticket with NI, but haven't heard much back. I believe I just need to know which directories my files should be in, and how I can make sure my paths are correct so my VIs run. I can send what files are in which directories. I am hoping I'm not missing any important files that possibly allow LabVIEW to run in general, I did my best to not delete any files. Is there a way I can uninstall LabVIEW and reinstall in while keeping all of my VIs and SubVIs, and hopefully this will reset everything? Or is that a very bad idea?
I'd appreciate any help or advice, and If I need to provide which files are in which directories, I can do that.
06-01-2022 04:01 PM
It's such a complicated matter that I would probably just start over with a fresh copy pulled from source control...
06-01-2022 04:43 PM
Thank you. Do you mean uninstall and reinstall LabVIEW? How do I go about doing this, and how can I preserve my VIs and Sub VIs so I don't have to remake them? I also have a Zaber driver and VI pallet I've been using to control my Zaber stages that were installed from their website. After I reinstall it, how would I define where to look for these VIs?
Thanks for the help. I am very new to the searching and paths system on LabVIEW (and am fairly new to LabVIEW in general).
06-01-2022 04:58 PM
@LVQs wrote:
Thank you. Do you mean uninstall and reinstall LabVIEW? How do I go about doing this, and how can I preserve my VIs and Sub VIs so I don't have to remake them? I also have a Zaber driver and VI pallet I've been using to control my Zaber stages that were installed from their website. After I reinstall it, how would I define where to look for these VIs?
Thanks for the help. I am very new to the searching and paths system on LabVIEW (and am fairly new to LabVIEW in general).
What I mean is that all this code should be in a Source Control repository. Archiving code is one of its features. With it, you always have the latest version of your source code available so you don't need to reconstruct it.
Now that you have jumbled up all the dependencies in your VIs, it will be very difficult to sort it all out. 😞
06-01-2022 05:13 PM
@LVQs wrote:
Hello, I am using LabVIEW 2021:
I had nice working VIs (not projects) that I decided I wanted to organize into folders under the same directory such as: "Currently_Used_VIs", "Obsolete_Previous_Version_VIs", "Testing_VIs".
Obviously, I didn't think about issues with dependencies. I noticed a problem when I got a dependency warning saying it found the VI in a different location that expected. It seemed to me like it had fixed the problem by finding it elsewhere, so I closed it. I was tired of those errors, so I read about adding VI Search Paths under "tools->options..." in LabVIEW. I added the new folders, but still got warnings. I foolishly started moving the VIs to a different folder that it was searching for by default. Now my VIs do not work at all. When I click the "run" arrow, it just flashes the double black arrow like it is going to run, then comes back to the single white arrow immediately, and I get no errors or warnings at all. I have opened a support ticket with NI, but haven't heard much back. I believe I just need to know which directories my files should be in, and how I can make sure my paths are correct so my VIs run. I can send what files are in which directories. I am hoping I'm not missing any important files that possibly allow LabVIEW to run in general, I did my best to not delete any files. Is there a way I can uninstall LabVIEW and reinstall in while keeping all of my VIs and SubVIs, and hopefully this will reset everything? Or is that a very bad idea?
I'd appreciate any help or advice, and If I need to provide which files are in which directories, I can do that.
Your description calls to follow software development best practices and use source code control (like Git or SVN).
Depending on how large your codebase is, I would recommend starting from scratch and following software development best practices.
Regarding your NI Support ticket, I guess, there is very little the support engineer might be able to do as the current mess is due to lack of experience.
I believe I just need to know which directories my files should be in, and how I can make sure my paths are correct so my VIs run. I can send what files are in which directories.
You can figure out the directory by looking at the directory where LabVIEW is searching the missing dependencies. In such a scenario, I would put all the VIs and dependencies into a temporary LVProj and start sorting out the missing dependency errors.
06-01-2022 05:25 PM
On the Zaber Library specifically, our recommendation would be to save the folder into C:\Program Files\National Instruments\LabVIEW 2022\instr.lib\ (or equivalent path) and not change and of the VIs in that folder. This should allow the Zaber subVIs to show up in the Instrument Libraries pallet in the block diagram.
06-02-2022 09:34 AM
If you just have moved them around in proximity in the file system it shouldn't be too hard to unravel.
Zip the obsolete folder so LV don't find the files and then Create a project, add your Main.vi and do the tedious "Select VI" when it doesn't find them.
Sometimes it's a knot that unravels, sometimes you need to select a lot for it to work.
06-02-2022 10:54 AM
Thank you, I have the Zaber Pallet there, It still gives me a warning for it, but when I ignored the Zaber warnings, they seemed to work fine.
I've really only moved the locations of the VIs around. I have the computer backed up, so I'll see if I can grab all of the files and file locations from there. Worse case scenario, I'll start over and follow the recommendations. Lesson learned!
06-02-2022 11:09 AM
As others have said, "make backups and use source code control a week ago" is the answer you need but obviously it's not super helpful for your current situation, lol!
It unfortunately sounds like your files may have been corrupted since they don't run AT ALL so you might be a bit hosed.
Still, the advice to use a Project is sound. It may seem like "overkill" for "just a small program with a few VI's", but a Project is indispensable for organizing and managing dependencies. I haven't done any development outside of a Project in over a decade. I've met other LV devs who are resistant to using projects, but once you just accept it you will see why it's good to use them.
One of the biggest reasons being it helps move dependencies. You can move files on disk using the Project Explorer and it will (mostly) keep your dependencies updated without exploding all of your files.
06-02-2022 11:13 AM
I'll see if I can start a project and add the VIs, thanks!