08-19-2016 03:03 PM
Hey Everyone!
First post long time lurker. I have searched and looked into the application control invoke nodes/property nodes and cannot find (subject) or direction on (subject). I have used the subpanel to hold sub-vi's before, but I used the static VI ref. I am unsure how to get the AF to launch a new root actor and have it populate a subpanel or array of subpanels programmatically.
I am unsure as to what code I can provide given this is a specific example. Here is my FP/launcher though. The Actor core is still under development as I haven't tied all of the indicators to variables yet.
Thanks!
08-19-2016 03:12 PM
I would suggest you to start looking here and read https://decibel.ni.com/content/docs/DOC-17193
-If you want to launch root actor you need to get the root actor class and give as input to this vi: https://zone.ni.com/reference/en-XX/help/371361M-01/lvcomm/af_launch_root_actor/
-And this to start with :http://www.labvolution.com/labview-actor-framework-basics/
08-19-2016 03:16 PM
Hi, thanks for the response, but launching the root actor isnt the problem, it is getting the root actor front panel to populate into a subpanel (or array of subpanels). Thanks for the pointers to the examples though. They are very helpful and helped me learn the basics of AF.
07-11-2018 03:48 AM
Hi mbrue101,
When using AF and subpanels, there are two options:
I prefer prefer the first option as to me I prefer the dependencies to go from the Actor to the UI (that might change) as opposed to the other way around.
Root actor to UI actor:
To send the actor VI reference to the VI that is hosting the subpanel, then you could send a an message (normal or abstract) that contains your reference data. In your UI actor, you will then have the reference and you can update the subpanel in a method.
Root actor to UI vi (Actor to standard VI):
I would be hesitant to do this... but. the general ways of transferring data are still valid (not recommended) for example: CVTs, Globals, Notifiers etc... You just need a way to send your actors VI reference to your user interface.
04-12-2019 11:55 AM
I am using a parent actor class in order to do the embedding of the actor core VI into the subpanel of the UI. The UI sets the suppanel as a property to the launched actor an the launched actor embeds itself to the subpanel.
I would recommend to implement the UI itself as an actor and to launch the actor to insert as a nested actor. Like this, UI Data from the suppanel can be transmitted by an abstract message. Like this you can start several instances of the same actor to embed them to several suppanels and implement different fuctions on the calling actor.
I started using this technique for simple objects like buttons or even timer (abstract "time is up" message) but it is also suitable for more complex objects like a table indicator that allows multicollumn cells.
04-12-2019 12:07 PM
You should use the MGI Panel Manager! Just have your actor inherit from Panel Actor and it will handle all this for you.