LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Actor Programm not stopping

Hello, I have attached a zip file of a simple actor program. The program has one actor called actor A and a launcher. The launcher just launches the actor and stops. Actor I have overridden the actor core. There I have put a one button dialog that displays Hello World and then I used a read self enqueuer and connected it to the send normal stop. But the actor is not stopping. It is remaining locked. What am I doing wrong here. Why isnt the actor stopping. Thank you.

image.png

0 Kudos
Message 1 of 8
(530 Views)

That is because your Actor Core is still running, os your stop message is not send yet. 

When the Actor Core of the parent (Base Actor Core) has completed, the message will be send. 

 

Think Dataflow. 

0 Kudos
Message 2 of 8
(517 Views)

Open up the parent Actor Core: it contains the message handling loop. Your message will not be sent before that loop stops.

 

Send the stop message before calling Actor Core.

0 Kudos
Message 3 of 8
(517 Views)

govindsankar_0-1710339505496.png

So this is the solution

0 Kudos
Message 4 of 8
(508 Views)

Have you tried ??

0 Kudos
Message 5 of 8
(503 Views)

Yes and it worked. I understood the issue. Actor Core has the dequer inside and is expecting a message. Since no message has reached it, it is stuck. And the stop message will not reach it until the actor core has been executed. I did a program before which I copied from the internet. There the stop vi was in the second sequence and it still stopped. That was my doubt. But the difference is there it had a do.vi before. So actor core will execute that do.vi in the beginning and is now no longer expecting a message anymore. Because of that the stop.vi can be send afterwards and then will stop the actor. This is my understanding. Is this correct?

0 Kudos
Message 6 of 8
(498 Views)

Not quite right. 

The Actor Core will still wait for messages, until you send a stop message, or a custom message that makes the Actor core stop. 

Only at that point the call to parent Actor Core will finish, and what ever is after will be executed. 

 

Have you seen the example projects that comes with LabVIEW ?

0 Kudos
Message 7 of 8
(487 Views)

I havent seen the example projects, I just watched some videos and is now trying to do something myself. But actor framework is a little complicated. I will keep trying and post further questions here. Thank you. 

0 Kudos
Message 8 of 8
(467 Views)