National Instruments Image Acqusition Software NI-IMAQdx ユーザーズマニュアル
Chapter 5
Using NI-IMAQdx in C and .NET
© National Instruments Corporation
5-2
You can use the additional Image functions installed with NI-IMAQdx.
These functions use the NI Vision memory management feature, which
automatically allocates the memory for your image. To use these Image
functions, first create an image using
These functions use the NI Vision memory management feature, which
automatically allocates the memory for your image. To use these Image
functions, first create an image using
imaqCreate
, and then pass that
image to an acquisition function.
Using NI-IMAQdx for Microsoft Visual Studio .NET
NI-IMAQdx installs the following assemblies that enable .NET languages
to interact with the driver software:
to interact with the driver software:
•
NationalInstruments.CWNIIMAQDX.Interop.dll
•
NationalInstruments.AxCWNIIMAQDXControlsLib.Interop.dll
Uses NI Vision to display images with the included Viewer control
The
CWIMAQdx
assembly is installed in the
<NI-IMAQdx>\dotNET\
Assemblies\Current
directory. The
AxCWIMAQControlsLib
assembly is installed in the
<Vision>\dotNET\Assemblies\Current
directory. Refer to the NI-IMAQdx Function Reference Help for
information about the properties, methods, and events available with these
assemblies.
information about the properties, methods, and events available with these
assemblies.
Creating a New .NET Application
You first must add a reference to the
NI-IMAQdx
assembly in your project
when creating a new application. Complete the following steps to add a
reference to the
reference to the
NI-IMAQdx
assembly in Microsoft Visual Studio .NET
2003 or later:
1.
Create a new application, or open an existing one.
2.
Select Project»Add Reference.
3.
Under the .NET Framework Components tab, select NI-IMAQdx.
If you need to display acquired images, you also must add an NI Vision
Viewer control to your toolbox and to your form. Complete the following
steps to add the NI Vision Viewer control to the Microsoft Visual
Studio .NET toolbox.
Viewer control to your toolbox and to your form. Complete the following
steps to add the NI Vision Viewer control to the Microsoft Visual
Studio .NET toolbox.
1.
With your project open, open a form in Design View.
2.
Open the Toolbox (View»Toolbox).
3.
Select the category in which you want the NI Vision controls to appear
(General, Components, and so on).
(General, Components, and so on).