01-24-2018 03:32 AM
Hi everyone,
I have a question regarding the workings of Actor Framework, especially since i seem to have managed to trigger some strange behaviour while implementing it.
I am using LV2012 SP1 for this one and unfortunately cannot upgrade the LabVIEW Version for this Project.
So i am calling multiple instance of an Actor in this Example (See attached Code below). I override the Pre Launch Init VI and send a connect message to the particular instance of the Actor.
The Actor goes on to enter the Actor Core.VI and executes the Message "Connect" which looks like this:
So far so good. The Connect.VI goes on to trigger a Time Delayed Message which runs until the actor stops. Now the interesting part - If I introduce a delay into the Connect.VI , let's say a delay of 2 Seconds (look at the above picture for reference) and I run the Code and then stop it - the Libraries in my Project will become locked.
If I do not introduce the Delay, the libraries don't lock. Any Idea why this might be happening?
One more clue - I tried tracking down which VI stays open and it seems that the "Time-Delayed send Message Core.VI" is somehow still in use:
I really don't want to introduce this Bug into a Code a deploy at the customer. Any Ideas about what is happening here would be greatly appreciated.
Siegmund
Solved! Go to Solution.
01-24-2018 07:44 AM
If your libraries are locked and you close the project, does this dialogue box appear stating there are still some modules running?
01-24-2018 07:54 AM
@Oli_Wachno wrote:
If your libraries are locked and you close the project, does this dialogue box appear stating there are still some modules running?
Hi Oli,
thank you for your reply. No dialog box appears. I also tried making an Executable and stopping it and it works normally. After stopping it, there is also no more task in the Windows Task Manager.
So it does appear to be stopping, it just locks the Libraries for some reason.
01-24-2018 08:20 AM
So the actor seems to shut down...
Unfortunately I can only go back as far as LV2013, yet a link which drjdpowell posted some time ago came to my mind:
Quick Tip: Asynchronously launching VIs the right way
Looking at the 2013 implementation, it seems it is done the wrong way there. But I have no clue, why this should happen only with longer delays..
01-24-2018 09:10 AM
Are you notifying the timed message to stop in stop override?
01-24-2018 10:50 AM
If I'm getting it right, the Time-Delayed Send Message Core.vi should stop at latest when the Actors Enqueuer get's invalid/ Actor stops.
After trying to send the next time-delayed message to the shutdown Actor, all VIs should stop executing. And libraries should be unlocked
Yet maybe I'm missing something here
01-25-2018 03:17 AM
@Oli_Wachno wrote:
So the actor seems to shut down...
Unfortunately I can only go back as far as LV2013, yet a link which drjdpowell posted some time ago came to my mind:
Quick Tip: Asynchronously launching VIs the right way
Looking at the 2013 implementation, it seems it is done the wrong way there. But I have no clue, why this should happen only with longer delays..
Hi Oli,
that did the trick! No more weird behaviour. I will have to test it thoroughly, but at least for now, all seems well. Thank you for your help, you saved me from some future anxiety there 🙂
@Taggart wrote:
Are you notifying the timed message to stop in stop override?
As Oli wrote, in this particular Example i posted, the timed message stops on it's own, once the "Actors Enqueuer get's invalid".
01-25-2018 10:00 AM
yes I forgot that it did that. I guess when I took the class Allen just beat it into to my head to always clean things up in StopCore. In this case it's not necessary.