Hi Dennis,
thanks for your answer.
The XY Chart comes near to what I want. I still face some problems.
What I actually want to do is to simulate an unbuffered DAQ card. I
want to create VIs that send a point at a time (x,y) beginning at
x_min, raising each time the x value by delta_x, and stopping at
x_max. So I do have constant increments of x, I don't have to create
something sophisticated like a spiral or ellipsis. I have tried to
build a simple VI containing the XY Chart Buffer.vi.
x_min, x_max, and delta_x are controls in my VI. Basically the VI
consists of a while loop with a shift register. First, x_min is
connected to the shift register and routed to the function-VI inside
the loop (as the first x value). The output of the function-VI is the
first y value. x and y are bundled and routed to the XY Chart
Buffer.vi. This vi is connected with the XY Graph as usual. The x
value is added by delta_x and the sum is routed to the shift register.
It will be the x value in the next iteration if it is still <= x_max.
Otherwise the loop terminates. There is also a metronom inside the
loop to simulate delays. The function-VI is the Step Function.vi
Unfortunately the XY Graph doesn't scale correctly. If I use +/-10 for
x_min and x_max, then the chart displays the points between +/-1, if I
use +/-1 then the chart displays them between +/-0.1. There is always
a shrinking of 10 (also delta_x, but y is ok) and I don't know why. I
don't want the points to be connected, how can I do that.
I feel that the Waveform Graph is probably better then XY Graph in my
case since it seems to have more options. I have tried to build the
Graph array out of the former Graph array and the new y value. It
works, but I got problems with array/cluster/type combatibility when I
try to include x0 and dx (connect a cluster with x0, dx, and the
accumulated y values with the Graph). Sometimes Labview seems to get
confused with the array dimensions. It interprets the Graph array to
be multidimensional. Then it seems impossible to create a new Graph
array with the same (one) dimension, but with size=old size+1.
Johannes
On Tue, 28 Jan 2003 10:10:56 -0600 (CST), Dennis Knutson
wrote:
>Have you looked at the shipping example called XY Chart? To quote from
>the VI's documentation:
>
>"This VI illustrates how to make an XY Graph behave like an XY Chart,
>in which the plots appear to update incrementally. This
>implementation uses a reentrant subVI (XY Chart Buffer.vi) that stores
>the plot data, appends the new data, and removes old data in excess of
>the chart history size."