CSLUG - Central South LabVIEW User Group (UK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Messenger Library

Solved!
Go to solution

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.

 

GregPayne_0-1607354734691.png

 

Cheers, 

Greg

 

 

0 Kudos
Message 1 of 6
(278 Views)

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. 

GregPayne_0-1607358030662.png

Is there a way to 'unregister' the actor when it is closed? Or am I missing something?

 

0 Kudos
Message 2 of 6
(250 Views)

OK, I think have this figured out!

I eventually found the forum posts for Messenger Library. The 'new' forum is a pain to navigate!

0 Kudos
Message 3 of 6
(243 Views)
Solution
Accepted by topic author GregPayne

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.

 

JDP Science Tools 

0 Kudos
Message 4 of 6
(232 Views)

This suggest I need a comment in the "Panel Close?" event of the template.

 

https://bitbucket.org/drjdpowell/messenger-library/issues/50/document-actor-shutdown-behavior-in-pan...

0 Kudos
Message 5 of 6
(206 Views)

@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. 

0 Kudos
Message 6 of 6
(187 Views)