08-15-2005 01:19 AM
08-15-2005 01:28 AM
a) You can't run frames out of order, as is stated quite clearly if you right click the sequence structure and select Help.
b) If you only want to run the code in some of the frames, you can surround the code in each frame with a case structure and use your condition to decide whether to run or not to run the frame. You should also consider whether you actually need a sequence. If your VIs are connected by wires, they will execute in order. If they are not, you should ask yourself "Can I connect them?". For example, there is no need to use a local variable to transfer data between frames when you can use a wire to directly connect VIs.
c) The most effective and versatile solution is using a state machine. Try looking if File>>New to see if you have a state machine template and search the site to find some tutorials about state machines.
08-21-2005 09:32 PM
08-22-2005 12:18 AM
Why can't you run the "information" case? Of course currently it does not do anything useful because there is no output defined for the concatenated string.
Please be specific with your problem description. "I am having difficulty" does not tell us much. What happens of you try to run "information"? What do you expect to happen?
As asked before: How are you running this? Why is there no loop in your toplevel VI (MAIN.vi)? Are you using the "run" button or the "continuous run" button?
Please define your toplevel VI in the llb. You should NOT include vi.lib VIs, so next time save as Development Distribution and not as Application Distribution.
08-22-2005 02:31 AM
08-22-2005 03:35 AM
08-22-2005 06:51 AM
When you press the Run button, the code in your VI will be executed once. Whatever value is in the controls will be passed to the case structure, and the appropiate case will be executed. If you want more than one case to be executed, you HAVE to use a loop. That's just a basic programming principle. For example, you could use a while loop with a stop button. You could also build a 1D array of selectors and wire it into a for loop to get the order of execution you talked about.
To get the data into the graph or into the file, you will probably have to change how you work a bit. It looks like the easiest thing would be to get the data into a control whenever it changes and to place an indicator near the graph, or add the data to the file when you save. If you want to add text data to the file, you will need to make some modifications. For example, you can open the Write to Spreadsheet File VI to find instructions for how to modify it so you can save text files with it.
I really suggest that you take the advice I almost certainly gave you already and try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
08-22-2005 12:11 PM