06-24-2011 08:14 PM
Hello,
I am trying to using USB-6008 DAQ to output digital pulses across several digital lines and in this regard I have a few questions.
There appears to be two different functions in NI-DAQmx that could do this. One is the DAQmxWriteDigitalU8 command and the other is the DAQmxWriteDigitalLines command. Am I correct in assuming that both commands will work with USB-6008?
What are the pros and cons of going with either of these commands. I am specifically concerned about speed issues, since I need to output the digital pulses at 15-20 fps.
I am using the LabWindows/CVI 2010 development environment running on WindowsXP, 32-bit.
Thanks.
Sripad
06-27-2011 06:10 PM
Hi Sripad,
The two functions are essentially the same--it is just dependent upon what kind of data you want to write. As far as timing, they're likely within clock cyles of each other. What is going to slow down your operation is the fact that your USB-6008 uses software timing. This means that everytime you need to write, it is dependent upon the state of your system. If your system is doing a lot of processing at one moment, it will take longer than when it is doing less processing. This means your pulses will not be evenly spaced. This software timing is what is also going to either make or break your ability to get your pulses at 10-15 fps.
More information about each function:
DAQmxWriteDigitalU8 writes multiple 8-bit unsigned integer samples to a task that contains one or more digital output channels. Use this format for devices with up to 8 lines per port.
DAQmxWriteDigitalLines writes multiple samples to each digital line in a task. When you create your write array, each sample per channel must contain the number of bytes returned by the DAQmx_Write_DigitalLines_BytesPerChan property.
06-27-2011 08:13 PM
Hello,
Thank you very the reply.
Could you please explain as to which timer does the USB DAQ specifically depend on (i.e., the system clock or some other timer)?
Thanks!
Sripad
06-28-2011 12:06 PM
Hi Sripad,
Software timing depends on the system clock.
Kindest regards,