Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I acquire data with VB from my DAQCard without using Measurment Studio?

I have the Measurement and Automation Software on my computer and VisualBasic.NET. Do I need any other software if I am receiving 2 analog signals and outputing 1 analog signal on my NI DAQCard-6024E PCMCIA?
0 Kudos
Message 1 of 3
(4,741 Views)
The short answer is yes, you can acquire data with VB.NET from your DAQCard without using Measurement Studio.

There are a variety of ways to do it. All of them require that you install either the Traditional DAQ driver or the DAQmx driver in addition to Measurement and Automation Explorer. The DAQ drivers are included on a CD or CDs with your hardware. They are also available on the quarterly National Instruments Device Driver CD.

1) You can use the Measurement Studio DAQmx .NET API. This is far and away the easiest API to use to program DAQ cards in VB.NET and C#. This API is included in the DAQ installer and does not require you to purchase Measurement Studio. However, without Measurement Studio you do not get the benefit of the DAQ Assistant integrated into Visual Studio .NET. The DAQ Assistant, when integrated into Visual Studio .NET, allows you to graphically configure your DAQ tasks, generates the code you need to configure your tasks, and generates a .NET user control (with user interface) that demonstrates how you use the tasks that you created. The caveat to this approach is that PCMCIA cards are not directly supported under DAQmx 7.0. There is, however, a beta versin of DAQmx PCMCIA support as described in this KB article.

2) You can use the .NET P/Invoke services to call the Traditional DAQ or DAQmx C API directly. See MSDN for more information about P/Invoke. If you choose the DAQmx API, you will need to install the beta of the PCMCIA support as described in this KB article. National Instruments does not provide any examples, language-specific documentation, or code generation for this method. You'll need to look at the C API documentation to see what to do.

3) You can use the Measurement Studio Traditional DAQ ActiveX controls. These are included in the DAQ installer and do not require you to purchase Measurement Studio.

The absolute quickest and easiest way to get started using an NI-DAQ card in VB.NET is through the DAQ Assistant and Measurement Studio Professional or Enterprise edition.

Your next best approach is to use the native .NET DAQmx API. This API was designed from the ground up to support .NET languages. There are examples written in VB.NET to help you get started.

If for some reason, you don't want to use the native .NET API (or your hardware is not supported under DAQmx), whether you use P/Invoke or the ActiveX controls is a toss-up. It depends mostly on whether you are already familiar with the C API or the ActiveX API.

David Rohacek
National Instruments
Message 2 of 3
(4,741 Views)
Thanks, for the information on using the .NET API. Since I am new at programming VB, I may go ahead and purchase the Measurement Studio.
0 Kudos
Message 3 of 3
(4,741 Views)