From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I probe wire values inside a class?

Solved!
Go to solution

Hello all

 

I am using a Modbus library built using classes. I need to view the data inside a VI which is part of a class in an inheritance tree. I cannot place a breakpoint in this class, or probe any wires or retain wire values. I have looked into creating a custom probe, but the option is not available. I have read through several documents on LabVIEW classes and tried the inbuilt help too, but I am sure I am missing something obvious. Please could someone point me to the right resource to use or tell me what I'm doing wrong.

 

Thanks 

 

Ray

0 Kudos
Message 1 of 9
(3,640 Views)

@Tarsel wrote:

Hello all

 

[...] I have looked into creating a custom probe, but the option is not available.[...]

 

Thanks 

 

Ray


Can you elaborate on this?

0 Kudos
Message 2 of 9
(3,625 Views)

Why can't you place down a probe? Class controls/indicators don't show private data, but probes do (I believe they also show parent class data). If standard techniques don't work, why not create a "dump private data" accessor that reads off all private data? That can then be used in a normal indicator for debugging purposes.

0 Kudos
Message 3 of 9
(3,616 Views)

Hi Gregory

 

If the program or running or not, I can normally right click a wire and the Probe option is available. In this case the option is greyed out or not visible (same for break points). I have read some of the literature about creating a custom probe and assigning it to the libray containing the classes, but the method outlined by NI requires me to be able to have the create probe option in the first place. 

 

Hi ilovemath

 

I don't know why I can't place a probe, I think it will be something to do with whether I am looking at the class declaration or whether I somehow need to look at the instance of the class when the program is running. Not sure how to do this... I have tried placing an indicator and viewing it when running, but this doesn't seem to work either - no data is displayed. Again it looks like I am not looking at the right running instance. I could externalise the data by wiring to a terminal, but this then does not fit the class definition. The final option I can think of is to use a named queue, but it seems there must be a simpler solution.

 

Thanks for the replies,


Ray

 

 

0 Kudos
Message 4 of 9
(3,579 Views)
Solution
Accepted by topic author Radiator

@Tarsel wrote:

Hi Gregory

 

If the program or running or not, I can normally right click a wire and the Probe option is available. In this case the option is greyed out or not visible (same for break points). [...]
Ray

 


This indicates that the VI is configured for "Enable Debugging" = False (unchecked).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 9
(3,574 Views)

Thanks Norbert - that looks like the problem. I can't test it out at the moment, but I now have the probe option - hooray!

0 Kudos
Message 6 of 9
(3,569 Views)

I've tested it now. Its impossible to trace dynamic dispatch method. You can add wire probe inside DD method, but you'll not get any trace result. Am I wrong? (Debugging allowed.)


*** LV2018 ***
0 Kudos
Message 7 of 9
(2,379 Views)

What are the reentrancy settings of the method? If it is a clone, you will need to add a breakpoint to the method to get your probe to actually probe the clone instance that is called. 

0 Kudos
Message 8 of 9
(2,365 Views)

You may also have some luck opening it and then going to View > Browse Relationships > Reentrant Items in that case. You can then open the specific clone and probe there.


GCentral
0 Kudos
Message 9 of 9
(2,361 Views)