11-20-2005 02:55 AM
11-20-2005 08:24 PM
Create an ENUM selector, with values of:
Force vs. Velocity Force vs. Distance Rotations vs. Distance
Get rid of the dual scales on the graph.
When new data is available, OR when the user changes the selector, simply:
Choose the appropriate X-Y data (based on the selector value) from your source and feed it to the graph.
When the user changes the selector, simply:
Choose the appropriate X and Y scale label text (based on the selector value) and wire them to properties of the graph : X SCALE - NAME LABEL - TEXT and Y SCALE - NAME LABEL - TEXT.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-21-2005 03:49 AM
11-21-2005 10:18 AM
Something like:
case Selector of
Force vs. Velocity: Xout = Velocity[]; Yout = Force[];
Force vs. Distance: Xout = Distance[]; Yout = Force[];
Rotations vs. Distance: Xout = Distance[]; Yout = Rotations[];
end;
Graph = bundle {Xout | Yout}
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-21-2005 11:09 AM
Hi everyone!
Using an enum with a Case Structure is a great option that will allow you to accomplish what you're trying to do. Just to round out the discussion here, though, let's talk about some Express technology that could make this task even easier. Express technology was first introduced in LabVIEW 7, and it has been greatly extended in versions 7.1 and 8.
Express technology is a set of VI's that use configuration-based dialogs to actually implement the code for the selections you make in the dialog. LabVIEW actually does the coding for you!
Consider the following example, which uses the Prompt User for Input Express VI to pop up a dialog asking the user to place checkmarks in the checkboxes for the signals to be graphed. Then 3 signals are simulated and only the selected signals are graphed by using the Select Signals Express VI. The code itself is very easy, since LabVIEW implements the decision making code for you.
LabVIEW 7 and above also contain other features which will make your programming experience easier, such as an increased number of examples and documentation, simplified wiring techniques, and more.
I'll attach a screenshot of the code for those of you who don't have LabVIEW 7.1 or above.
11-21-2005 05:16 PM
11-21-2005 05:45 PM
11-21-2005 07:02 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-22-2005 06:14 AM
11-22-2005 11:38 AM
I don't understand why not. In any case, try starting over - make a new X-Y graph, and use it.
Blog for (mostly LabVIEW) programmers: Tips And Tricks