From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A .vi has to be able to change text and prices of another .vi! How do I go to do it?

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!

Download All
0 Kudos
Message 1 of 6
(2,394 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 6
(2,384 Views)

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

Message 3 of 6
(2,375 Views)

@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

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 6
(2,363 Views)

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,

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 5 of 6
(2,326 Views)
Why are you suggesting global variables? This is a very poor design choice and can lead to all kinds of issues with race conditions. This is not very good advice to give someone new to LabVIEW (I would go so far as to say it not good advice to anyone). This is even more surprising coming from a NI employee. With the exception of a WORM (write once, read many) I would never recommend using global variables. There are many better solutions as suggested above in this thread.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 6
(2,283 Views)