07-30-2015 04:09 PM - edited 07-30-2015 04:11 PM
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?
Solved! Go to Solution.
07-30-2015 04:18 PM - edited 07-30-2015 04:20 PM
@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.
07-30-2015 04:20 PM
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?
07-30-2015 04:53 PM
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?
07-30-2015 05:40 PM - edited 07-30-2015 05:45 PM
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:
07-30-2015 05:51 PM - edited 07-30-2015 05:53 PM
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)
07-30-2015 06:02 PM
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?
07-30-2015 07:24 PM
07-30-2015 07:25 PM
07-30-2015 07:26 PM
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.