01-14-2013 09:20 AM
Hello,
Here is my problem: I want to generate digital samples (10 bits) each time I receive a digital external trigger.
That should be easy since I could even do it with the express DAQmxVI.
But the external trigger can go up to 120Hz and from 16Hz, the generation is not fast enough. It looks like the configuration of the digital output write takes to much time on each loop.
I am sure I am missing something... can anyone help me on that and/or point me to some documentation I could use ?
That would be very much appreciated.
Thanks,
R
PS: I am using a NI6351 USB card to get the external trigger on PFI0 and to genrate the digital data I want to send.
Solved! Go to Solution.
01-14-2013 10:44 AM
Here is the Vi
01-14-2013 10:59 AM
Why are you configuring and destroying your task each loop? Set it up once before the loop. Clear the task once after the loop. Inside the loop you just need to run the task.
01-14-2013 11:17 AM
Thank you for your answer but when I define the task before the for loop, keep write and start in the loop then erase after the loop, I got this:
"Attempted to write a sample beyond the final sample generated. The generation has stopped, therefore the sample specified by the combination of position and offset will never be available.
Specify a position and offset which selects a sample up to, but not beyond, the final sample generated. The final sample generated can be determined by querying the total samples generated after a generation has stopped."
Like in the second iteration there is a probleme with the start...
01-14-2013 03:14 PM
I have found the answer and share the link here:
https://decibel.ni.com/content/docs/DOC-25189
Thanks to Nathan-P !
Basicaly my NI USB6351 is not retriggerable, otherwise you just have to add a Daqmx trigger property node with retriggerable to true. But with this trick it works great !
R