LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenate XY Graphs over multiple iterations

Solved!
Go to solution

Is there a way to pass an XY graph (via a shift register) that's generated every iteration to the next iteration, and add its values to a graph that's on the front panel?

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

@ijustlovemath wrote:

Is there a way to pass an XY graph (via a shift register) that's generated every iteration to the next iteration, and add its values to a graph that's on the front panel?


 

Yes.

 

(Make sure the graph terminal is inside the loop)

 

For an example, look here.

0 Kudos
Message 2 of 10
(3,605 Views)

What I mean to say is, all of the "normal" ways of building arrays and clusters come up with invalid dimensions when you attach a shift register to the cluster that represents the XY graph. Do I have to convert the XY Graph cluster in some way before I can add the new information to it?

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

That is incorrect. You just need to hook it up in the correct order and make sure the SR is initialized with the correct datatype..

 

Attach your code instead of keeping us guessing. Have you tried the example in my link above?

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

I did, and unfortunately it didn't work. I've attached a VI that should have the values included with it, for you to look at. It's very much a work in progress, so excuses the willy nilly indicators and lack of comments

 

edit: I seem to be unable to post the VI at the moment. Here's a picture, as my snippet was too large:Capture.PNG

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

What does this code have to do with xy graphs?

 

Don't you want to initialize the shift regisiter? (Else the time array will grow without bounds. Shouldn't it be the same size as the glucose array?) In fact you don't need a shift register. A plain autoindexing output tunel would suffice.

 

Why do you use "insert into array" instead of "built array (concatenate mode)".

 

 

Since your time array points are spaced equally, you don't need an xy graph. a plain graph is suffiient. Just set x0 and dx according to your data.

 

(Use a different browser if you have problems posting)

0 Kudos
Message 6 of 10
(3,531 Views)

This is just a subVI that would output a graph for use in the main VI. I use insert because the concatenate makes a 2d array, whereas glucose needs to be a 1d array. What kind of graph? Waveform? something else?

0 Kudos
Message 7 of 10
(3,516 Views)
If you right-click "build array", you can select concatenate mode.
0 Kudos
Message 8 of 10
(3,478 Views)
Solution
Accepted by topic author ijustlovemath
Yes a waveform graoph. Set x0=0, dx=0.1.
0 Kudos
Message 9 of 10
(3,474 Views)

When you wire two different kinds of arrays together (different dimensions), the concatenate is already selected. However, I managed to use pre-existing logging to make the graphs. There's going to be extra disk reads, but it worked immediately, without any of the weirdness that was going on before.

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