10-15-2015 01:44 PM
Good afternoon! Currently I am working on a project where I have a root actor launch multiple nested actors. I have noticed that when I send a shutdown to the root actor, that it does close out, but the nested actors are not shutting down. I looked into the Stop Core.vi of the AF.lvlib and it shows to read the nested actor enqueuers and send them through a for loop to an emergency stop message. However, when I highlight execution, I noticed when I call the shutdown in the root actor, it does indeed call the stop and pass the enqueuer for the nested actors to the stop. It seems only 1 of the nested actors is stopping, the others keep running. I investigated this further and took a look at the "Record Nested Actor" VI in the launch nested actor vi. I probed on the class wire coming out of that VI on exit and noticed that only 1 enqueuer was in the nested enqueuers array....shouldnt there be 1 for each nested actor that is launched by that caller? I can pass the enqueuers from the launch nested actor VI and build an array of my own in the class. Then when I shut down I specifically feed the stop to each of those Q's. That is overkill if the nested actors should be stored on the class wire of the caller? Am I missing something?
10-15-2015 01:49 PM
Are you launching any of them with the auto stop flag set to False?
The nested actor won't be added to that array if F is selected when launching the nested actor.
10-15-2015 01:56 PM
Craig, thanks for your response, no, I have the flag defaulted to True. However, I did miss something . I am launching multiple nested actors through a for loop.....once I put a shift register on the class wires of the for loop....VOILA! oops.....everything shuts down now....without explicitly writing the NQRs to the class and just using the auto shutdown feature....
sometimes I forget the most simple of things. FACEPALM!!!!
10-15-2015 01:58 PM
Ahh yes that would do it! Nice find