11-12-2013 03:15 AM - edited 11-12-2013 03:16 AM
Hi,
I am Busy updating my old program, written in labview 6.1, so now i am doing it al in labview 2013 and with "for me" new DAQmx. I am experimenting with reading and writing signals at the same time. What my program eventually needs to do is the following:
1. Generate a finite number of samples with a sample frequency of 512Hz (this is a trial, i control the position of a laser beam) i have several trials...
2. Aquire the data with a sample rate of 512Hz.
Now the thing is my trial could last up to 3 minutes of samples, so that would be: 180 x 512 samples = 92K samples... Is there a way to cut that and deliver lets say one second (512 sample) every time? With other words can i put a while loop around the "DAQmx write" and feed it with finite samples... or does my clock only counts untill the namber of samples per channel...?
The snippets show a simple VI of generating and aquiring samples.
Best regards,
Thijs
11-14-2013 06:22 AM - edited 11-14-2013 06:24 AM
Hello Thijs,
The VI you created works like that you first write all of data (in this case 8192 samples) into your buffer and then it will start the generation of the data on your output with an output rate of 512 Hz.
So if I understood you correctly you want to deliver every second 512 samples to your Writing VI and that should be updated then on the Output. If I missunderstood there something
please clarify that.
But this is not possible with the Finite Sample mode, because you have to write all data into the buffer before starting the generation. If you want to do this like that you have to use continious sample mode. But I saw u already got some help for this issues that belongs to that in an other forum thread.
One more tip: if you use finite sample mode just use the Daqmx Wait until done.vi instead of the loop. It basically does the same.
Just let me know if that matches your question or if you need other information.
kind regards,
Markus
11-15-2013 02:04 AM
Hi,
I need to use the regeneration mode and set it to "Do Not Allow Regeneration" and then i can put a DAQmx write vi in a while loop, or a for loop. So that's how i am going to do it...
Regards,
Thijs