LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph starts at last data point

My program takes data and plots the coresponding time and value.  For some reason when it starts at zero, it takes the last data value and makes that the data point from time 0 to time next data value is recorded. 
 
Thanks for any help.
 
 
Download All
0 Kudos
Message 1 of 4
(2,710 Views)
Your True case (String from shift register = " END") appends 0 to the X- and Y-arrays. That adds a point that is back at the start.

A generally better way: Initialize the arrays outside the loop. (Use NaN for non-data - it does not show up on plots). Pass them to shift registers. In the False case use replace array subset to insert the new values. In the True case pass tha arrays through unchanged. Use a third shift register to keep track of the index to replace.

Lynn
Message 2 of 4
(2,704 Views)
Lynn beat me to it. Here's an example that uses shift registers and build array for creating the plot.
Message 3 of 4
(2,695 Views)

Thanks Lynn and Dennis,

This helps me out greatly in getting the program working and showing the right way to do.

0 Kudos
Message 4 of 4
(2,688 Views)