LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphics in Labview - x scale

Hi,
I have a problem in Labview :S with some graphs. I take measurements at each interval the user has set, they can vary between 5 seconds and 4 hours, I write those interval in an array (it may help to know that ?). Now I want to display those data in a graph but I would like the program to write 15 (in the x axis) or whatever the time was when it took the measurement instead of 0 1 2 3 4 5 ...
What I have tried :
to attribute node to my graph (like X minimum/X maximum/Xincrement or delta X) but it doesn't seem to work
 
Thanks in advance
 
Emilie
0 Kudos
Message 1 of 7
(3,212 Views)
The attached vi shows to ways of adjusting the X scale increment programmatically.

Message Edited by chilly charly on 07-04-2005 07:16 PM

Chilly Charly    (aka CC)
0 Kudos
Message 2 of 7
(3,197 Views)
Hi Chilly Charly,
Unfortunatly i can't seem to be able to open your file i only have a 5.1 version of labview
 
0 Kudos
Message 3 of 7
(3,187 Views)

If the interval varies within the same graph, you need to use an x-y graph.

Create an x-array by integrating the "array of increments" that you have and plot your y-values against it. Typically you would bundle the x-array and y-array and feed the resulting cluster to the xy-graph terminal. See how far you get.

0 Kudos
Message 4 of 7
(3,184 Views)
Here's a simple implementation of what I suggested above.
(You still might need to tinker with "edge effects, e.g. should the first point be at x=zero or at dx(0)?(as I have done))
 
 
If all incrememts are identical for any given run of the program, you can use a plain waveform graph. In this case writing the increment with an attribute node should work just fine. You say it does not work. Can you attach your code so we see what's wrong?

Message Edited by altenbach on 07-04-2005 10:58 AM

Message 5 of 7
(3,177 Views)

Thank you very much, it worked !!! Smiley Happy

Emilie

0 Kudos
Message 6 of 7
(3,168 Views)
Smiley Very Happy
 
Just a quick note to let you know how much I appreciate the quality of the solution you suggested.
I used your vi (Adjust X scale.vi) as an example of how to programatically adjust the x axis of my
waveform graph to correctly display the frequency range of my Agilent E4443A spectrum.
 
I don't know what I would do without the LabView Zone and the expert help available on the NI site.
 
Thanks again
Keith Lampshire
Medtronic MMC
Tempe AZ
0 Kudos
Message 7 of 7
(3,133 Views)