Discussion:
Faster static digital signals in USB 6259, using C#?
(too old to reply)
Saragon
2007-09-06 07:10:14 UTC
Permalink
Hello,
 
I'm trying to generate multiple static digital signals using the USB 6259 and C# (VS2005).
The problem is that the speed I get seems very slow.
I used the WriteDig sample from the NI sample set for VS2005, and I timed the WriteSingleSampleMultiLine command like this:
 
double start = System.DateTime.Now.Millisecond;
writer.WriteSingleSampleMultiLine(true,dataArray);
double end = System.DateTime.Now.Millisecond;
double total = end - start;
writeButton.Text = total.ToString();
 
The time I am getting is 15ms or 30ms. Is there any way to speed up the static generation of digital signals?
 
Thanks, Andrei.
Elizabeth L
2007-09-06 21:40:09 UTC
Permalink
Hello Andrei,
I would suggest that you use the DAQmxTaskControl method to commit the task before running it.  This may help improve the execution time.
It is important to keep in mind, however, that you are performing static (software-timed) I/O, which is undeterministic.  The time this code will take to execute will vary from system to system, depending on available bandwidth and resources.  There is no specified maximum amount of time that this function should take to complete.
Let me know if you have any other questions, and whether or not commiting the task first helps improve the execution speed.
Saragon
2007-09-17 09:10:13 UTC
Permalink
Hello,
Thank you for your replies. However, we are not getting the neccesary speed using the static method. Now we are trying the Waveform method...
Andrei.

Continue reading on narkive:
Loading...