42
GX6384
User’s Guide
Gx6384InitializeVisa
Purpose
Initializes the driver for the specified PXI slot using the default VISA provider.
Syntax
Gx6384InitializeVisa
(
szVisaResource, pnHandle, pnStatus
)
Parameters
Name
Type
Comments
szVisaResource
LPCTSTR
String identifying the location of the specified board in order to establish a session.
pnHandle
PSHORT
Returned Handle (session identifier) that can be used to call any other operations
of that resource
pnStatus
PSHORT
Returned status: 0 on success, 1 on failure.
Comments
The
Gx6384InitializeVisa
opens a VISA session to the specified resource. The function uses the default VISA
provider configured in your system to access the board. You must ensure that the default VISA provider support
PXI/PCI devices and that the board is visible in the VISA resource manager before calling this function.
The first argument
szVisaResource
is a string that is displayed by the VISA resource manager such as NI
Measurement and Automation (NI_MAX). It is also displayed by Marvin Test Solutions PXI/PCI Explorer as shown
in the prior figure. The VISA resource string can be specified in several ways as follows:
Using chassis, slot, for example: “PXI0::CHASSIS1::SLOT5”
Using the PCI Bus/Device combination, for example: “PXI9::13::INSTR” (bus 9, device 9).
Using alias, for example: “COUNTER1”. Use the PXI/PCI Explorer to set the device alias.
The function returns a board handle (session identifier) that can be used to call any other operations of that resource.
The session is opened with VI_TMO_IMMEDIATE and VI_NO_LOCK VISA attributes. On terminating the
application the driver automatically invokes
viClose
() terminating the session.
Example
The following example initializes a GX6384 boards at PXI bus 5 and device 11.
SHORT nHandle, nStatus;
Gx6384InitializeVisa (
“PXI5::11::INSTR”
, &nHandle, &nStatus);
if (nHandle==0)
{
printf("Unable to Initialize the board")
return;
}
See Also
Gx6384Initialize, Gx6384Reset
,
GxSWGetErrorString
Summary of Contents for GX6384-1
Page 2: ......
Page 7: ...GX6384 User s Guide v Index 55 ...
Page 8: ...vi GX6384 User s Guide ...
Page 36: ...28 GX6384 User s Guide ...