03-11-2018 12:37 PM
I am trying to plot two sets of data on an XY plot with a timestamp. I am having issues getting it to run continuously. I am attaching my VI. Any help is greatly appreciated.
03-11-2018 12:47 PM - edited 03-11-2018 01:04 PM
To run continuously, you need to change the termination condition of the while loop to "stop if true". Your stop button is latch action, so it is normally false and your loop will stop. (click the termination terminal to change).
Of course your data structures are wrong too. You need to built an array of timestamps in another shift register for the x-values. See how far you get. (It is easier if you use complex data instead of clusters). You should also append the data to the end of the array. prepending to the beginning is significantly more expensive.
Of course if the time points are spaced equally, you can use a plain waveform graph instead. Just set t0 and dt once.
Ultimately, you'll run out of memory. If you only want to display the last few thousand points, you could use a chart instead.