LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Benjamin_C

TreeView probe

Status: New

We all use clusters and arrays of clusters to represent complex data. With LabVIEW, it is practical to build a cluster to represent the data in memory and shape it to display it on the front panel. Using the same object (control or indicator) to display the data on a graphical user interface and to store the data in memory avoids overloading the memory and simplifies the code.

 

But most of the time, all the data don't need to be shown on the front panel! Some elements need to be hidden. If we use a probe to check the content of such a data structure for debugging purpose, LabVIEW just shows the control as it is supposed to be displayed on the FP. The hidden elements are not visible!

 

Here is an example of a probe put on one of my data structure (array of clusters) :

 

CLUSTER.png 

 

And here is the equivalent representation in a tree view. On the first column, the labels. On the second column, the values.

 

tree.png 

 

What is your prefered representation? 

 

PS : Such a tree view representation can "easily" be obtained from a control reference or from an XML string (with the Flatten to XML VI). Nevertheless, the Flatten to XML VI returns an error when it encounters strings with accentuation.

 

7 Comments
Marc Blumentritt
Member
Of course, if the tree view can "ealily" be obtained from a control reference or from an XML string, you can program such a probe yourself. This probe would work only on your type def cluster or array of clusters.
CLD
Benjamin_C
Active Participant

I have already done this and I use it regularly. It works perfectly with any data type. The problem is the use :

1. a SubVI needs to be placed on the diagram instead of using a probe ,

2. it displays the value of a terminal, a probe displays the value that pass through a wire.

tst
Knight of NI Knight of NI
Knight of NI
You may wish to have a look at Ton's variant probes. I'm not sure if there's a way of attaching this probe to a non-variant wire without selecting it manually.

___________________
Try to take over the world!
Marc Blumentritt
Member

Benjamin: why do you have to place a SubVI in the diagram? I'm not sure if we are talking about the same thing. I'm talking of custom probes, which you can create yourself by right-clicking on a wire -> custom probe -> New...

 

You can do a lot of funny stuff with custom probes.

CLD
Benjamin_C
Active Participant

Thanks for your feedback Marc. 

Indeed, I don't have the habit of using custom probes.

But It guess that a custom probe is associated with only one data type. What I would like is a treeview representation for any datatype.

TCPlomp
Trusted Enthusiast

Well I have seen an earlier implementation image of my 'Variant Probe', which had it directly hooked on a cluster  (old OpenG link, incomplete), this probe doesn't need the explicit conversion to Variant. Perhaps gone in later versions of Wiki

 

It would be nice if this can be restored.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
tst
Knight of NI Knight of NI
Knight of NI
Ton, note that in the "Using..." section it says that if the wire is not a variant you have to do the manual selection I refered to earlier.

___________________
Try to take over the world!