09-21-2011 01:48 PM
Baisically, the user has to be able to put on a string control the price for taco_1 (confifure_taco_menu.vi). That price has to be modified on the menu screen (taco_menu.vi). how can I do this? Here is a screenshot representing what I want to do.
And a blockdiagram of my failed attempt. This is for a uni assignment.
Thanks!
09-21-2011 01:56 PM
How are these VIs running? Are they running in parallel? If so you might want to look at using queues, notifiers, action engines or shared variables to pass the data between them. If one is effectively a dialog box used to initialize the other than you can define a cluster of the data (use a typedef) and pass that out when the dialog box closes.
09-21-2011 02:26 PM
I am not sure. I am still learning.
I am using arrays for now, as there are not 18 outputs for the diagrams.
If I need something else, I'll come back here. Thanks
09-21-2011 03:04 PM
@Motanum wrote:
I am not sure. I am still learning.
I am using arrays for now, as there are not 18 outputs for the diagrams.
If I need something else, I'll come back here. Thanks
Ow!
I said something similar about 12 years ago so to spare you learning the hard way...
Search for;
Action Engine these are used to share data between threads.
Type Definition - allows defining a data structure like a cluster (set of related data values)
Design Patterns - structure of programs to get you started
Bundle by name - to put data in cluster
Unbundle by name - to get dat out of a cluster.
Just trying to help!
Ben
10-18-2011 03:54 PM
Hi Motanum,
Here is a tutorial about global variables, you can use them to interact between VIs that are running at the same time in your computer:
http://zone.ni.com/devzone/cda/tut/p/id/7585
Here are some exersices:
http://zone.ni.com/devzone/cda/tut/p/id/7517
Also if the VIs are running in different moments you can save the info into a file and then read it.
If your VIs are running in different computer you will need to create a Shared Variable:
http://zone.ni.com/devzone/cda/tut/p/id/4679
Take a quick look of it!!
Regards,
10-20-2011 02:04 AM