09-24-2014 02:35 PM
What about Jeff's solution? Does that throw away 99 samples? And how do you know when you're throwing away data? I see 100 points when I execute the VI so where's the missing data? I'm having a hard time conceptualizing this
09-24-2014 02:36 PM - edited 09-24-2014 02:41 PM
@altenbach wrote:
@JÞB wrote:
Bill, You missed the Plot visability checkbox
Also, what would happen if you would replace the array of 3 NaNs with a scalar NaN? 😄
(A scalar NaN would make the code much more maintainable. Currently, if he would add another signal, a seemingly unrelated change would need to be done in the lower left corner...)
Yeah, I started straghtening out the cases and noticed the to dbl whoops, never got back to optimizing the select. There was a lot of BD clean-up and Bill had just posted For readability would probably put the NaN in the nested loop and let the optomizer move it for me (with comment that such was intended)
09-24-2014 03:28 PM
@rhupd wrote:
What about Jeff's solution? Does that throw away 99 samples? And how do you know when you're throwing away data? I see 100 points when I execute the VI so where's the missing data? I'm having a hard time conceptualizing this
Jeff is not throwing away data. Notice that he configured the From DDT to output an array?
09-24-2014 03:42 PM
Ok, so the attached file is my final result. I'm currently working on fixing the time and date but other than that, it does exactly what it's supposed to. And I think I finally understand....the dynamic data is being converted to an array and everything in the array is displayed so there's no loss of data. Is that right?
09-24-2014 04:51 PM - edited 09-24-2014 04:52 PM
@rhupd wrote:
Ok, so the attached file is my final result.
You don't need to transpose (explicit and in the chart indicator) and you only need a single FOR loop. See attached.
@rhupd wrote:
I'm currently working on fixing the time and date but other than that, it does exactly what it's supposed to.
Note that the time will be questionable, because you sent entire arrays to the chart, instead of single, equally spaced points. You need to match up the loop time, the number of points, and "dt" in the actual data correctly.
@rhupd wrote:
and everything in the array is displayed so there's no loss of data. Is that right?
Sometime the array data is replaced with NaN, so ther original data IS lost.
09-24-2014 10:09 PM - edited 09-24-2014 10:18 PM
Well, if we are going there..... (Timing) we need to get off the Express.vi teat (Nearly as evil as the DDT Data type but sometimes helpful) and use some real vis and a waveform data type
And I still like the plot visibility checkbox in this code
EDIT Obviously the loop timing shoud match the simulated signal time (Its late- and the default is produce 1 second of data)
09-26-2014 11:51 AM
@altenbach: why don't I need to transpose? What're the advantages of not doing that?
Note that the time will be questionable, because you sent entire arrays to the chart, instead of single, equally spaced points. You need to match up the loop time, the number of points, and "dt" in the actual data correctly.
Can you please explain the above? How would I send single, equally spaced points as opposed to an entire array?
I want to save the original data so is there a way to save it while using NaN?
@Jeff: Can you please explain your VI? How is it different than what I've been working on?
I'm really confused now!!!
09-26-2014 02:57 PM - edited 09-26-2014 03:02 PM
@rhupd wrote:
@altenbach: why don't I need to transpose? What're the advantages of not doing that?
Less code is simpler and easier to maintain.
@rhupd wrote:
Note that the time will be questionable, because you sent entire arrays to the chart, instead of single, equally spaced points. You need to match up the loop time, the number of points, and "dt" in the actual data correctly.
Can you please explain the above? How would I send single, equally spaced points as opposed to an entire array?
You acquire a certain number of points at a certain rate, apendd all point to a chart at once, and then wait for the next iteration. During the wait, not data is being acquired. This will make the actual points on the chart nonlinear with time.
You probably shoud do continuous hardware timed acquisition and do the processing in parallel, reading the buffer at regular intervals.
rhupd wrote:I want to save the original data so is there a way to save it while using NaN?
Yes, branch the acquired data and save it. only process the data for the chart further.
09-30-2014 02:01 PM
@altenbach - thank you for your help. The discussion is getting fairly complicated and I'm having a hard time keeping up. I'm going to meet with my supervisor and go over what I've done so far and will probably be back for more help.
Thank you everyone!!