Mike Le Posted January 16, 2015 Report Share Posted January 16, 2015 I find myself in this situation a lot, where I have an Actor that inserts itself into a subpanel. I want to look at what's going on in the Actor Core block diagram. Typically I'd stick a breakpoint there so that the particular Actor clone's BD will pop up. But in that case, the front panel also opens, which very often leads to buggy behavior or errors when the Actor later tries to stick itself into a subpanel. Anyone have some workaround suggestions for this? I run into the problem a lot and always slug through somehow but I figure someone's got a better procedure. Quote Link to comment
Tim_S Posted January 16, 2015 Report Share Posted January 16, 2015 I run into this in source (without the AF) and in executables. I put messages throughout the code that go to a debug UI. This may not be able to see all values when the code is running, but it doesn't change the timing of code running at full speed. Since the debug UI displays based on a flag in a configuration file, I can leave the screen in an executable for when I remote into a computer and try to determine what the customer's issue is. Quote Link to comment
hooovahh Posted January 16, 2015 Report Share Posted January 16, 2015 Okay so my actors are not using AF and they aren't reentrant (so there is a bunch less issues I don't have to worry about). But I also found some times my front panel would be open when inserting it into a subpanel which would cause errors. So in the code that inserts the actor, it will perform a front panel close, then clear the error if it was never opened. Then I know the front panel isn't open so it is free to insert it into a subpanel. I'm pretty sure the close front panel from VI Server doesn't close the block diagram if it is open. So your debug probes and break points should be left untouched. Quote Link to comment
drjdpowell Posted January 16, 2015 Report Share Posted January 16, 2015 I find myself in this situation a lot, where I have an Actor that inserts itself into a subpanel. I want to look at what's going on in the Actor Core block diagram. Typically I'd stick a breakpoint there so that the particular Actor clone's BD will pop up. But in that case, the front panel also opens, which very often leads to buggy behavior or errors when the Actor later tries to stick itself into a subpanel. Anyone have some workaround suggestions for this? I run into the problem a lot and always slug through somehow but I figure someone's got a better procedure. I (not AF, but similar) set the subpanel option “Allow User to Open Block Diagramâ€. Then I open the block diagram from the subpanel, once the actor’s FP is loaded into it. Even when the actor leaves the subpanel the diagram stays open (this is a bit strange, since I have open block diagrams with no front panel open). Much more convenient that having to use breakpoints. Quote Link to comment
shoneill Posted January 20, 2015 Report Share Posted January 20, 2015 Any routine I write to insert something into a sub-panel first checks the state of the FP and if it is in an incompatible state, I change it to "hidden" before inserting. I also remember to remember the state so that when removing it I can reinstate the old setting. I generally have a few sub-VIs to do this work for me. Ps I don't close the FP because that can lead to really problematic situations where (AF aside) the VI is actually exited upon setting the FP to being closed. I have (in the past) also taken a reference (Open VI Reference) of the VI first, set the FP to close and then inserted it. Explicitly opening a reference to the VI (in the case it has been passed as a parameter instead of opening it within the sub-panel calling VI) prevents the VI from being stopped. 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.