LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

x scale

I'm having some issues with my x axis in an xy graph. Maybe I just don't understand how to set properties like I thought I did. What I want to do is very simple in my opinion but for some reason, it just doesn't want to work flawlessly. I am using a daq to read some data, but it will only plot a data point every 30 seconds. I would like for the x-axis to be a relative time scale so that it starts at 0 and shows what minute the graph is currently on. However, I would like to avoid clutter because this VI will be running for hours at a time, so I would like to find a way for the graph to only show the last x amount of data points. I feel like this should be easily attainable by simply setting the xscale.minimum property to whatever the current data point and subtracting how ever many data points I would like to show, but I am not getting the results that I would like to have. I have included a screenshot of the actual block of code that I used to try to get this property to work and the VI. The VI is a bit messy, so that's why I also included the screenshot. 

Download All
0 Kudos
Message 1 of 3
(2,585 Views)

I made a new VI with only the xy graph, one channel, and attempted the exact same thing that I did on my other VI and it works just fine. I'll attach it so you guys can see. I'm completely lost as to why it won't work in my main VI? Could it be the different while loops or event structures? I am completely clueless. Any suggestions would be helpful. Thank you! 

0 Kudos
Message 2 of 3
(2,568 Views)

Hello,

 

Here is a link to an example program that will show you how to set up your VI to use relative time from when the VI was started. Take a look and modify where necessary. 

 

https://decibel.ni.com/content/docs/DOC-9065

 

-Jayk

RF R&D
National Instruments
0 Kudos
Message 3 of 3
(2,525 Views)