12-07-2020 09:26 AM
Hi James P,
I have started using Messenger Library for a small project with the aim of using it on my next big project. So far it is going well but I've stumbled upon something that I am not quite grasping.
I have a main application that can run smaller simple modules/actors. The actor I am working on only needs to be launched by the main application and then forgotten about. What I have done is create a non-reentrant actor which is launched. This all works OK. The problem comes in when I close the actor and then try and run it again, without restarting the main application. When trying to run it again I get an error 14
Error in launching "<actor-name>(X)": Parallel Process.lvlib:Startup Handshaking.vi:1260001<ERR>
Timeout waiting for start
I feel like I'm missing something really simple! This is how I am launching the NR actor. The actor was created using NR template.
Cheers,
Greg
Solved! Go to Solution.
12-07-2020 10:22 AM
Using the Actor Manager, I can see that when I close the actor, it is still listed. And as it is set to NR, I assume that is why the error is thrown when it is tried to be launched again.
Is there a way to 'unregister' the actor when it is closed? Or am I missing something?
12-07-2020 10:44 AM
OK, I think have this figured out!
I eventually found the forum posts for Messenger Library. The 'new' forum is a pain to navigate!
12-07-2020 11:29 AM - edited 12-07-2020 11:32 AM
You mean you want your actor to shut down when the User closes the front panel, right? By default, an actor only shuts down on window close if it is running toplevel. If running as a subactor, it just closes the front panel and keeps running. But it is quite easy to change this behaviour, in the "Panel Close?" event.
If you look in the YouTube Example, the "Control Server" is modified like this, while "Instrument 1" is the default behavior. Note that "Control Server" is not Non-Reentrant; it is possible to have a problem with a "fire-and-forget" resource that there can only be one of.
12-07-2020 03:48 PM
This suggest I need a comment in the "Panel Close?" event of the template.
12-07-2020 11:47 PM
@drjdpowell wrote:
But it is quite easy to change this behaviour, in the "Panel Close?" event.
It was right in front of me and I didn't even notice it!
Thanks for pointing this out James. Having worked through this I actually like the default behaviour. This way when the user opens the actor again it 'remembers' where they were which is good.