LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display only part of waveform chart

The image “http://members.sparedollar.com/Yanflower1/partial-chart.JPG” cannot be displayed, because it contains errors.
Hi,  I have a need to display only 2/3 of the chart, leaving 1/3 for users to mentally predict the trend of the lab data.  ( I could add a curve fitting though).  How to do that?  Just throw in your thoughts, or if you tried it before, give me a sample code.  Thanks in advance.

The data keeps coming in so the curve keeps shifting to the left. The obersver trying to predict maximum and minimum point.  That is the whole idea.


0 Kudos
Message 1 of 12
(4,374 Views)
I am not sure I completely understand. If you want to "hide" part of the data, replace the elements you wish to hide with NaN. They won't show on the plot. You could have two arrays - one with all the data and the other with part of the data blanked. Then a selector could plot the chosen version.

Lynn
0 Kudos
Message 2 of 12
(4,369 Views)
Thanks for your response.  I am not hiding data.  Let's use stock price chart  as an example, we are watching the price real time.  We would like to predict the peak and the bottom.  We would like to leave 1/3 of the chart window un-charted so we can guess the next move of the market.  Hope that help explain things.
0 Kudos
Message 3 of 12
(4,361 Views)

Hm Hm, Good luck!

Use a graph!

 History data length synchronize with chart X-scale so we can't make blank  using panel editting only.

 If you need 100 xscale & you want a 70s fill.  Set history data length to 100.

 You restrict the array length  to 70,

  if the length is  70,

       delete first record and append a recort to last position using [shift register].  Like a queue.

I can't confirm but I think available!

 

0 Kudos
Message 4 of 12
(4,354 Views)
You can just use a property node for the Waveform Chart and update those properties every time you update the chart data. The two properties that you will want to use are XScale>>Range>>Minimum and XScale>>Range>>Maximum. You will want the maximum to be the desired amount greater than the amount of data you are showing, and then you can use the minimum to control how much actual historical data is displayed behind the leading gap. In this way, you are doing your own customized way of auto-scaling, so you can go ahead and disable autoscaling on the x-axis when using this method (right-click axis and uncheck X Scale>>Autoscale X).
 
Kind Regards,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 5 of 12
(4,333 Views)
The solution works all right with data.  I assume the data curve shifts to left as new data points added to the queue. But what about the time grid?  Time grid needs to be shifted to left too.  Any solution for that?
0 Kudos
Message 6 of 12
(4,331 Views)
I'm not sure what you mean by "shifting the time grid". I assume that you are talking about shifting the x-axis so that, for example, only the 60 most recent data points are shown along with that leading empty space. If that is what you are talking about, then that is exactly what I was addressing in my last post. You simply use the x-axis range maximum and minimum properties to programmatically control exactly what is displayed in the chart. To stick with the example I gave earlier, let's say I just loaded my 176th data point into the chart and I am trying to display the 60 most recent data points with a blank space of 30 x-axis hatch marks. Then for this iteration, I would write 116 to the minimum property and 206 to the maximum property.
 
If I'm missing your question here, please correct me and I'll do my best to give you answer!
 
Kind Regards,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 7 of 12
(4,323 Views)
Shifting X-scale grid to left means time is moving as new data is coming.  I have found a simple VI can show sine data but X-scale grid is not moving along with data curve.  Can you make the grid moving along with data curve so the data is fixed onto the grid as both of them moving left?
0 Kudos
Message 8 of 12
(4,314 Views)

The reason why the x-axis is not changing in your example is that you are graphing a changing set of points with respect to the same time values. I have attached an example which implements what I have been trying to explain. The example plots a sine wave one point at a time and displays only the most recent 60 data points in the chart while leaving a 30-data-point gap of empty space in front of the data. I hope this helps to clear things up.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 9 of 12
(4,281 Views)
Use  2-dimensional array   y: amplitude, x:time data.
It has( or dosen't have) some problem with time_data_format(??).
I can't see above vi. I have 6.1. (^.*)

메시지가 10-17-2005 08:31 PM에 East_Sea에 의해 편집되었음

0 Kudos
Message 10 of 12
(4,277 Views)