10-31-2013 03:26 PM
I am working on moving a program that uses DAQ from one computer onto another. When I try to run the program I get the error "Block Diagram Errors: Shared Variable ... VI containing Shared Variable node needs to be loaded in a project." All of the respective VI's that the block diagram has issues with are part of a library and are no longer directly accesible to my knowledge. The new computer has Labview 2012, while the old computer has a more outdated version. All DAQ drivers have been properly installed on the new computer as well. The new computer happens to be 64 bit. How do I fix this error?
10-31-2013 03:41 PM
To my knowledge the error indicates that the Shared Variable node is pointing to a Shared Variable that is referenced in a prior location (such as a project) but now no longer exists for some reason (such as running the top level VI outside of the project). Were the shared variables part of the library? How did you "move" from the old computer to the next? What do you mean by program (project with top-level VI?)? Can you explain further about the library you mention? It's just conjecture I'm afraid unless you can post some real code or a few more details but it sounds a lot to me like the shared variables the nodes in the block diagrams were pointing to don't exist now.
10-31-2013 03:50 PM
Shared Variables need to be in a project. You should just copy the entire project folder and sub-folders from one machine to the other. Alternately, you can build a Source Distribution and copy it to the new machine.
10-31-2013 07:00 PM
Not totally sure when this happened. But when I was working 8.6, the shared variable didn't need to be in a project. We moved the code to 2011 and suddenly it complained about needing to be in a project.
Did your original project have a project file? How did you transfer it over to another computer? Make sure you still have the project file. Then make sure this VI that has the shared variable and the library that the shared variable is from inside the project.
11-01-2013 03:38 PM
I am new to Labview so please forgive my terminology. I am trying to run a Labview made application I shall call "cedar.exe." This exe file was used on the previous computer to control a machine as well as take data from sensors using a NI 6008 DAQ board, supporting sensors, etc, which all seem to be in good working order. Simply copy and pasting cedar.exe from the old computer to the new computer resulted in DAQ's not being found as well as a few missing .dll files at startup. I remedied this by downloading the respective files from the NI website, so I no longer get these errors. I can now see the front panel of cedar.exe, press buttons, put in numbers, etc, however nothing seems to be connected within the program. Pushing the start button does not start its respective task, elapsed time is not being measured, etc.
The title of the exe's front panel is "cedar_Exec.lvlib:cedar_UI.vi." I then tried opening cedar_UI.vi in hopes of discovering the problem since cedar.exe's block diagram is of course inaccesible since it is an exe file. When I try to run cedar_UI.vi, I run into all the Block Diagram Errors with Shared Variable VI's containing Shared Variable node needing to be loaded in a project. Based on their names, each of these shared variables seem to be the programs directly connected to the sensors, machine, etc.
I also tried runing cedar_Exec.vi, which resulted in many DAQ files being missing. Example: Loading: \DAQmx\write.llb\DAQmx Write.vi
My ultimate goal is to get a working exe file that operates the machine, runs the sensors, saves data, etc, preferably using the VI's I already have.
11-01-2013 04:12 PM
The program was probably deployed using an installer since it's an executable using DAQ and Shard Variables. Try to find this installer. It could be on the original machine somewhere like a download or temporary directory. Unfortunately it could also have been installed from a network location or USB drive. The installer should have all necessary drivers and software.
I sounds like the Shared Variables are not deployed where the program is looking for them. This is why copying an executable from one machine to another doesn't always work.
The Shared Variables are not connected to the DAQ devices or anything else. The are simply a place to put data from one program so that it can be read by another program in a different address space or on a different machine. It really looks like you don't have all the components you need. The executable you have may only be the analysis portion of the package. There could be a separate executable that is run dynamically that does the actual acquisition.
11-03-2013 12:08 PM
Another option you could use is return to the old computer and use the NI Distributed System Manager to see what shared variables exist (or connect to the remote PC using your local one). This will give you an idea of what variables exist and the name of the process they exist under (like a container). At the worst, you could re-create them manually on the new PC (by name / type) using the NI Distributed System Manager again. If you're very lucky there are only a handful. NI DSM can be downloaded for free from the NI web-site.
A more recent Application Builder option was to automatically deploy shared variables on startup (and then potentially un-deploy on shutdown) but this option may not have been enabled (or post-date your application) when the executable was built.