Actor Framework Discussions

Showing results for 
Search instead for 
Did you mean: 

How to make Actors not shared clones or to "clean" the clones on start?

I think we're on the same page here, and I appreciate you sticking with me.


>then you write it with an input for first call


That's what I meant by "manually initialize", you're basically replacing the First call? primitive with a "manual" boolean input. I understand I'm not maintaining the whole actor'sstate.


My use-case is the third one you mentioned. Basically, if this wasn't a shared clone reentrant, I'd have had a First Call inside that VI to automatically refresh the display on first call even if the display state enum hadn't changed, then I wouldn't need to worry about wiring it up. Not that it's a big deal- it's not at all.


The only time this would be a minor pain is a hypothetical situation where I didn't know when a given subVI would be called the first time and still needed to initialize it; in that case I'd need to manually invoke it one extra time at the start of the Actor to initialize it, but it's not that big of a deal.

Heads up! NI is moving LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 21 of 22

Yes, I think we're synched up now.


Summary for future readers: "First Call?" really does mean "first time this section of code is invoked application wide". You can use it for system resource acquisition and one-time computations of constants. For everything else, you need to know your current system state and pass that state into common functions that need to know it.

0 Kudos
Message 22 of 22