LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I identify the main VI when debugging an unfamiliar program?

I am attempting to debug the source code for some software that runs an instrument. I have 16 LabView libraries, each with an average of 30 VIs. I have identified a VI that displays the measurement information stored in a cluster of strings, but cannot find out where the independent numerical measurement variables are turned into a cluster of strings. I am attempting to find how the display VI is called, but with no luck so far. I would LOVE to find the main VI and run a search through it's sub VIs, but cannot find it. I am familiar with the operation of C++, but this is my first LabView experience. Am I incorrect in assuming that the program begins with one single main parent VI? And how do I find i
t without searching through all 600 VIs?
0 Kudos
Message 1 of 5
(3,022 Views)
All LabView programs begin with a main VI. But if the main VI is using an instrument driver, that doesn't mean that there's only one entry point into the driver. The calling VI could call instrument driver sub-VIs one at a time.
When VI's are in LabView LLB libraries, VI's can be marked as top level VI's. They will show up at the top of the File >> Open list, separated by a line from the lower level VI's. Identifying a VI as top-level is done by the programmer, not by LabView. So it might not have been done for your libraries, but it's worth a look.
If you have an application that uses the instrument driver, one way to trace back up is to open the main VI of the application, then find any instrument driver sub-VI, right-click on its icon, and select Find All
Instances (in LabView 5.1 and above). You can continue to work your way up until you get to one of the application's VI's, instead of an instrument driver VI. You may have to try a couple of different chains before you find the high level VI you're looking for.
LabView's Find utilities and hierarchy display utilities work only on VI's in memory. LabView 7.0 has Tools >> Find VIs on disk where you can search for text.
Either way, it can be a good amount of work to locate the top level if the programmer didn't leave documentation of flag VIs as top level.
Good luck!
Message 2 of 5
(3,022 Views)
Hooray!! The library that has the same name as the executable I'm debugging has a main VI at the top, separated by a line... but when I try to open it LabView gives me an error that says "version 3.1 cannot be converted to 5.1 because it has no block diagram." When I try to open it with 3.1 it says that one of the subVIs cannot be loaded because it is broken and has no block diagram. So I am assuming there is no way to open this now? Other than my programs being corrupted, your answer was very informative and helpful. Thanks.
0 Kudos
Message 3 of 5
(3,022 Views)
Sory, posted too soon, the subVI is not my problem, the main VI continues to load, but after loading 267 SubVIs, I get an error that reads:

Failure: "C:\LV31\LVSOURCE\LVMAIN.C", line 1881
LabVIEW version 3.1
Please record the preceding information and contact National Instruments for technical support

So. I still can't open the main VI apparently because of a problem with LabVIEW. Suggestions, anyone?
0 Kudos
Message 4 of 5
(3,022 Views)
Sounds like you're trying to convert some LabVIEW 3.1 code to LV 5.1

If you're going to do a conversion that large, you may HAVE to do it in pieces, depending on your RAM.

Make a copy of the whole folder with all the code in it (for safety).

Check out the MASS COMPILE option, in the menus somewhere (not sure in 5.1 anymore).

Mass COMPILE one library at a time. (I hope they didn't put 250+ VIs in a single library).

Then try to load the main.

If that fails, follow the instructions:
"Please record the preceding information and contact National Instruments for technical support"
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 5
(3,022 Views)