LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous XY graph with real time and data

Hello all,

 

I wish to do the following: 

I want to generate random numbers in one column on my array and have the second column with the current time and date. I want to then plot only the random numbers that have been generated along with the TIME from the Get Date/Time function. I want to put this into an array and plot them with a XY graph rather than in a spreadsheet. 

 

I have done this top part. 

However, I would like it to run continuously, instead of waiting to gather the data, and THEN plotting the numbers. Essentially, the random number generator i put is supposed to represent an 1d array that will be constantly updating itself from signal inputs continuously. 

 

Side note: For my purpose i want to get the time indepent, rather than use a waveform chart and use the internal clock of that vi. I would liek to use an XY graph and not a waveform chart/graph.

 

Thank you.

0 Kudos
Message 1 of 14
(17,064 Views)

Use the "build xy graph*" express VI and set it to not clear data between calls. Now simply give it one point with each call and it will act similar to a chart.

 

* place the "express xy graph" and you'll get that automatically on the diagram.

0 Kudos
Message 2 of 14
(17,050 Views)

I can't use the time output to connect as the X input for the express XY graph vi. They are not of the same type

0 Kudos
Message 3 of 14
(17,045 Views)

Attach your VI. Of course this can be made compatible!

 

(Of course you could just build your data up in a shift register. probably the preferred solution)

0 Kudos
Message 4 of 14
(17,043 Views)

Thank you for your help !

0 Kudos
Message 5 of 14
(17,036 Views)

Insert a "to DBL" into the timestamp wire.

The graph terminal needs to be inside the loop. Why do you have so many loops???

0 Kudos
Message 6 of 14
(17,032 Views)
Message 7 of 14
(17,028 Views)

Why is the time stamp converting into a number like that? 

Also, I would like the graph to update the data continuous by shifting the data over. Instead of squishing the data points together.

 

I feel liek i shuld resort to a waveform chart...

0 Kudos
Message 8 of 14
(17,022 Views)

Thuba25 wrote:

Also, I would like the graph to update the data continuous by shifting the data over. Instead of squishing the data points together.


Can you describe that in more technical terms? You can change the autoscaling of the x axis in any way you want.

Maybe you want to use a fixed history size. This woiuld need to be done externally. You could also use the "collector express VI".


@Thuba25 wrote:

I feel liek i shuld resort to a waveform chart...


Are the data points spaced equally in time? I assumes they are not, else why would you use an xy graph in the first place?

 

0 Kudos
Message 9 of 14
(17,011 Views)

Ideally, I would liek to display what the waveform chart is displaying in the XY graph. If you run the program continuously, i want to see the past data as well and let it update itself . "shifting the window" of the chart. The X-axis should be real time and the y values should be in array format.

0 Kudos
Message 10 of 14
(17,000 Views)