07-28-2008 07:59 AM
07-28-2008 08:04 AM
07-28-2008 09:30 AM
Another option is a functional global.
How big is your data?
07-28-2008 09:34 AM
07-28-2008 09:44 AM - edited 07-28-2008 09:45 AM
07-28-2008 10:04 AM
07-28-2008 10:17 AM
"p.s. functional globals, time to search the help menu!"
Hi Paul,
I wrote this Nugget on Action Engines just for this type of question.
I hope that helps,
Ben
07-28-2008 12:21 PM
07-28-2008 12:33 PM - edited 07-28-2008 12:35 PM
For the most part I have to agree BUT...
In the case of the AE's it IS possible to opene an explicit reference to the AE in the application instance in which the AE is running and use VI Server call by refeernce nodes to use the AE. This technique can also be used between application instaces running on seperate machines.
Unless you are developing a plug-in architecture, I'd try to keep the app in one exe and make my life simpler. ![]()
Ben
07-28-2008 02:44 PM
Functional Globals and/or Action Engines are good choices that have already been mentioned.
Queues were also mentioned, but as I understand your request, I don't think they'd be the best choice. It sounds like your "main program" will only occasionally need to consume a value, and I'm guessing that it'll want the most recent value. If so then Notifiers, which are programmed very similarly to Queues, would be a better choice.
An example of the kind of architecture I sometimes make: my data acq code pushes its data into a queue. I have a central data manager that pulls from this queue, perhaps does some processing and organizing of the data, and then pushes the results out into 1 or more queues and 1 notifier. Any file writing code will pull from a queue to be sure that data is stored losslessly. User display code and process monitoring code will often pull from the same notifier because they really only want on-demand recent updates.
One possible advantage of a Notifier to a functional global is the ability to wait for a new updated value. This can be very handy, depending on the app.
-Kevin P.