Hello John
The DAQmx .NET class library is fully supported with Visual Studio .NET 2003 (.NET 1.1).
We currently do not support using Visual Studio .NET 2005 Beta (really .NET Framework 2.0) with DAQmx because it is a beta and we will not provide release libraries against a beta version of their product. We work very hard to ensure that our release libraries are backward compatible between versions. If the framework we build our libraries on (.NET Framework 2.0 in this case) can change, we cannot ensure this backward compatibility. Additionally, when the framework we build our libraries on is in beta, we cannot ensure any minimal level of quality because the framework itself does not ensure a minimal level of quality.
We have fully embraced the new .NET technology and are actively developing libraries and environment integration features that will be compatible with the release version of .NET Framework 2.0 and Visual Studio .NET 2005. This effort takes time, but you can look forward to beta versions of these libraries from us in the first half of next year. The .NET Framework 2.0 is still many months from release and so is currently in a state of flux. We are working closely with Microsoft and supplying feedback to them. In fact, the problem that you reported in VS .NET 2005 is a bug that we have reported to Microsoft and they are looking to correct it for their official release.
Visual Studio .NET 2005 beta issues aside, there are a variety of options available to you with released Microsoft development environments. The best option would be to use Visual Basic .NET 2003 and the DAQmx .NET class library. This option includes MSDN integrated function reference, C# and VB.NET code snippets, C# and VB.NET example programs, and concept topics that are fully integrated with the Visual Studio system. We have fully tested this library with the .NET Framework 1.1.
If you don't want to use Visual Studio .NET 2003, you can use Visual Basic 6.0. As you noticed, the CWDAQ ActiveX controls provide an interface to the Traditional DAQ driver and so are not usable with DAQmx devices. Instead, you will need to do use the DAQmx C API from within Visual Basic 6.0.
Using the DAQmx C API with VB 6.0 is supported, but requires a bit of work. We are looking to provide better support for using VB 6.0 and DAQmx in the future. But for now, you can use the functions in VB 6.0 by making direct calls to the DAQmx dll, which is nicaiu.dll, found in the system32 folder. Here is an example of how to do simple DIO with DAQmx and VB 6.0. You can use the NIDAQmx header file (NIDAQmx.h found under C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev ) to map the functions to VB. C Examples can be found under C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.
For example, the CreateTask function would map over as the following
Public Declare Function DAQmxCreateTask Lib "nicaiu.dll" (ByVal taskName As String, ByRef taskHandle As Long) As Long
based on the C declaration, which is the following
int32 DAQmxCreateTask (const char taskName[], TaskHandle *taskHandle);
You can reference the C examples to see how to setup the function operations.
We are committed to making you successful with our hardware and Visual Basic. We just cannot commit to doing it for unreleased versions of Visual Basic. If you encounter issues working with either the DAQmx .NET library in Visual Studio 2003 or working with the DAQmx C library in Visual Basic 6.0, please post them here or contact customer support so that we may provide assistance.
Bilal Durrani
NI