horatius Posted December 5, 2008 Report Share Posted December 5, 2008 I continuously output analog voltage values with a DAQ card. To obtain fast and a reliable homogeneous sampling I use the sample clock of the board and a LV waveform signal. In the waveform for each time step of the sample time the output voltage value is saved. As seen in the block diagram I can select whether the waveform content is outputted only once ("finite samples") or repetitiously ("continuous samples"). However I want to repeat it only for a defined number, let's say 100 times. I have two options: To do this I can: A) 100 times replicate the length of the waveform itself ---> insufficient memory or B) output waveform only once and repeat this procedure 100 times --> no smooth signal transmission as the device reinitializes every time No options works well as I need a homogeneous output without interrupting device initialization procedures and I have to avoid too long waveforms. Quote Link to comment
Mark Smith Posted December 5, 2008 Report Share Posted December 5, 2008 Move the DAQMx Write into the loop and then execute the loop as many times as required to recreate the complete waveform as many times as you want. If you start the task outside the loop, the device shouldn't reinitialize on every iteration (see the Start Task topic here http://zone.ni.com/devzone/cda/tut/p/id/2835#toc5). Stop the task outside the loop, and then clear. It may appear that the device is resetting depending on the end condition of your waveforms - are they continous if called back-to-back? If you've already tried this and it didn't work, to quote Emily Latella ( http://en.wikipedia.org/wiki/Emily_Litella ) "Never Mind" I don't actually have any hardware handy to try this so take this FWIW. Mark Quote Link to comment
horatius Posted December 6, 2008 Author Report Share Posted December 6, 2008 I tested loops. I inserted DAQWrite and DAQStart in the while loop. Then I left it outside and constructed a for loop around DAQWriet/Start and While loop. I tested "Continuous sample" and "finite sample" mode. Nothing worked as I need. If I use "Finite Sample" then I get an error that I exceed the number of samples if I start the task again. Quote Link to comment
horatius Posted December 16, 2008 Author Report Share Posted December 16, 2008 I posted in another German LV forum, this seems to be the answer: http://www.labviewforum.de/index.php?s=&am...ost&p=63176 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.