DioSetupInitializationVisa

Applies To

GC5050, GX5050, GX5055, GX5150, GX5280, GX5290, GX5290e, GX5295

Purpose

Initialize the driver for the specified PXI slot using the default VISA provider.

Syntax

DioSetupInitializationVisa (nMasterHandle, nBrdNum, szVisaResource, pnDensity, pnBanks, nHandle, pnStatus)

Parameters

Name
Type
Comments
nMasterHandle
SHORT
Specifies the Master board’s handle of the Slave board being initialized. If the board is a Master board, then nMasterHandle should be zero.
nBrdNum
SHORT
Specifies the Master or Slave board number. Valid numbers are 1-16 for Master boards and 1-7 for Slave boards (representing I/O pins 32-256 for a domain).
szVisaResource
LPCTSTR
String identifying the location of the specified board in order to establish a session.
pnDensity
PSHORT
Memory module size densities
pnBanks
PSHORT
Number of memory modules installed
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, negative number on failure.

Comments

The function 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:

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.

GC5050/GX5050/GX5150:

0 256K by 32-bit

1  1M by 32-bit

2  2M by 32-bit

3  4M by 32-bit

GX5055:

1  512 by 32-bit

GX5280/GX5290/GX5290e/GX5295:

0  32M by 32-bit

1  64M by 32-bit

2  128M by 32-bit

Example

The following example initializes a master board at PXI bus 5 and device 11.

 

SHORT nHandle, nStatus;

DioSetupInitializationVisa (0, 1, “PXI5::11::INSTR”, &nHandle, &nStatus);

if (nHandle==0)

{

printf("Unable to Initialize the board")

return;

}

 

See Also

DioSetupInitialization, DioInitialize, DioGetSlaveHandle, DioGetMemoryBankSize, DioGetErrorString