INTERFACE_ID
interfaceID;
if (imgInterfaceOpen("img0", &interfaceID) == IMG_ERR_GOOD)
{
... user code ...
imgClose(interfaceID, FALSE);
}
Session Functions
INTERFACE_ID
interfaceID;
SESSION_ID
sessionID;
if (imgInterfaceOpen("img0", &interfaceID) == IMG_ERR_GOOD)
{
if (imgSessionOpen(interfaceID, &sessionID) == IMG_ERR_GOOD)
{
... user code ...
imgClose(sessionID, FALSE);
}
imgClose(interfaceID, FALSE);
}
© National Instruments Corporation
Before you can acquire image data successfully, you must open an interface
by using the
imgInterfaceOpen
an interface name and returns a handle to this interface. NI-IMAQ then uses
this handle to reference this interface when using other NI-IMAQ
functions.
To establish a connection to the first board in your system, use the
following program example:
This example opens an interface to
with the interface, it closes the interface using the
For a complete list of the available interface functions, refer to the
NI-IMAQ Function Reference Manual.
Use session functions to configure the type of acquisition you want
to perform on a particular interface. After you have established a
connection to an interface, you need to create a session and configure it
to perform the type of acquisition you require.
To create a session, call the
requires a valid interface handle and returns a handle to a session.
NI-IMAQ then uses this session handle to reference this session when using
other NI-IMAQ calls.
To create a session, use the following example program:
Chapter 3
function.
imgInterfaceOpen
. When the program is finished
img0
imgSessionOpen
3-3
Programming with NI-IMAQ
requires
function.
imgClose
function. This function
NI-IMAQ User Manual
Need help?
Do you have a question about the Image Acquisition Software and is the answer not in the manual?
Questions and answers