LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph manipulation

I am plotting an XY graph (X for time and Y for an amplitude). As i plot this graph the whole set of points are presented.
I wish i could present the graph, reducing the X axis width(10 seconds width) and iterate to plot 10 sec to 10 sec(segments of 10 seconds).
one problem is time values are not spaced uniformaly.
could do give me some hints?
thank you,
0 Kudos
Message 1 of 6
(3,360 Views)
> I am plotting an XY graph (X for time and Y for an amplitude). As i
> plot this graph the whole set of points are presented.
> I wish i could present the graph, reducing the X axis width(10 seconds
> width) and iterate to plot 10 sec to 10 sec(segments of 10 seconds).
> one problem is time values are not spaced uniformaly.
> could do give me some hints?

You have several options. You can use a chart and send it a succession
of waveforms that are timestamped. The waveforms are themselves evenly
sampled, but their initial timestamps don't need to be.

The option, and probably the one I'd go with is to use an XY graph. The
X is a timestamp, and the Y is an amplitude. Make an array of
timestamped amplitudes and update it with 10sec segments.

Greg McK
askle
0 Kudos
Message 2 of 6
(3,360 Views)
Actually what i have is an XY chart with time data in X, and amplitude in Y. X values are associated to event that happen NOT evenly.

How should i update a array of timestamped amplitudes(what i have for now) with 10 secondes segments?

thanks for your help,

gt
0 Kudos
Message 3 of 6
(3,360 Views)
Hello Guillaume,

Thank you for contacting National Instruments.

Are you plotting the data as you acquire it in real time? Or is this data that has already been collected and you just want to plot it in 10 second increments?

If you are acquiring and plotting your data at the same time, you can use a waveform chart with the X-Axis set to absolute time format. In waveform chart properties, select the Format and Precision tab >> select X-Axis from the pull down menu >> select Absolute time from the menu below.
Then select the Scales tab >> select X-Axis from the pull down menu >> deselect the Autoscale box >> set Minimum to 0 and Maximum to 10.
The chart will now automatically scroll as points are plotted, but will stay 10 seconds wide.


If you would like to segment a currently existing array into 10 second increments, you will have to use some array functions (such as Threshold 1D Array) to split the array when the time stamp passes a 10 second mark.

If this does not help, I would be glad to take a look at your code.

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,360 Views)
hello sean,

Actually the data has already been collected and i wish to plot it in ten second increments (for now i am only able to plot the entire set of points).

another solution for me would be to plot my points four by four(first, the first four points, then from fourth to eight, and so on...). for that i used 'index array' function but even if i set array index and array length parameters, the whole set of points is plotted. I dont know where my mistake is!

ideally, i d like to plot all my point four by four (using an control index).

I also send my VI

thank u again,

gt
0 Kudos
Message 5 of 6
(3,360 Views)
Hello Guillaume,

I have created an example VI that plots an array of doubles from a binary file. It plots in four element increments.

To plot a different data type, connect a constant of that type to the "byte stream type" terminal of the Read File VI.

Let me know if you need more help on this.

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,360 Views)