LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3 graphs on ONE paper

I have made an LV in labview6.0. It is used to show three types of graph in one place. It is attached. They are (i) Force Vs velocity (ii) Force Vs Distance and (iii) No. of rotations vs distance.  Is it possible to show only ONE type at a time without too much adjustments everytime?
0 Kudos
Message 1 of 10
(3,835 Views)
Hard to say what "too much adjustments " means to you, but of course it is possible to switch your graph from displaying this to displaying that.

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.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 2 of 10
(3,813 Views)
How will the enum selector know which is x-axis or y-axis. How to wire?
0 Kudos
Message 3 of 10
(3,800 Views)
The selector doesn't know anything - YOU have to write code for it.

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}

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 4 of 10
(3,780 Views)

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.

Jarrod S.
National Instruments
Download All
Message 5 of 10
(3,767 Views)
Where do I write the code? Can I use the formula node for that? I am using labview 6.0 with windows98.
0 Kudos
Message 6 of 10
(3,754 Views)
This is a common misconception with LabVIEW. The graphical code IS the code for LabVIEW. In certain cases you can integrate text-based code into your LabVIEW application, but it is not at all necessary here. What CoastalMaineBird was alluding to with the algorithm he gave you wasn't text-based code you should use, but rather the algorithm you should implement in the graphical source code itself.
 
You should also note that the formula node is good for processing mathematical formulas, but is not suited for general-purpose coding, as it can't accept non-numerical data as inputs or output it, and it can't do much decision making.
 
I've attached a zip file with some html pictures of pseudo G-code (graphical) that mimics the algorithm CoastalMaineBird was using. You might also check out this link if you're more familiar with text-based programming. It walks through some simple programming scenarios as approached from C and LabVIEW.
Jarrod S.
National Instruments
Message 7 of 10
(3,746 Views)
I didn't explain it well enough, I guess. That is just the algorithm you use to do what you want. You would implement it in G code (LabVIEW).
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 8 of 10
(3,741 Views)
I have done what is required regarding the code. It works. However I have still some problems with the appearance of the graph. I have three x axis and two y axis.  I cannot remove or adjust  them easily. I need to spend some time deleting the unused axes. Is there a way out. I am using labview 6.0. The graph is attached.
0 Kudos
Message 9 of 10
(3,726 Views)
I cannot remove or adjust them easily.

I don't understand why not. In any case, try starting over - make a new X-Y graph, and use it.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 10 of 10
(3,700 Views)