From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast mode acquisition for 9214 with VB6

Solved!
Go to solution

Hi

 

I have a VB6 app which acquires data from an NI 9214 temperature measurement device. The device has two acquisition modes, high accuracy (default) and high speed. Using MAX I can see that these modes both function in a test panel. However I cannot see how to change the mode to high speed programmatically in VB6. I'm building and running in VB6 in DevStudio 2008 on an XP virtual machine (host is Windows 7) using DAQmx 14.2. Also running the compiled executable directly on Win 7 with no problem. Just want to change the sampling mode to fast (up to 100 Samples/s for a single channel) whereas the default high accuracy mode is only 1 sample/s. Looking at transients of the order of 0.01 s over a 2 minute period.

 

Can anyone help with this?

 

Kind Regards

 

Chris

 

 

 

0 Kudos
Message 1 of 6
(8,981 Views)

Hi Chrisff,

 

Have you looked at the shipping examples included in the DAQmx driver? Check out this article explaining what all is included and where to find them:

http://www.ni.com/example/6999/en/#VisualBasic6.0VB6

 

Also, the DAQmx .NET Class library specifies a property called AdcTimingMode Property that should have a comparable property in VB6 for you to use. Check out this article for more details on that: http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/92493ef7/

0 Kudos
Message 2 of 6
(8,972 Views)

Thanks. The VB6 examples are limited and none show use of the timing mode. The VB.NET samples are more extensive but I don't see timing mode settings in them either.

 

I'll see if I can use the AdcTimingMode property properly. I'm not a VB6 expert so whilst I've seen this property before, I guess I must have used it incorrectly.

 

btw - the doc for Public Property AdcTimingMode As AIAdcTimingMode specifies the difference between HighResolution and HighSpeed as the following. However I can't find anywhere the specifics of what is sacrificed to get high speed. The 9214 has 24-bit resolution in high accuracy mode but what is the actual resolution in high speed mode? Also what other functions are ommitted, for example input noise filtering, CJC etc. Can anyone point me to a document with the specifics? I assume someone at NI must know!

HighResolution Increases resolution and noise rejection while decreasing conversion rate.
HighSpeed Increases conversion rate while decreasing resolution.

 

Thanks again for your help. 🙂

0 Kudos
Message 3 of 6
(8,961 Views)

Chrisff,

 

I would recommend looking into the operating instructions and specifications document for the NI 9214. It contains a wealth of information about the two different modes that you can set.

 

Here is that document: http://www.ni.com/pdf/manuals/375138b.pdf

 

 

Good luck! 🙂

0 Kudos
Message 4 of 6
(8,927 Views)

Thanks to all for the help so far. However I am still unable to actually set the timing mode programatically with VB6 (yes, I do mean VB6, not VB.NET). I created and exported a temperature task and can see the ADCTimingMode property in the exported task file. The property works in MAX. However I cannot set/get/reset this property in VB6 at all despite there being documentation for support of these functions with C and instructions that seem to imply that C functions have equivalent forms in VB6. Problem is that I don't know if its not supported or if I'm trying to set the property incorrectly.

 

There are no set/get/reset functions for ADCTimingMode or similar phrases in nidaqmx.tbl which is imported into the VB6 project to provide access to the daqmx C functions. Also the ADCTimingMode enumerations don't seem to be recognised). Has anyone set timing or other properties in VB6 who can show me how it was done? Or perhaps there no way to set this property programmatically in VB6? Can anyone confirm that explicitly? btw I am using DAQmx 14.2

 

 

 

0 Kudos
Message 5 of 6
(8,894 Views)
Solution
Accepted by topic author chrisff

I found a solution which I posted as a separate question here. Thanks everyone for your help.

 

http://forums.ni.com/t5/Measurement-Studio-for-VB6/DAQmxSetAIADCTimingMode-function-not-defined/m-p/...

0 Kudos
Message 6 of 6
(8,887 Views)