Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6008 analog output timing problem

Hello!

 

I'm using an USB 6008 I/O device to generate analog output. The following problem occurs:

 

When I'm using only one output channel I get a time resolution of 1ms (meaning every sample I write to the device via "DQAmx Write/1 Channel N Samples" is 1ms long). This works quite well. I can even write data to the second channel in a different task (different loop) and get the same time resolution. I only write short pulses of 5Volts, the device is not accessed for most of the time.

 

As soon as I try to write data to both analog channels at the same time (using the N Channels N Samples-VI) the resolution changes to 2ms (meaning every sample is now 2ms long).

 

Is this behaviour normal? I know that the 6008 has no hardware timer and therefore relies on manual timing but why is there a difference between writing to two channels at the same time and writing to two channels at different times? Is there a workaround?

 

I'm using LabView 8.6 and DAQmx 8.8.

 

Thanks!

0 Kudos
Message 1 of 6
(3,966 Views)

Hey,

 

How do you determine the 1ms or 2ms?

Maybe you mixed up columns and rows when writing the 2D Array to the DAQmx Write function, keep in mind rows are channels.

 

Christian 

0 Kudos
Message 2 of 6
(3,941 Views)

M.C.,

 

Are you using waveform instance or 2D array instance? BTW the datasheet says the max possible update rate is 150 S/s which means minimum possible time between generation of two points will be 6.6ms. So how do you determine resolution?

Message Edited by kikiduu on 02-05-2009 06:44 AM
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 3 of 6
(3,938 Views)

Thank you for the answers. 

 

I'm using an oscilloscope to determine the 1ms and 2ms. I read that the possible data rate is 150S/s but this seems to be wrong - the samples are not exactly 1ms (usually between 0.9-1.1ms) but far from 6.6ms. Using a waveform or 2D-array makes no difference since the "DAQmx Write"-vi ignores the waveform timing anyway due to the missing hardware timer in the 6008 (only "on demand timing" is possible). I didn't mix up rows and columns in my data array.

 

Is there any way to make sure that every sample written has a specific real time length (ideally 1ms), no matter how many channels are written at the same time? Or do I have to buy a new I/O device that provides a timer or higher data rate?

 

M. C.

0 Kudos
Message 4 of 6
(3,911 Views)

M.C.,

 

If your requirement is 1ms update rate, I suggest never rely on a software-timed AO. It may give a better value (for update rate) when your application is less loaded and will start to worsen when you start including more features/loops into your code.Even opening/ execution other applications can affect your generation. 

 

So instead of wasting precious time now,  better switch over tio a device that support hardware-time outputs. 

 

To your original question, I assume that the behaviour that you see may be due to DAQmx trying to update the AO values serially for each channel in the task. This is just a wild guess as I am not sure how these updates are handled by the driver.

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 5 of 6
(3,909 Views)

I absolutely agree with kikiduu.

If you are interested in another hardware I would suggest to call your local NI office and ask for a cheap M-Series device. 

 

 

Christian 

0 Kudos
Message 6 of 6
(3,898 Views)