06-29-2016 07:34 PM
06-29-2016 07:53 PM
Use a queue. Enqueue the data in the subVI. Have the main VI dequeue it in a loop and write the values to the graph's terminal.
06-29-2016 08:39 PM
06-29-2016 08:42 PM
06-29-2016 08:45 PM
In a queue generally you can transfer anything you want but the point is whether you really need to do it. Why are you setting all the properties in a sub vi? Are you going to display the sub vi front panel to the user? In that case why would you want to transfer everything to main vi and also how is your main vi and sub vi related? If possible attach the main and the sub vi for getting into a proper solution.
06-29-2016 08:49 PM
Search the forums for producer/consumer. Also the example finder in LabVIEW and the New... file menu has a producer/consumer template.
The queue sends along values. You asked for an "efficient way to send values" and you said you were doing the manipulation of control properties in teh subVI. You can send along combinations of data in whatever format you want. You can define a cluster that can be any combination of datatypes you want. A very flexible cluster is one that contains a cluster of an enum so you can send a "command" and a variant which can package any different type of data. On the receiving end, you read the enum out of the cluster and decide what to do. You can then convert the variant back to a specific datatype.
06-29-2016 08:49 PM
For an example, take a look at the Producer/Consumer architecture.
@blessedk wrote:
Also, would the associated properties also be transferred along, or just the values?
Only the values would be transfered between the VIs.
06-29-2016 08:51 PM
06-29-2016 08:58 PM
06-29-2016 09:26 PM
Attached vi shows what I am thinking of doing. Becasuse i can not have both vis side by side i am thinking i should place the "queue out" on a connector pane out of the subvi which will then feed into the "queue in" on the main vi. What I dont know is whether this is as good as placing the 2D array directly into a connector node which i guess impacts negatively on memory and performance?