Activex Objects; Creating Imaq Vision Applications - National Instruments IMAQTM User Manual

Vision for visual basic
Table of Contents

Advertisement

Refer to the source code of the CWMachineVision control for an example of how to
Tip
use the CWIMAQVision methods.

ActiveX Objects

ActiveX objects in
Note
have an NIOCR prefix, and objects in
If you intend to develop an application in Visual C++, National Instruments
Tip
recommends that you use IMAQ Vision for LabWindows/CVI. However, if you decide
to use IMAQ Vision for Visual Basic to develop applications for Visual C++, you can
create objects using the respective Create methods on the CWIMAQVision control or
CWMachineVision control. For example, to create a CWIMAQImage object, use the
CWIMAQVision.CreateCWIMAQImage

Creating IMAQ Vision Applications

Diagram items enclosed with dashed lines are optional steps.
Note
© National Instruments Corporation
Use the objects to group related input parameters and output parameters to
certain methods, thus reducing the number of parameters that you actually
need to pass to those methods.
cwimaq.ocx
You must create an ActiveX object before you can use it. You can use the
keyword in Visual Basic to create these objects. For example, use the
New
following syntax to create and store an image in a variable named
Dim image As New CWIMAQImage
Figures 1-1 and 1-2 illustrate the steps for creating an application with
IMAQ Vision. Figure 1-1 describes the general steps for designing a
Vision application. The last step in Figure 1-1 is expanded upon in
Figure 1-2. You can use a combination of the items in the last step to create
a IMAQ Vision application. For more information about items in either
diagram, refer to the corresponding chapter listed beside the item.
Chapter 1
have a CWIMAQ prefix, objects in
have a CWMV prefix.
cwmv.ocx
method.
1-5
IMAQ Vision for Visual Basic User Manual
Introduction to IMAQ Vision
niocr.ocx
:
image

Advertisement

Table of Contents
loading

This manual is also suitable for:

Imaq

Table of Contents