12-02-2008 07:26 AM
Are there ways to use LV's automated Find capability to look for any of the following items?
Coercion dots
Connector terminals for which connection is "Recomended"
Controls or VIs for which the Description or Tip is blank
Wires that go behind objects
Wires that graphically are shown touching a terminal but that are not logically connected to it
Objects that logically are inside structures like loops and case statements but that graphically are out of view (beyond the graphical edge of the structure)
Dataflow running right to left on a wire
Variables that are written to in zero places or in more than one place
Controls and nodes whose only output terminal is unwired
Unwired Error Out terminals
I'd like to be able to search through a VI and everything inside its heirarchy for the above things - going through and noticing all their occurances could be good for a project. Some of these are pretty clearly programming errors. Some of them are bad practice, or at least the preference to avoid can be a useful strategy or check. Some of these things are perfectly legitimate to use frequently, but glancing at all the occurances of them gives an opportunity to notice otherwise hard to spot errors. AFAIK LabVIEW doesn't allow searching for them, though it would be able to recognize them.
For any of these, is there a way to Find them?
12-02-2008 07:56 AM
I think that almost all of the items you listed are coverd by the VI Analyzer. It will find and list all of the offenses, let you browse to each case, and produce reports if you would like.
[Set PunMode = True]
It can be customized in the event you think the "out-of-the-box" configuration warrents it being renamed "VI-ANALyzer".
[Set PunMode = Flase]
Ben
12-02-2008 08:34 AM
12-02-2008 08:40 AM
12-02-2008 10:40 AM
12-02-2008 02:04 PM
12-02-2008 02:08 PM
pcardinale wrote:
And don't forget to look for output tunnels of for-loops that might have zero iterations.
By that I guess you are refering to using a shift register to make sure you don't loose the value (eg File ref) passed to the loop. I can't speak for that test but it did locate a For loop that had an indexing output tunnel that was not being used by the following code.
Ben
12-02-2008 02:09 PM
>output tunnels of for-loops that might have zero iterations
Good one. How about controls for which every property like default, range, format etc has never been changed? I guess I mean it has the default default...
12-03-2008 03:40 AM