Jump to content

Actor Framwork Challenge


Recommended Posts

I can see how to launch a core that I override with my own code. I have a state-machine inside my actor core that runs before the Call Parent Method. My problem is how does this framework/queue system allow me to STOP this state machine?  I plan to launch four other state machines like this that will all inherit the ACtor  Framework. I would like to be able to start and stop them as needed. 

post-43746-0-06093900-1389642976_thumb.j

Link to comment

Had this in another forum and got some additional guidance:

https://decibel.ni.com/content/message/64620#64620

 

Alright, I am a belie-ber in your words, and recognize that I need to implement them (especially, since I went back to the documentation and saw that it specifically called out to make sure I am running my ActorCore code is in parallel with the Call Parent VI).

 

Create a set of user events to manage your front panel updates. Create these events in your Actor Core.vi and bundle them into the actor object prior to invoking the Call Parent node. Then create a loop in your Actor Core.vi that runs in parallel to the Call Parent node which is dynamically registered for the events. When the actor receives a message, the handling function for that message can generate the appropriate event and pass along any relevant data. Alternatively, you may choose to use queues, notifiers, or other mechanisms to communicate with your parallel loop rather than events. Regardless of which mechanism you prefer, National Instruments recommends that you select only one data transfer mechanism within any given actor, and keep the total number of such mechanisms to a minimum within the application as a whole. Be sure to provide a mechanism to stop your parallel loop and trigger that mechanism by overriding Stop Core.vi in your actor child class.

 

How do I provide the mechanism for the loop to stop?  I can't just send a STOP string, nor can I use the STOP button at a higher level to send the STOP command to a lower level directly.....Can I?

 

 

 

Edit:  Okay, I was able to get my actor to stop by making sure the Call Parent Method was parallel to my process, adding an Event, and then sending a message to my QMH queue. 

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.