08-22-2007 06:11 PM
08-22-2007 08:39 PM
08-22-2007 11:18 PM
There are a couple of things that are not clear to me. In your example, the second and third column are the same. Do we need to process both?
Attached is a simple program that generates a 1D array that, if processed at 200kHz, will produce roughly the signal you want.
The inputs are:
Maybe you can adapt it for your purpose, or at least get some ideas. Good luck! 🙂
08-23-2007 01:34 AM
hi there
i think the "Expand Digital Data" VI is what you need. see attachment.
08-23-2007 02:23 AM
I was totally unaware of this function. this is a beauty one also 🙂
i will have to revise my codes...the way i was doing such things up to now, was to look on the spot at the next element time, and check the actual time (i.e. the time of the element presently treated). a For loop is the created to fill in empty array, and send to card.
in order to avoid memory leakage, i had to prepare an initial array size of 100000, and replace into this array until filled, at which point it is flushed (to buffer of the card), and count for this array restarted to zero.
It is usefull to do it this way, if the array with time and data is created on the spot (i.e via a queue), and variable in length. i tested it to work easily at 2MHz.
Anyhow, since there is "expand" function, i will revise and see if it works better (faster or more elegant).
08-23-2007 02:27 AM
08-23-2007 11:42 AM
Thanks guys! Altenbach, the code you sent is very similar to what I'm doing already, so it's nice to know that it's a reasonable idea. 🙂 I will pre-allocate the array and use "replace array subset" instead...thanks Matt! Chrisger, I was unable to open the "expand digital data" vi in LV8.0 -- it tells me it was saved in LV8.2. Would it be possible to save it as LV8.0 and post it again? I'd love to take a look at it.
Also, Matt -- thanks a lot for the time comparison...I was pretty sure that it would be quicker to do the conversion in LV than it would to generate a 2e+6 point file and mess around with that but one never knows.
The help is much appreciated!
Oh...to clear up Altenbach's question...the columns of 1's and 0's in the original data file are not necessarily identical, in spite of what I posted in my example. (That was rather misleading of me, wasn't it?) They represent two independent, totally different data streams and probably won't bear a whole lot of resemblance to each other, come to think of it. So they both do need to be processed. Since that can be done in parallel, I don't think it's an enormous deal.
Thanks again, guys!
d
08-23-2007 03:16 PM
Here's the example now really in 8.0. I am not familiar with digital data, but that seems to be the way to go. See attached
@Desmith wrote:
Chrisger, I was unable to open the "expand digital data" vi in LV8.0 -- it tells me it was saved in LV8.2. Would it be possible to save it as LV8.0 and post it again?
One little tweak can adapt my example or multiple columns, see attached.
@Desmith wrote:
Oh...to clear up Altenbach's question...the columns of 1's and 0's in the original data file are not necessarily identical, in spite of what I posted in my example. (That was rather misleading of me, wasn't it?) They represent two independent, totally different data streams and probably won't bear a whole lot of resemblance to each other, come to think of it. So they both do need to be processed. Since that can be done in parallel, I don't think it's an enormous deal.
08-23-2007 05:43 PM
That "expand digital data" vi is really slick. Especially since now I can open it. 🙂 I'll still wind up doing some processing on the array since it expands it into 1usec increments instead of 5usec increments, but I don't imagine that will be particularly challenging. Very cool!
Thanks for all of your help! Much appreciated!!
d