01-07-2018 02:20 PM
This topic has probably been covered but a google search rendered no satisfactory answer. I'm running LV 2014 on Windoze 8.1. I have a strip chart which I want to keep 24 hours of history with the ability to scroll back and view the data. The x axis displays absolute time. The chart is updated every second. Everything seems to work as expected but I can't figure out how to set the range of the x axis. By that, I mean I would like to have visible at all times the last hour's data. The chart, by default, seems to want to display only the last 30 seconds. How can I change this?
I have attached a vi that demonstrates what I have.
Please and thank you.
01-07-2018 05:27 PM
You are recording at 1 sample/sec for 24 hours. This will generate 86,400 points. A screen might have 1000 pixels, and if you show every point, you will be able to view 1000 seconds = 16 minutes 40 seconds of data. Have you given these numbers any thought? Do you really need (during data acquisition) to go back to the beginning?
Note -- as it turns out, you can have a chart with a day's worth of 1Hz samples. How you choose to manage them is another question -- you should give some thought to that.
Bob Schor
01-07-2018 06:02 PM
I can certainly display more than 30 seconds worth of data at a time. I would just like to know how to configure the strip chart to do that.
01-07-2018 06:07 PM
You need to change the min and max of the X scale by entering new numbers on the chart.
01-07-2018 06:17 PM
Simple. Go to its Properties and set the range (difference between minimum and maximum) to however many points you want to plot. If you are plotting once/second, is it important that the X axis is "time of recording", or can it be "elapsed seconds", i.e. starting at 0, and going up by 1 each second? If the latter, try setting the X axis to Decimal, not time. Go to Scale, set minimum to 0, maximum to 100. Now try it.
Bob Schor
01-08-2018 09:18 AM
I want the X axis to display absolute time just as the attached vi demonstrates. I just want it to display more samples at a time.
01-08-2018 10:19 AM
That is why you need to edit the X values at the minimum and maximum ends of the scale to be farther apart in time. It will probably help if you edit the display format to show the date as well since the beginning and ending times will be on different days.
01-08-2018 10:39 AM
Expanding slightly on Ravensfan's (and my) answer(s), if you set (via a Property Node) the XScale Minimum to be Now (from TimeStamp) and Maximum to be Now + 100 (seconds), your X Scale can be in Absolute Time, and the width will be 100 (seconds).
Bob Schor
01-11-2018 05:37 PM
Setting the Range Min and Max to 0 and 3600 seems to have done the trick. I just wasn't sure what this would do to the scale display...
01-12-2018 04:03 AM
I prefer use a XY chart, so y can programmatically set the scales.