LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor Framework: Is it possible to return an output/indicator from a nested loop to the main.vi?

I have a nested actor that is processing some data.

Is it possible to see the processed data in my main.vi - in the front panel of the program I use to launch the root actor?

0 Kudos
Message 1 of 3
(765 Views)

@Myloweslife  wrote:

I have a nested actor that is processing some data.

Is it possible to see the processed data in my main.vi - in the front panel of the program I use to launch the root actor?


This style of programming works in small applications, but as an application grows larger, I would encourage you to explore an actual architecture for producing data in one hierarchy and consuming it in another (as alluded to by other answers to this question). In particular, do File >> Create Project and choose the Producer/Consumer template to explore a good starting point for such architectures. There are more sophisticated ones, but that makes an excellent beginning.

0 Kudos
Message 2 of 3
(724 Views)

@Intern1 wrote:

I have a nested actor that is processing some data.

Is it possible to see the processed data in my main.vi - in the front panel of the program I use to launch the root actor?


You want this only for debugging? If yes, put the processed data in an indicator on the front panel of the nested actor and when you launch it write TRUE to Open Actor Core front panel? (F) of the Launch Nested Actor.vi. This will show the front panel of the nested when it is launched (it does not work in exe).

If the caller needs access to the processed data you can also send a message back to the caller with the data every time new data is processed. If you do so, take care that sending a "normal" message from nested to caller will make the nested dependent on the caller and thus harder to be reused. Learn about abstract messages or about interfaces if you use LabVIEW 2020.

Lucian
CLA
0 Kudos
Message 3 of 3
(697 Views)