LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing updated private cluster data within the actor core of an actor

Solved!
Go to solution

Hi,

 

I have an actor and the actor has some private data. I create a method vi to update some of its private cluster data. Then I create a message out of it. Then in actor core, by using the read self enqueuer I send the message I created earlier to the actor itself to  update its private data. But now if I unbundle the actor again after sending the message to see if the private data has been updated, I see it has not been. So that is now how actors work. I cannot pass the actor data within the actor core by sending messages. I have to directly send the data within the actor core. Is that how it works?

0 Kudos
Message 1 of 3
(407 Views)
Solution
Accepted by topic author govindsankar

Reading your question in the context of new AF developers, I think what you are doing is forking the actor wire and expecting one fork to update data on the other (apologies if I'm misreading!). The wire is a normal, by-value LabVIEW wire not a channel wire or anything fancy, so one fork doesn't affect the other unless you add another communication mechanism like a DVR inside that is by reference and not by value:

avogadro5_3-1722451628288.png

 

Message 2 of 3
(380 Views)

Of course, reference, yes thats how you do it. I forgot, i havent done actor frame work and i dont have that much experience in it. I remember updating the values in the past, but i forgot how. Yes by using references. Thank you. I feel like an idiot. And yes I was forking the wire. Thank you 

0 Kudos
Message 3 of 3
(360 Views)