Jump to content

Debugging dynamically opened reentrant VIs


Recommended Posts

Many times I am using reentrant VIs, which have more clones dynamically opened through VI server. Their front panels are not visible. I find it quite hard to do any debugging, because in order to place a breakpoint, I need to access the clone's block diagram. The only way I'm currently using is programmatically opening the front panels at the time the VIs are being opened. However, that means changes being made to the code just for the debugging session, which is quite clumsy. What do you guys use?

Link to comment

Opening the front panels of the clones and then the block diagrams is most direct way to debug. The only other thing that I find helpful is to put the property node that opens the panel in a conditional disable structure and then create a DEBUG_REENTRANT flag that an be true or false (or mutiple flags for different circumstances). That wah, you can just modify the conditional symbols in the project when you need to debug and you don't have to make explicit code changes. I also have a utility that I use to debug reentrant VIs that runs a daemon in the background and a VI that enqueues messages for that daemon. I can drop the "send message" VI anywhere I want to see what's on a wire and when that wire carries data the message pops up on the daemon.

Mark

  • Like 2
Link to comment

Write a custom probe for a VI Refnum type. In the diagram of that custom probe, put an Open FP method call. Then probe the wire coming out of your Open VI Reference call.

If you have scripting knowledge, you can go further and have the custom probe open the panel and open the diagram and put a breakpoint on the top-level diagram, or some other point within the diagram of your choosing, so that when the VI actually gets called to run, it'll trip the breakpoint.

Q. Why didn't I think of that?

A. Because I'm not AQ

I'm off to create my custom probe now....

Mark

Link to comment
  • 4 years later...

I also have a utility that I use to debug reentrant VIs that runs a daemon in the background and a VI that enqueues messages for that daemon. I can drop the "send message" VI anywhere I want to see what's on a wire and when that wire carries data the message pops up on the daemon.

Hey Mark!  I know this is a somewhat old thread, but it still contains valuable information.  In fact, your utility that you describe to pass messages out of reentrant VIs for display in a message monitor daemon, sounds very useful even now.  Do you still do it this way?

 

Recently I've been working on adding enhancements to the LabVIEW Task Manager project, and I have been considering including this very functionality within that tool.  It doesn't sound too hard to write from scratch; but if by chance you've been improving and tweaking it over the years, then why reinvent the wheel?  Would you be willing to donate your code to our project?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.