LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generation of digital data

Hello,

I´ve a rather simple question, most probably just a syntax problem.
The DigitalWrite.vi requires digital waveform data as an input and thus far I´ve done this by creating arrays with for-loops. This works fine, but it takes ages when it has to write many samples (in my case some billion samples). So, the DigitalWrite also accepts data which just gives the timepoints at which a change is occuring. Thus, I could dramatically reduce the size of the digital data.
Entering the matrix by hand, as shown in the attached vi, works but since my sequence is a little more complicated I´d like to do this automatically. In summary, I know the timepoints of the changes and also the binary coding for each time point, but I fail to put this into the matrix properly. Any idea how to reference the given timepoints and the corresponding binary codes into the digital waveform?

Many thanks in advance!!

Rob

0 Kudos
Message 1 of 14
(3,491 Views)

Hi RobMotz

you can first create a boolean array of your data and transform it into the Matrix by using "Boolean Array to Digital.vi".

Hope it helps.

Mike

0 Kudos
Message 2 of 14
(3,482 Views)
Hi Mike,

thanks for the hint. Well, that works fine for the binary column, but my problem is that I need to change the timepoints (the very first column). Now it makes automatically increasing indizes for every entry (starting with zero), but I need to change exactly these as examplary shown in the table within the attached vi. I dun see how this could be done with the 'BooleanArrayToDigital.vi'. Any further pointer?

Thanks and best regards,
Robert
0 Kudos
Message 3 of 14
(3,476 Views)

hi RobMotz

i know this problem, you have to connect a true constant to the compress input.

see attachment. i think they are equal.

Mike



Message Edited by MikeS81 on 02-06-2008 09:33 AM
0 Kudos
Message 4 of 14
(3,473 Views)
Hi Mike,

I can´t open the vi since it´s being saved under a newer version (8.5.) than I have (8.2.1).
Could you save it another way so that I can have a look at it?

Much appreciated!!

Rob

0 Kudos
Message 5 of 14
(3,467 Views)
Hi RobMotz,
yes of course.
Mike


Message Edited by MikeS81 on 02-06-2008 09:40 AM
0 Kudos
Message 6 of 14
(3,465 Views)
Hmmm... isn´t that just a back and forth operation?
Sorry for being very naive now, but I still dun get how to convert my 5 examplary given timepoints with the corresponding binary arrays (in the lower part of the vi) into such a digital waveform.

Rob
0 Kudos
Message 7 of 14
(3,459 Views)

Hi RobMotz

yes it is, but the only think you have to do now is to create your boolean array. See the attachment.

Mike

0 Kudos
Message 8 of 14
(3,453 Views)
Hi Mike,

Beautiful, Thanks for your immediate help!!!

Cheers,
Rob

0 Kudos
Message 9 of 14
(3,447 Views)
Hi Mike (and others),

sorry to bother you once again. I just realized that this code doesn´t do much good in my case.
Since I´ve to write billions of samples, the long lasting for loops are a killer (for 3million samples the machine runs out of memory already). Thus, I tried to avoid the loops and only write the changes into the digital waveform.
Your code does the same, but it runs thru all the samples instead of simply writing the specified time points.
Basically, I have four constant binary codes and the only thing that needs to be updated are the timepoints (the very first column). Isn´t there a way to write these timepoints directly into the digital wavefrom without the horrible loops?
Changing the timepoints by hand works fine, but I can´t 'link' these to a constant or such.

HELP....

I hope the problem I have is clear?? If not, pls let me know.

Thanks,
Rob


0 Kudos
Message 10 of 14
(3,438 Views)