07-15-2014 08:43 AM
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.
07-15-2014 08:59 AM
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.
07-15-2014 09:03 AM
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
07-15-2014 09:04 AM - edited 07-15-2014 09:06 AM
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)
07-15-2014 09:07 AM
Thank you for your help !
07-15-2014 09:09 AM
Insert a "to DBL" into the timestamp wire.
The graph terminal needs to be inside the loop. Why do you have so many loops???
07-15-2014 09:11 AM
07-15-2014 09:16 AM
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...
07-15-2014 09:36 AM - edited 10-31-2019 10:38 AM
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?
07-15-2014 09:52 AM
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.