LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spider webs on my plane.

I acquire two signals from the same daq. And I want to plot one signal against the other. 

so I extracted the sample value from every waveform sample. And then bundled it with the other waveform's sample value. Then I used the XY Graph to plot the two values but instead of giving a proper continuous single it gives me a spider web.

 

In the VI attached I used Ex XY Graph and it gave me the same plot using the inputs from channel 1 and channel 2.

 

Anyway I viewed one sample of my data and I got the image attached as my output. How can one time instant have so many values ? shouldn't it just be a single point on cartesian plane? Am I missing a link?Capture1.PNG

0 Kudos
Message 1 of 14
(4,195 Views)

How can one time instant have so many values ?

 

 

Not sure why you think it's only "one time instant" ...

 

You read the file, and use the output, which is an array of waveforms.

 

You split out waveform #0 as the X, and waverform #1 as the Y-axis.

 

But each waveform might have many, many samples in it.

 

So it's plotting what you give it.

 

If you want to plot only one point, then don't feed the graph an array of points.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 14
(4,166 Views)
I also don't understand your comment about proper continuous. Your graph looks exactly what I would expect when the y array is plotted versus the x array. Are you sure this is what you want to do instead of plotting 2 arrays on the same graph with a common x axis.
0 Kudos
Message 3 of 14
(4,160 Views)

As to the Spider Web appearance, I'm assuming that your X and Y channels are independent of each other.  The appearance of the plots is basically showing you the lack of correlation between the two channels.  Here's a simple way to visualize this -- assume you are measuring two things that don't evolve with time, and assume your measurement has "noise".  Let's further simplify this and say that the values of X and Y are uniformly distributed between 0 and 1.  If you let an X, Y sample be a point, then each point will appear somewhere at random inside a unit square.  Now connect these random points with lines and you have a tangled mess.  Is this what you are seeing?

Spider Web.pngSpider Web Pix.png

Bob Schor

0 Kudos
Message 4 of 14
(4,154 Views)
But I'm reading only one sample. That means that one sample has many many values. How can I restrict it to give me only one value?
0 Kudos
Message 5 of 14
(4,132 Views)
Yes Bob_Schor that's exactly what I'm seeing
0 Kudos
Message 6 of 14
(4,129 Views)

I'm not sure what you mean by "reading one sample".  Look at the VI and look at the wire carrying your "one sample" -- is it a thin orange or blue wire (suggesting a single Float or Integer), a thicker wire (a 1D array), or a pair of wires (a 2D array)?  [Or is it patterned, perhaps the dread Dynamic Data wire?].  If it isn't thin, then it (may) contain multiple values -- wire it to Array Size and see how many points you really have.

 

BS

0 Kudos
Message 7 of 14
(4,116 Views)

But I'm reading only one sample.

 

Snip.PNG

 

 

Try putting a probe on the "Y" output of thoseWAVEFORM COMPONENTS (or whatever they're called - I forget) functions.

 

That is an ARRAY.

 

Check with your probe and see how many elements there are.  I'll wager there are more than one.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 14
(4,083 Views)

... and now get rid of that silly "AND TRUE" and "EQUAL TRUE". What was your thought process to wire it up like that?

 

Pure Rube Goldberg! (See also here for more details)

 

0 Kudos
Message 9 of 14
(4,075 Views)

I found out what my problem was.

My values are like this:

        X             Y

  1. 4.98       7.6
  2. 5.0         7.5
  3. 4.89       7.5
  4. 5.1         7.4

I was expecting them to be in this order:

 

        X             Y

  1. 5.1         7.4
  2. 5.0         7.5
  3. 4.9         7.6
  4. 4.8         7.5

Hence the spider web.

 

Now I guess I will have to arrange my X array in ascending or descending order?

0 Kudos
Message 10 of 14
(4,012 Views)