Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting changes using PCI-6527 with NI-DAQmx

Hi!

I am thiniking of changing from Tradintional DAQ to DAQmx with Visual C++ .NET 2003. I downloaded NI-DAQ 7.1, where PCI-6527 is supported by DAQmx.
The problem I encountered is lack of documentation for using DAQmx functions and properties.
I have several questions:
1. Where can I get detailed documentation for DAQmx (I already have both help files)?
2. How to detect a change on input? In Traditional DAQ there was a function called DIG_Change_Message_Config (...), where you could set up all the details about detecting changes.
3. Where to get more examples for VC++ .NEt 2003 and DAQmx?

Thank you for your reply.
0 Kudos
Message 1 of 27
(5,210 Views)
(1) To get started with DAQmx, the best sources of information are

(a) for general NI-DAQmx topics, the "NI-DAQmx Help" file under National Instruments/NI-DAQ in your Start menu.
(b) for API information, the .NET API has more documentation to help you get started than the C++ API, but the APIs are almost identical, so have a look at the "Using the Measurement Studio DAQmx .NET Library" topic in the .NET help (clicking here will take you to the topic if you have the help installed). In addition, the C++ library has an overview page (here) that gives you a quick tour of the ke
y classes.

(2) Create a CNiDAQmxTask object. It has a "Timing" property that returns a class that has a "ConfigureChangeDetection" method that should set up the task to do what you want as well as a "ChangeDetectionOverflowed" property to alert you if changes occur too rapidly for the system to keep up.

(3) There should be an example demonstrating change detection on your system at C:\Program Files\National Instruments\MeasurementStudio70\VCNET\Examples\DAQmx\Digital\Read Values\ReadDigChan_ChangeDetection. Currently, all examples we have ship with DAQmx and should be installed on your system if you selected to install the examples.

I hope this helps. Good luck with your project.

Tony H.
Measurement Studio
Message 2 of 27
(5,205 Views)
Thank you for your reply.

I only have one more question.
If I do not have Measurement Studio installed on my computer, am I able to use NI-DAQmx with Visual C++ .NET 2003?
0 Kudos
Message 3 of 27
(5,206 Views)
To use the C++ DAQmx API, you must have Measurement Studio 7.0 installed on your computer. The .NET API can be used without Measurement Studio (and can be used within C++ in Visual Studio C++ .NET 2003 thanks to the managed extensions for C++).

Tony H.
Measurement Studio
0 Kudos
Message 4 of 27
(5,205 Views)
Let me get things clear. I have to use .NET API, if I do not want to use Measurement Studio?
If so, is .NET API enclosed in NI-DAQ 7.1 software package?
0 Kudos
Message 5 of 27
(5,205 Views)
Yes, the free .NET API is in the NI-DAQ 7.1 distribution. In NI-DAQ 7.1 you will also find a free C API based on our CVI product's DAQmx API that can be used in Visual Studio, but it can be difficult to navigate without the CVI environment.

Tony H.
Measurement Studio
0 Kudos
Message 6 of 27
(5,205 Views)
You can install the .NET api for DAQmx with the NI-DAQ driver CD. When using NI-DAQ 7.1, make sure to enable support for .NET languages from the installer feature tree.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 7 of 27
(5,206 Views)
Thank you I will try that then.
Are you sure that .NET support actually works with C++, since manual clearly states, that .NET languages are Visual Basic and C#?
0 Kudos
Message 8 of 27
(5,205 Views)
You will have to use the managed extentions for C++ in order to use the .NET api. This is a .NET flavour of C++ ( as Tony mentioned previously). The documentation is targetted towards C# and VB.NET, so you will have to reference that for information about the functions.

Good luck with your application

Bilal
Bilal Durrani
NI
0 Kudos
Message 9 of 27
(5,205 Views)
thanks for your help
0 Kudos
Message 10 of 27
(5,205 Views)