Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What do DAQmxSetAIUsbXferReqSize(), DAQmxSetAOUsbXferReqSize() and DAQmxSetDOUsbXferReqSize() do on M-series UBS boards?

Solved!
Go to solution

I have a multithreaded C++Builder program that acquires analog data with one thread, and outputs analog and digital data with a second thread.  The inputs and output occurs in chunks of data every 0.1 seconds.

 

On PCI and PCIe M- and X-Series boards this input/output is smooth, but on a USB-6259 board the input is VERY JUMPY waiting about every 0.3 seconds or so. This makes using USB M-Series boards with my program basically unacceptable.

 

In order to try and decrease the jumpiness and smooth the input/output of data, I tried using the DAQmx functions

    DAQmxSetAIUsbXferReqSize(),
    DAQmxSetAOUsbXferReqSize(), and

    DAQmxSetDOUsbXferReqSize()

for my USB-6259 board.  However, putting in various values to SUPPOSIDLY decrease input and output to 0.1 second chunks of data and therefore smooth data input/output, these functions made NO OBSERVABLE DIFFERENCE versus the normal code without them.

 

My question is: are these functions only designed to do something on the new X-Series USB boards, but not the M-Series USB boards?  And is there any detailed documentaion on these functions beyond in the C DAQmx help?

 

Thank you.

 

Bill Anderson

 

0 Kudos
Message 1 of 4
(2,963 Views)
Solution
Accepted by topic author Bill_Anderson

Hi Bill

 

I have started looking into your questions regarding the USB 6259 and the set required size functions. From your post I understand that you have two tasks running at the same time, one is an input task and the other is ouputting data. If you could send me some more details of your application, so I can look into this further, that would be great. If you could detail how the tasks are set up, and whether you are using synchronization, buffering etc. so I can look into that for you.

 

With regards to the questions you asked.

1) These functions are not limited to the X series, so they should function as you would expect and I have not been able to find any other issues with these functions on our system.

2)Unfortunately the DAQmx help is the extent of documentation on these functions, again there is nothing on our system going further into the functions.

 

When you run your program if other programs and applications are open it can cause the processing to slow down, so bare that in mind also. If you run the task, how does it affect the CPU useage?

 

I have found some documentation regarding your application that may help you progress and develop your code.

What Makes a Bus High Performance?

and

NI Signal Streaming: Sustaining High-Speed Data Streams on External PC Buses

in this document the challenges of external buses for Data Acquisition section has some good information on what is feasible with USB devices.

 

If you have any further questions or queries or would like some additional information please post on this board and I will get back to you.

 

Thank you

Stephanie L
Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 4
(2,938 Views)

Hi Stephanie,

 

I fixed my problem.  DAQmxSetAIUsbXferReqSize(), DAQmxSetAOUsbXferReqSize() and DAQmxSetDOUsbXferReqSize() DO work on USB M-Series boards.

 

I was setting DAQmxSetAIUsbXferReqSize(), DAQmxSetAOUsbXferReqSize() and DAQmxSetDOUsbXferReqSize() after DAQmx setup on program startup, but erroneously not setting them after DAQmx setup right before each start of acquisition/output.

 

When I was did set DAQmxSetAIUsbXferReqSize(), DAQmxSetAOUsbXferReqSize() and DAQmxSetDOUsbXferReqSize() after DAQmx setup right before each start of acquisition/output, then my USB-6259 board worked well with
    AIUsbXferReqSize = AOUsbXferReqSize = DOUsbXferReqSize = 4096, 2048 or 1024

 

Anything larger than 4096 (including the default 32768) did not work well or at all.  And numbers such as 4000 etc (not divisible by 1024) did not even work.

 

I am not sure using these functions result in the exact transfer I expected though, but I guess that really doesnt matter as long as its fast enough.  Just for fun, I set AIUsbXferReqSize = 131072, and with 40000/sec per ADchannel acquisition rate, I thought it SHOULD transfer about every 3 seconds, but it transfers about every 0.4 seconds.  If I consider using 40000/sec * 5 ADchannels = 200000/sec as the acquisition rate, then I think it should transfer about every 0.65 seconds which actually is closer to what | get. 

 

Some documentation on how these functions REALLY work would be helpful.

 

Anyways, many thanks for your help.  It was very useful knowing that these functions actually DID work on USB M-Series boards.  And now my program can use USB M-Series boards!

 

Cheers,

Bill

 

 

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

Great Bill

 

I am glad you have got those functions working, I agree there should be more details and information available and this has been raised previously, but you could also submit this request on the product suggestion page, so that it is known how many people would like this service to be updated.

 

Thanks

Stephanie L
Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 4 of 4
(2,889 Views)