QControl Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting a "Parent" Actor name into a Q Control

Solved!
Go to solution

I've been developing some new Q Controls with a project I am currently working on. Love the toolkit by the way, really useful! 

 

During troubleshooting I had an issue come up where one of my controls was seemingly "locked up". 

 

I had originally thought it was something in the event handler VI. Here's the kicker, I have several instances of this one Q Control launch into the front panel of the actor. 

 

This brings an interesting situation where I had no clear way to tell which instance of the event handler might have the problem as they are clones. Am I missing something here? 

 

My solution was to insert the name of the parent actor into the private data of the Q control so that I can then rename the Event Handler clone and append the parent actor name to it. 

Is there a better way to do this?Are there any pitfalls to doing this? None that I can think of come to mind. 

Now when I insert a breakpoint and multiple instances of the event handler pop, I can see which containing actor is running this event handler. 

 

TIA

 

-Steven

Appreciate constructive criticism, it is there to help you succeed.
0 Kudos
Message 1 of 6
(3,314 Views)
Solution
Accepted by topic author SHowell-Atec

I think your way is fine, but it is frustrating to have to add the name of the Actor to the private data.

 

There are a few more ways to browse around and see clones though, which may get you what you want in a more roundabout way.

 

First, you can open the Main instance of the clone VI, and click View -> Browse Relationships -> Reentrant Items to see a list of clones. This method is good for opening clones after they've spawned rather than having to use breakpoints. You still don't get to see which one belongs to which, but it might be helpful.

 

The second way is to use MGI's Monitored Actors: https://www.mooregoodideas.com/actor-framework/monitored-actor/monitored-actor-2-0/

 

You can view multiple actors that have launched, see messages they receive, and other good stuff. I use it on all of my AF projects and it's invaluable.

 

Last, you could use some property nodes to get the ID of the owner of a certain control reference within the QControl event handler loop- just display it on the front panel when the event handler opens up. That way you don't have to clutter up the private data or name it manually. I believe with this method you could show at the very least the label of the control to which the handler is wired up (which could decouple it from the AF toolkit, as your controls will always have labels). If you're launching clones of actors (and thus the labels of the controls are all identical) you could use the property node(s) Owner and/or Owning VI to get similar information. In fact, that could be a nice addition to the QControl toolkit itself; somehow have it obtain that information when the control reference is modified.

Message 2 of 6
(3,305 Views)

Whether you have multiples of the same QControl on the one Actor Core or multiple Actors spawning Actor Cores with the QControl on it; sounds like we need some better debugging tools.  Like Bert said, if the first scenario you could tell the difference by accessing the label (or even the UID) but that doesn't help in the second scenario.

 

I use MGI's Monitored Actor all the time but because QControls don't inherit from the Actor, they won't show in the Actor Monitor window, themselves.  I think using the Owning VI property would give the clone Actor Core name.  That paired with the Actor Monitor would let you know would tie the instance of the QControl to the Actor Core instance.

 

How you are doing it is fine too.  Just trying to think of something more automatic that doesn't require extra inputs on your part.

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



Message 3 of 6
(3,295 Views)

Thank you gentlemen! 

 

Q, I absolutely love this tool-set, it has allowed me to create some truly interesting controls and indicators. If this were a paid for add on, the first words out of my mouth would be "shut up and take my money!"

 

I think someone else mentioned it at some point, but I think this ought to be LabVIEW native.....who needs X controls?? 

 

I've never written an X-control but from what I hear, they are a pain in the backside to build and to work with. 

 

At any rate, thanks for your efforts and the community's efforts in building and extending this toolkit. 

 

 

Appreciate constructive criticism, it is there to help you succeed.
0 Kudos
Message 4 of 6
(3,253 Views)
Solution
Accepted by topic author SHowell-Atec

@SHowell-Atec wrote:

I think someone else mentioned it at some point, but I think this ought to be LabVIEW native.....


Then make sure you give this idea a kudos: Add QControls to LabVIEW Core 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 6
(3,250 Views)

done, I couldnt remember where it was, so thank you for the link....

 

 

Reading some of the responses on that idea exchange makes me think that this is already in the works?

Appreciate constructive criticism, it is there to help you succeed.
0 Kudos
Message 6 of 6
(3,243 Views)