LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph / Chart show system time in X-Axis.

I try to plot the temperature graph/ chart with respect to my system time. The problem is that the if i select the relative time it starts from 00:00 and if i select absolute time it always starts from 05:00 in 24Hrs.

I need X-Axis Chart/Graph show my system time and in Y- Axis it show the Temperature value which is received from serial port.

 

 

0 Kudos
Message 1 of 5
(4,002 Views)

Since you are just sending it numeric data instead of a waveform datatype, the T0 of the chart/graph is 0 and the dT is 1.

 

If you want it to start at the system time, at the beginning of your VI, wire the current time into a property node for the chart or graph of XScale.Offset.

0 Kudos
Message 2 of 5
(3,999 Views)

Hi,

 

To do what you like convert your integer array to double array and convert this array to the dynamic datatype. Let this be the input to your chart. This should solve your problem. See the attached picture.

 

/Svendsen

0 Kudos
Message 3 of 5
(3,994 Views)

 

 

First I am very thankful to you for your kind cooperation. As I am beginner my questions may be the unintelligent.

 

I have tried it and now the system time shows in graph. I have also a time sync problem. After initializing graph with the time being the value of time does not match with system time. Some time it is faster with respect to system clock and some time it is slower with respect to system clock. I observed it is slow when the data of graph is 1 byte long and when the data is 2 or 3 bytes long it goes fast.

The another problem is the chart Y-Axis Interpret HEX value (00 to FF) means 0-255 points only. My data is ASCII string with 4 characters like ‘9562’. Every character will show the weightage as shown in attached file. I want to use the same ASCII string to the input of graph for single point. Instead of HEX value (00 to FF).

And the another help from your side can you send me the book name or softcopy of LAB View tutorial (Easy understandable).

 

Regards,

Azhar

 

0 Kudos
Message 4 of 5
(3,978 Views)

Waveform charts assume that you have constant time spacing between points.  Since you are doing software timing to get data from the serial port, there is no guarantee that the data is truly equally spaced.  If you got 5 data points in 4 seconds.  It will look like 5 seconds have passed (assuming dT of 1 second) rather than only 4 seconds.

 

What you need to do is use an XY graph which allows your X-Axis to have varying X values.  When you get a datapoint, get a current timestamp.  Look at the help and the examples for XY graph to see different ways of bundling the X data (timestamp) and Y data (your serial data) together.

0 Kudos
Message 5 of 5
(3,973 Views)