Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I decrease the time is takes to acquire data from CWAIPoint in Visual Basic 6.0?

I am using National Instruments CW DAQ 6.0 component in Visual Basic 6.0. Using CWAIPoint, I am collecting voltage signals from an NI-4351 and it is taking it several seconds (it varies per reading) to return a result. At 100 scans/s, one would suspect a nearly instantaneous result. Currently I have the Clock source is set to "Let NI-DAQ Choose". I have experimented with many different settings with no apparent change in the time it takes to get a single reading.

Operating System: Windows 2000

I would like to be able to take several readings per second, rather that one reading per several seconds. What changes do I need to make to achieve this?
0 Kudos
Message 1 of 4
(6,185 Views)
Nick,

It sounds like you're getting an unexpected delay when tying to read data from a 4351 using the CWAIPoint function call. You mentioned that you are trying to gather data at 100S/s. Are you calling this function in a loop to acheive the scan rate? If so you may want to consider using the CWAI function instead so that the board is not forced to reconfigure each iteration of the loop. This could be the delay that you are seeing.

Regards,

Shea C
Applications
NI
0 Kudos
Message 2 of 4
(6,185 Views)
Thank you very much for your reply. Currently I am trying to get it to take a reading at 1 reading per 2 seconds. The best I am getting is 1 reading per 3 seconds and that varies. I will take another look at CWAI and to see if I can get improved performance. Any suggestions for settings to speed up CWAI? I tried the samples of CWAI and they were equally slow.

I want to say in addition I did achieve one of my goals and that was stable mV readings. It appears I am getting stable readings to the 1/100th of a mV.
0 Kudos
Message 3 of 4
(6,185 Views)
Nick,

I assume that you are timing the acquisition in software. The CWAIPoint Initializes and closes DAQ resources every time that it is called. If you are looking for a more accurate rate you should depend on the hardware by using CWAI. The only way to improve the performance of CWAIPoint would be to use it less often. This function was not meant to be used to acquire many samples at a time but instead one sample over a time period.

Shea C
Applications
NI
0 Kudos
Message 4 of 4
(6,185 Views)