LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The range of X scale needs to be programmable changed.

The x-scale on the chart we are using needs to be dynamically updated based upon the data the user enters in the delay or increment fields on the screen.  We are using a strip-chart that is continually scrolling.  Can anyone help?

0 Kudos
Message 1 of 10
(3,729 Views)

untitled.PNG

Set the scale properties with a property node


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 10
(3,724 Views)

the waveform Chart has a Range setting that ranges the X scale for 1023 values...I need to programmably change this range to a value suiting me. How can I do that? Even if I set the X max and X min value (using the property nodes of range) based on a set of calculations, it seems like the chart just over-rides it to make the range 1023 (which can be changed manually, but I need to change this programmably).

0 Kudos
Message 3 of 10
(3,718 Views)

Also, the program should run continuosly. Meaning, the program should update to show me the last set of values that i want to see.

0 Kudos
Message 4 of 10
(3,717 Views)

You are already asking this question in your original thread. Why did you create a new thread? People won't know what's already been done to try to help you.

0 Kudos
Message 5 of 10
(3,709 Views)

Ohhhh like this?

 

Smercurio, Different axis- nearly same method though


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 10
(3,699 Views)

Are you trying to chart a continually-evolving time series?  Do you want the chart to act like a strip chart?  For example, I'm sampling 16 analog channels at 100 Hz, so every 10 msec I "deliver" a set of 16 points to a chart, which "scrolls" at 100 points/second to the right.  In this situation, there's a definite relationship between the number of points in the chart (its "Chart History Length", which is a non-dynamic constant property of the chart that you can set when you add the chart to your VI), the rate that points arrive, and the maximum X (in terms of time).  So if I set the History Length to 500, my chart will show 5 seconds of data (at 100 points/sec).  You can use the Chart X Scale Multiplier to change the scale from "points" (e.g. "500") to "time" (e.g. "5 seconds").

 

Indeed, in my "real" example, I'm really sampling at 1KHz, but only displaying every n-th point.  If I display every 100th point, I can "see" 50 seconds of data on a 500-point chart, while if I display every 10th point, the points will certainly scroll faster, and I'll only see 5 seconds of data on the chart.

 

Hope this is helpful.

 

Bob Schor

0 Kudos
Message 7 of 10
(3,679 Views)

yes, I am continuosly displaying data on the time chart. Basically, right now I want the X axis to change its range every time depending on a set of values and I want it to be real time based. If I try the above methods, I find that the X axis values are trying to be two sets of values which causes a very distorted and shaky X axis.

 

To be more specific, I need two things to happen:

 

1) I need the X axis to be real- time based and running continuosly ( that is resets only if the program is closed)

 

2) I need to be able to change the range of this axis based on the values entered by the user.

0 Kudos
Message 8 of 10
(3,652 Views)

Hello Jeff,

 

I tried your method, but again I find that the range of the scale is trying to set itself to 1023 while I am trying to set it to another value and hence the values on the x axis are trying to be two different values which is not very presentable.

0 Kudos
Message 9 of 10
(3,646 Views)

A chart has a history (see the LabVIEW help). This is a buffer of a defined size and when the number of elements written to it reaches this size, old elements are dropped as new ones are written. The default size is 1024 elements.This is settable with a simple right click. The size of the history buffer cannot be changed at runtime. Your min and max would need to have limits based on what you set for the history length and your sample rate which you write to the Offset property. Example - you have a sample rate of 1 second and the default history. The max acquisition time you can show on the chart is 1024 seconds. Halve the sample rate to .5 seconds and you can only show 512 seconds. Double the history length and you are back to showing 1024 seconds.

0 Kudos
Message 10 of 10
(3,643 Views)