LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stupid question on chart basics

HELP!.! I need to do only the basics with charts:

Chart 1: Add real-time data 1 point/minute on a chart that displays the data for the last 2 hrs. Should be able to scroll back maximum of 24 hrs.

Chart 2: Same as above, except rate = 1 pt/hr displaying data for last 24 hrs.

It should be easy to change the interval. I dont understand the relationship between XScale.Minimum, XScale.Maximum and Xscale.Multiplier.

X-axis should be formatted using Date/Time format. Y-axis is auto format.

The Labview samples can be extremly confusing for a lv novice / xprt line progrmr.
I've tried changing the sample vis to fit my needs with no success. Somehow, the X.Max and X.Multiplier affects each other when changing the second-based
sample to be minute based. Also, i dont want to build the delay into the chart. Data is added under certain conditions, eg timeout of 1 minute.

Pls attach sample if possible

Using LV DSC 6.1
0 Kudos
Message 1 of 4
(3,270 Views)
Ok, first things first... There is no such thing as a stupid question--only issues that are insufficiently documented...

Chart 1: Create a loop that iterates once a minute (60000 msec). Put inside this loop the VI that read your input and wire its output to the strip chart. Set the strip chart X axis to show 120 samples (2 hours @ 1 sample/min). Set the chart's "Chart History Length" to 1440 samples (24 hours @ 1 sample/min).

Chart 2: Same as chart 1, but with a different timer value.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(3,270 Views)
Thanks, it was the "Chart History Length" that I needed.

I used to set the Xscale.Min and .Max values. Somehow this confused me. The attached file is the result.

One more question: The History length determines how many points are "kept", but where do you set the # samples to show? I set dX in Scaling Factors to 1 minute. This isn't the same as setting the # of samples to show.
0 Kudos
Message 3 of 4
(3,270 Views)
The idea to keep in mind is that strip charts are in some ways strange critters. With a stip chart you are essentially viewing a fixed size window into a much larger dataset (the Chart History Length). To set the number of datapoints to display at any one time, you use the start and stop indexes on the X axis. The difference between the two is the number of points that will be displayed.

Hence, if you want to display a window of 120 points (2 hours) make sure that the difference between the minimum xscale value and the maximum xscale value is always 120. The strip chart has a built in scroll-bar that you can turn on, or if you want to set the location of the "window" you can use the properties you mentioned. Just remember to set one and calc
ulate the other.

For example, if you set the minimum xscale value to 135, calculate the maximum xscale value by adding 120 to the minimum value: 135+120=255. Alternately, you can specify the max value and calculate the min value by subtracting 120.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(3,270 Views)