Vladimir Drzik Posted February 16, 2010 Report Share Posted February 16, 2010 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? Quote Link to comment
Mark Smith Posted February 16, 2010 Report Share Posted February 16, 2010 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 2 Quote Link to comment
Popular Post Aristos Queue Posted February 17, 2010 Popular Post Report Share Posted February 17, 2010 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. 3 Quote Link to comment
Vladimir Drzik Posted February 17, 2010 Author Report Share Posted February 17, 2010 Thanks for your help. The idea with the custom probe is just great . I must try it as soon as possible. Quote Link to comment
Mark Smith Posted February 17, 2010 Report Share Posted February 17, 2010 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 Quote Link to comment
TimVargo Posted July 14, 2014 Report Share Posted July 14, 2014 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? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.