Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ 6009 Anlog I/O synchronization

Hi all,
    Can you help to advice in synchronizing Analog I/O for USB DAQ 6009?

My application is as such:

>> A triangular wave of 10ms will be output from AO0

>> Immediately, AI0:1 will start sampling the input (differential) for 100 samples at 10KHz.

 

The problems is : for 6009, analog out has got no buffer, I therefore have to use timer in OS and

caused the timing for the created waveform to be not as accurate

I tried several options like :

1) single point sampling; too slow

2) RegisterNSample Event; fast enough but no synchronization between AI and AO, caused data lost or over sample

 

Can you probably suggest one?

 

Best regards,

Vincent

0 Kudos
Message 1 of 4
(7,359 Views)

Hi Vincent,

If I understand your application correctly, you are using the USB-6009 to output a triangular waveform with a period of 10 ms, possibly to control some application, and then synchronously beginning to acquire some response on the analog input channels.

As you mentioned in your post and as can been seen in the USB-6009 specification sheet, the device allows only software-timed updates to its digital to analog converter (DAC) of up to 150 samples per second.

If you are interested in hardware timed output and synchronization, you will need to consider looking at some of our M-series DAQ cards like the NI USB-6211. This card has an output FIFO and can update up to 250 kS/s.  Feel free to post back if you have any further questions.

Good Luck, Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 2 of 4
(7,347 Views)
Hi Mallorim,
    Thanks for your reply.  It seems the card functionality is really so limited.
If thats the case, can I do as below:

1) Trigger a scalar analog output, ao0
2) Trigger an analog in read, ai0, BUT measurement data will append to FIFO buffer
3) Trigger an analog in read, ai1, BUT measurement data will append to FIFO buffer
4) Repeat (1) to (3) until desired maximum analog out value reached
5) Retrieve all ai0 and ai1 data from FIFO buffer

Too, can I control the FIFO buffer address and retrieve buffer content via DAQMXCFunc?
In order for me to set the FIFO starting address
(if needed) when I repeat (1) to (5) again.
If can't, can I access the lower level library to get it done?

Looking forward to your reply.

Thanks

Best regards,
Vincent
0 Kudos
Message 3 of 4
(7,342 Views)

Hi Vincent,

I am afraid that the USB-6009 does not have the functionality to perform the steps you are asking about. Since the analog output is only software timed, you do not have a clock to trigger the output.

Also, step 4 indicates that you are interested in retriggering or in pause triggering for your analog inputs. Retriggerable analog input is performed by using two counters in a Counter Task to create a finite pulse train which is then used as a sample clock for the analog input. There is a DAQmx property called Start Retriggerable that only works with Counter Tasks. The USB-6009 only has 1 counter and therefore is unable to generate the necessary pulse train so retriggering the analog input measurements will not work. For further reading on Retriggerable Analog Acquisition, here is a great Developer Zone Article that explains the hardware requirements and how the acquisition is done.

With regards to your question about controlling the buffer on your card, you cannot control where the analog input data is placed. However, when reading data from the buffer, there are a number of DAQmx Read Properties that let you control where you start to read from the buffer and how that data is processed. These function calls can be found in NI-DAQmx C Reference Help>> NI-DAQmx C Properties>> List of Read Properties, or under a similar path in other language’s help documents. For the Measurement Studio Help the path is NI Measurement Studio .NET Class Library>> Reference>> NationalInstruments.DAQmx>> DaqStreamClass>> Properties.

Regards, Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 4 of 4
(7,325 Views)