LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an offset on XY-graph display

In my data acquisition vi, I want 5 parameters to be displayed on an XY-graph w.r.t. their timestamp. I just wrote a test vi to get the display of 5 random numbers (first saving them in a text file and then reading them back). I tried a lot but I am always getting a blank offset at the beginning on the XY graph display (vi and image attached). How to get the correct display for the selected number of points? Can anybody help me out? I am working on LV 2016.

Download All
0 Kudos
Message 1 of 5
(356 Views)

Right click the X scale, turn off loose fit.

0 Kudos
Message 2 of 5
(322 Views)

This is strange code.  Here are some questions --

  • Why are you plotting data versus date and time that the points were acquired?  I could understand plotting against "Time since start of acquisition" (which should give you a point at 0:00:00.0).  To do this, just change the Time Axis to "Relative Time" (instead of "Absolute Time").
  • I don't understand the strange computations you are doing with the Spreadsheet Data.  I don't know what "Index" means.  However, you do seem to be computing a starting "X" for your plots (why?), so if this computes to 1, it may well mean "Start the plot 1 second after the X axis origin" (which is the offset that you might well have asked LabVIEW to plot -- you should say "Thank You" to LabVIEW ...).

Bob Schor

0 Kudos
Message 3 of 5
(310 Views)

I want to store the data for a long run and that is why I am plotting them wrt data and time. If somebody wants to see what was the value of, say parameter 1, on a particular date and time then he/she can easily do that by selecting appropriate no. of points on X-axis (index).

 

Secondly I am not doing any computations with the spreadsheet file. I am simply storing the parameters into that file and reading them through 'Read from text file' function. "Index" is basically the number of (latest) data points on X-axis to be displayed on the XY graph. e.g. if I select index as 10, the graph will display the last 10 rows of those 5 parameters saved into that file. But still, whenever I am running the program it is showing an offset on the graph display. If I disable 'loose fit' then also this problem persists. Thanks

0 Kudos
Message 4 of 5
(299 Views)

The VI you posted doesn't seem to do much without the text file.

 

It wouldn't be too hard to recreate one, but it would be even easier if you posted one.

0 Kudos
Message 5 of 5
(285 Views)