Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Query about programming the USB-6008 through LabWindows/CVI

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

 

0 Kudos
Message 1 of 4
(3,297 Views)

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.

 

0 Kudos
Message 2 of 4
(3,209 Views)

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

 

0 Kudos
Message 3 of 4
(3,205 Views)

Hi Sripad,

 

Software timing depends on the system clock. 

 

Kindest regards,

0 Kudos
Message 4 of 4
(3,195 Views)