07-09-2013 01:34 PM
Also, while this works with the waveform chart, I want to use the graph utility and not the chart - however, it seems the graph will only update the same number of times as times the Initialize VI is iterated. So, while the data IS being collected, I'm still unable to display it how I need to. Advice would be great.
Thanks,
Wolley
07-09-2013 01:49 PM
And even further - right now, the chart should be displaying:
40 points/inner loop * 128 inner loops/ outer loop * 32 outer loops = 163840 points. I set the chart history length to go to this, but by the time the data collection was fully executed instead it only had 8192 points,
ie 2*inner loops * outer loops. I'm assuming the 2 comes from there being two channels it's collecting from: why would there be only one datapoint per channel per iteration? I have no measurement specified, so there should be 40 datapoints per channel per iteration.
Wolley
07-09-2013 02:14 PM
Sorry I keep doing this without waiting for a response, but I am at a point where this is all I have to work on. I tried indexing the 2D Results array to get the data from one channel, and this brought the number of points in the record up to 155648, more on-par with what I'd expected but still short.
I determined that rather than giving 40 points in each nested iteration, it's giving 38 - increasing the record length to 42 remedied this such that I am getting the 40 points plotted which I wanted, but I don't understand why this is happening. Any insight would be appreciated.
Wolley
Also, I've attached the VI in the current state of my playing around with it, so that you can see exactly what I'm referring to.
07-09-2013 02:25 PM
Also, for some reason after the chart is filled, rather than staying at a range of 0 to 163839 (and when it starts filling out, it does show the first point at 0) it moves 8113 points so the range is instead 8113 to 171952. If I force the range back to starting at 0, there are no values for those first 8113 datapoints.
What is that all about?
Wolley
07-10-2013 08:51 AM
Hi Wolley,
I'm including a link below to an article that briefly describes the major differences between a Waveform Chart and a Waveform Graph.
http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657?OpenDocument
I also noticed that you still have configuration VIs within the loops. All of your configuration should be done before you call the Initiate VI. You can also speed up loop time by pulling out the displaying of the data from the loop. Performing updates on the UI, such as displaying data, is very processor intensive. I'm attaching a modified version of your VI to show you what changes I am referring to. I've also changed the display back to a graph since you mentioned that you wanted this type of indicator. Notice though that all of the data is collected and fed into the graph all at once. A graph doesn't have a buffer to store data in like a chart does.
07-10-2013 01:15 PM
Josh,
Thanks for the link.
Unfortunately I can't open your attachment, as I'm running Labview 11 and it's saved as a 12 file.
Wolley
07-10-2013 02:31 PM
So, differences between charts and graphs aside, buffers and all - there's still something off about my data.
I'm attaching two files. One is close to what I last posted, only with what an averaging algorithm that should at execution of each of the outer loops, plot an average waveform. However, what it's plotting is just something instantaneous. This can be observed by comparing the plots to those made by the second attachment, Test4. The second attachment is far too slow, due to looping of the initiations and configurations, etc. This makes the VI un-usable, however the averaging algorithm works clearly and works well - and I copied this same algorithm into the Test6. However, some part of moving those initializations / abortions / configurations has made it so that it's not in fact the average which is being plotted, and I have no idea why.
Any ideas?
Wolley
07-10-2013 02:33 PM
Well, I supppose to see that the algorithm works in the Test4 you'd need to set up a virtual signal-gen and virtual scope, which may be too much trouble - but I assure you that Test4 produces a well-averaged waveform while Test6 (even averaging over 50,000 waveforms) plots something that looks just like one of the single instantaneous waves.
07-10-2013 02:35 PM
Hi Wolley,
Sorry about that. Try this one.
07-10-2013 03:10 PM
So, unfortunately I think I'm correct about initiation and abortion of data-acquisition - I set up as shown in the attached VI so that I could see the data. I attached a sample of the data, as well. It's set up for 10 iterations of the inner loop, with data-acquisition initiating in the outer loop. As you can see in the attached data, for each initiation, one collection is performed - for the next iterations until the next abortion occurs, that data is just repeated. It must be the case that the initiation leads to a 40-sample collection that sits in a buffer until you specifically clear it with an "abort."
That would mean that for each separate data-set I want, I'd HAVE to have an initiation for each - and therefore pulling the initiate and abort VI's out of the loops does not solve the problem as it will sample only one data-set. That's why it looked like it only graphed once as I'd mentioned before - it graphed at each iteration, but was graphing the exact same data throughout the entire VI. That's also why my averages don't look like averages - "averaging" the exact same signal against itself will always exactly what was put in.
So, I've still got no solution to my problem.
Do you have any other ideas?