01-04-2010 08:36 AM
hello,
I'm working on a recipe application. In the attached code, using the up and down arrow one can browse through the recipe list and the corresponding recipe variables are shown in the indicators. I have two buttons , one for load recipe and other one for new/edit recipe. I have a question on the new/edit recipe section. Once I select the recipe using my up and down arrow keys and click new/edit recipe, I'm trying if I can pre-load the input variables with the values it already has before one can change it. Please do let me know your inputs.
thanks.
Solved! Go to Solution.
01-04-2010 10:38 AM
The first thing I did was hit Clean Up Diagram to see what you were doing. Your Block Diagram is VERY large.
For a quick solution to your question, I'd change the Prompt User Express VI into a regular sub-VI with an array input of recipe parameters and pass the appropriate 1D array from the 2D array you read from your file. You can pass this data in a shift register whenever the selection changes, or you could simply index it when you need it for the Edit function.
You could also improve your entire program by putting more of your code inside the Event Structure. Better yet, use one of the standard design patterns that are part of LabVIEW ("Producer-Consumer Design Pattern (Events)" or "Top Level Application Using Events"). You'll be better off with a standard/scalable/extendable architecture if you intend to make this program much larger.
01-04-2010 10:50 AM
01-04-2010 10:59 AM