LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with waveform chart: time scale does not show time correctly

Solved!
Go to solution

Hello,

 

I have some problems with a chart.

I want to display some data and the time between two single data can vary. It is something between 50ms and 500 ms.

 

The problems I have:


1. The time is not shown correctly in the chart (allways 2:00:10 instead of the current time)
2. the data points in the chart have a distance of 1 s (x-scale). That is not correct.

I have tried several things but I thinkt I am on the wrong track.
Could you please help me?

 

Johannes

 

LabVIEW 7.1 (!)

 

Chart_Test.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Message Edited by johanneshoer on 10-14-2009 04:26 AM
Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 1 of 17
(17,694 Views)

If your data is evenly spaced in time (so a constant dt for the measurement, but it might vary from one measurement to the next), you can use the waveform data type.

If your data in unevenly spaced, you need to use a XY-graph, which gives you all flexibility...

 

Felix 

Message 2 of 17
(17,684 Views)

Thank you Felix,

 

yes, the data is unevenly spaced.

I have just tried the XY-Graph, and it works concerning the space between the data.

 

But I stil have two problems:

1. showing the correct time

2. displaying the last 20 seconds

 

Have a look at my VI. I solved the second problem by using a shift register and deleting old data from the data array. If you execture the vi, you'll see that the graph looks stupid. How can I improve that?

 

 

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 3 of 17
(17,682 Views)

Hi johannes,

 

in which way does the graph look stupid? At the moment you set it to display the last 21 values and does it like that. It also does uneven spacing of datapoints - all is like it should be...

 

If you want to have the last 20s of data then you have to keep track of the timestamp to delete older data!

(I prefer ArraySubset and BuildArray in favor of DeleteFromArray and InsertArray, for me it looks more intuitiveSmiley Wink )

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 17
(17,680 Views)

I have modifierd the vi again.

Now it looks much better.

I have a data array and the last 10 seconds of the data are displayed.

The array size is maximum 150 and that is more than I need to display. If new data is inserted, the oldest gets deleted.

 

I wonder if this style is efficient?

 

The time is stil not displayed correctly in the graph. Why does it always show 2:00:00 ?

 

Johanens

LabVIEW 7.1

 

Chart_Test_3.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 5 of 17
(17,667 Views)

Ok, I use timestamps now. Ok likethis?

But now I don't know how to set the XScale Minimum an Masimum

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 6 of 17
(17,663 Views)

Now I have it. I think.

 

Please have a look at this. Is it ok like this?

 

Chart_Test_5.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 7 of 17
(17,659 Views)
Solution
Accepted by johanneshoer

Sorry. The property node on the left was not neccessary...  Smiley Happy

 

Chart_Test_6.PNG

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 8 of 17
(17,657 Views)

what format must the data array have, if I add one more plot to the graph?

a cluster of timestamp & data & data?

or a cluster of arrays of timestamp & data?

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 9 of 17
(17,652 Views)

sorry wrong thread...

Message Edited by johanneshoer on 10-14-2009 08:30 AM
Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 10 of 17
(17,634 Views)