Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Input and output starting at the same time with NI-mydaq --> Possible?

Hello,

 

i own a Ni mydaq and a NI USB-6009. For an experiment I want to write a short waveform (sine, length about 1 ms) to an output. This waveform is controlling a motion-controller. The result ( sensor with voltage output) should be read by the same device. Sample rate should be about 20 kHz .

 

I think the best way would be: Write the sine waveform to the device. Then write a trigger signal to start output the sine wave and to start the measurement with 20 khz sample frequency.  I know that the USB-6009 has no output memory. But is this possible with the mydaq? I had a look at every mydaq example vi's, but none of them is matching with my task. The examples first read in buffer ... process an then write. But i want to write and read at the same time. How can i implement this in labview? If i am starting  two tasks, the software says that this resource is used already.

 

Thank you very much for your help

equation

 

0 Kudos
Message 1 of 5
(7,865 Views)

Hi,

 

If you want to start the Input and output at the same time, you need to Configure the task start at the same time.

I know the following example treats DIO, but try to apply it to your IO.

 

C:\Program Files\National Instruments\LabVIEW 2011\examples\DAQmx\Synchronization\Multi-Function.llb\Multi-Function-Synch Dig Read Write With Counter.vi

 

this is a standard DAQmx example

0 Kudos
Message 2 of 5
(7,857 Views)

Hi,

thanks a lot.

I tried to use this examples with my NI USB-6009 but it does not work. The error message says that a sample clock is not supported by this device. Only "On Demand" is available.In the example explorer are no examples for NI USB-6009 that provide synchronized input and output.

I made a graph to illustrate what i want.

 

I really like to know what kind of hardware ( trigger, counter or sth. else) is missing at the USB-6009 so that i can not reach my target.

Can anybody help me?

 

Equation

0 Kudos
Message 3 of 5
(7,827 Views)

Equation,

 

As the error message suggests, analog output on the 6009 does not support hardware-timed operation (no start trigger, no sample clock).  As such, I do not believe you'll be able to use this device to synchronize analog input and analog output.  If this is necessary for your application, you may want to have a look at the USB-6211 which does support hardware timed analog input, hardware timed analog output, and the sharing of clocks and triggers between these two subsystems.

 

Hope that helps,

Dan

 

PS.. I noticed your subject line asked about NI-MyDAQ... This device supports sample clocked operation for both AI and AO, however it does not support external clocking or triggering, so getting synchronization between AI and AO probably isn't going to work very well.

0 Kudos
Message 4 of 5
(7,814 Views)

Hi Mcdan,

 

thank you very much!!! That is the kind of answer i was searching for. I think its really difficult to pick such an information out of the NI datasheets. 

 

best regards,

Equation

 

0 Kudos
Message 5 of 5
(7,803 Views)