Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
36 ratings:
 2.38 out of 5     Rate this Document

Programming DAQ in Visual Basic 6.0

Primary Software: Measurement Studio>>Visual Basic Support
Primary Software Version: 7.0
Primary Software Fixed Version: N/A
Secondary Software: Measurement Studio>>Visual Basic Support
Hardware: Multifunction DAQ (MIO)

Problem:
What options do I have when programming Traditional NI-DAQ and DAQmx in Visual Basic 6.0?

Solution:
Refer to the following table when using Visual C++ 6.0 and the NI-DAQ driver (Traditional or DAQmx ) to determine if you can create a DAQ application, whether you have Measurement Studio installed or not. You can follow the links on the table itself or use the links at the bottom of the page for more information about options with other languages and environments.
  • Measurement Studio For Visual Studio.NET provides native .NET Framework 1.1 and MFC Visual C++ libraries for advanced analysis, scientific user interface controls, and measurement data networking. Measurement Studio also provides code generation and integration tools, all for use with Microsoft Visual Studio 2003. Refer to this column if you are developing a DAQ application using Visual Studio .NET 2003 and you have Measurement Studio 7.0 or later.

  • Measurement Studio Support for Visual Studio 6.0 provides Visual Basic 6.0 ActiveX controls, MFC Visual C++ libraries for advanced analysis, scientific user interface controls, and measurement data networking. Measurement Studio also provides integration tools for use with Visual C++ 6.0 and Visual Basic 6.0. This support is available as a part of Measurement Studio 7.0 (Professional edition or higher). Refer to this column if you are developing a DAQ application using Visual Basic 6.0 or Visual C++ 6.0 and you have Measurement Studio Support for Visual Studio 6.0 installed. This was previously available as Measurement Studio 6.0.

  • Visual Studio only (without Measurement Studio) refers to the development options if you have only Visual Studio and no Measurement Studio packages. This means you use Visual Studio 6.0 for developing DAQ applications using Visual C++ 6.0.

Measurement Studio for Visual Studio .NETMeasurement Studio Support for Visual Studio 6.0Visual Studio only
(without Measurement Studio)
Visual Basic 6.0Traditional NI-DAQN/AOptimalYes
NI-DAQmxN/AYesYes

OPTIMAL: Project wizards, code generation, and configuration tools are provided to accelerate DAQ application development.
YES: Native components are provided for this purpose and shipping examples are included.
N/A: The particular Measurement Studio package does not provide support for the particular language of choice. Refer to the link for more information.
Visual Basic 6.0 with Measurement Studio Support for Visual Studio 6.0
  1. Traditional NI-DAQ

    • Measurement Studio for Visual Studio .NET Professional Edition or higher includes a separate CD that installs support for Visual Studio 6.0.

    • This provides project wizards and ActiveX user interface controls you can use from Visual Basic 6.0.

    • You can find examples in the following default directory location: C:\Program Files\National Instruments\MeasurementStudio\VB\Samples\DAQ. Double-click the .prj file to open the project.

    • Note: The examples above are made available by installing Traditional NI-DAQ. The user interface controls in these examples use the Measurement Studio evaluation ActiveX controls (such as CWGraph, CWNumEdit, CWSlide, etc.) if you do not have a licensed version of Measurement Studio. If you have a licensed version of Measurement Studio installed, then these controls are not in evaluation mode. The examples are present even if you do not have Measurement Studio. However, even though the user interface controls in those examples are licensed, the Traditional NI-DAQ CWDAQ ActiveX control is not a licensed control and does not require Measurement Studio.

  2. NI-DAQmx
    • NI-DAQmx 7.5 now ships with a type library allowing use of NI-DAQmx with Visual Basic 6.0.

Visual Basic 6.0 with Measurement Studio for Visual Studio .NET 2003


    1. Traditional NI-DAQ
      • Measurement Studio Support for Visual Studio .NET 2003 will not provide you any additional functionality for developing Traditional NI-DAQ applications using Visual Basic 6.0.

      • Measurement Studio for Visual Studio .NET Professional Edition or higher includes a separate CD that installs support for Visual Studio 6.0. This provides project wizards and ActiveX user interface controls you can use from Visual Basic 6.0. If you have Measurement Studio for Visual Studio .NET Professional Edition or higher, refer to the section Visual Basic 6.0 with Measurement Studio Support for Visual Studio 6.0.

      • You can use the Traditional NI-DAQ ActiveX CWDAQ control with Visual Basic 6.0. This control does not require Measurement Studio and is made available by installing the Traditional NI-DAQ driver. If you have Measurement Studio for Visual Studio .NET Professional Edition or higher, refer to the section Visual Basic 6.0 with Measurement Studio Support for Visual Studio 6.0.
    1. NI-DAQmx
      • NI-DAQmx 7.5 now ships with a type library allowing use of NI-DAQmx with Visual Basic 6.0.

Visual Basic 6.0 without Measurement Studio


    1. Traditional NI-DAQ
      • There are two sets of examples installed for Traditional NI-DAQ and Visual Basic 6.0. You can find the examples in the following default directory location: C:\Program Files\National Instruments\NI-DAQ\Examples\VBasic. These examples make straight driver calls and do not make use of the CWDAQ ActiveX controls. You can also use the CWDAQ controls in this scenario because the CWDAQ controls install with NI-DAQ and not with Measurement Studio.

      • You can find the CWDAQ Traditional DAQ ActiveX control examples in the following default directory location: C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic with Measurement Studio. These example use Measurement Studio ActiveX user interface controls which are licensed and require Measurement Studio support for Visual Studio 6.0. You can run the examples, but you will receive evaluation messages. The CWDAQ control is an unlicensed control and does not require Measurement Studio. You can use the control by itself without receiving unlicensed control messages.
    1. NI-DAQmx
      • NI-DAQmx 7.5 now ships with a type library allowing use of NI-DAQmx with Visual Basic 6.0.


Related Links:
KnowledgeBase 317742FQ: Programming NI-DAQ in Text-Based Languages
KnowledgeBase 3178NEFQ: Programming DAQ in Visual Basic .NET
KnowledgeBase 317BPGW3: Programming DAQ in Visual C++ 6.0
KnowledgeBase 317CP7W3: Programming DAQ in Visual C++ .NET
KnowledgeBase 3186P9W3: Programming DAQ in Visual C# .NET

Attachments:





Report Date: 09/05/2003
Last Updated: 04/24/2007
Document ID: 3146J6FQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit