GX5296, GX5961, GX5964
Initializes the driver for the specified VISA resource string using the HW device driver.
GtDio6xSetupInitialization (nMaster, nBrdNum, pszVisaResource, pnHandle, pnStatus)
Name |
Type |
Comments |
nMaster |
SHORT |
Specifies the Master number of the Slave board being initialized.If the board is a Master board, then nMaster should be zero and nBrdNum will specify the master number. |
nBrdNum |
SHORT |
Specifies the Master or Slave board number. Valid numbers are 1-16 for Master boards and greater than 0 for Slave. |
pszVisaResource |
LPCTSTR |
VISA resource string. |
pnHandle |
PSHORT |
Returns a handle for later reference with this board, 0 for error. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The Marvin Test Solutions HW device driver is installed with the driver and is the default device driver. The function returns a handle that for use with other DIO6X functions to program the board. The function does not change any of the board settings.
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:
● Using chassis, slot: “PXI0::CHASSIS1::SLOT5”.
● Using the PCI Bus/Device combination: “PXI9::13::INSTR” (bus 9, device 9).
● Using alias: “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.
GtDio6xSetupInitializationVisa must be called for each board (Master and Slave) in order to initialize all boards.
Each board that is initialized with this function is added to the specified domain. Boards that are added must be in contiguous slots.
When this function is called, the domain will be stopped and placed into a standby state. No other board settings are affected by this function.
Use the GtDio6xInitialize instead of calling GtDio6xSetupInitializationVisa repeatedly for each domain members to initialize all DIO domain members using one command.
After initializing the last card in the domain, call GtDio6xCalibrateDomainTimingDeskew to calibrate the backplane timing signals.
The following example initializes a master board at PXI bus 5 and device 11.:
SHORT nHandle, nStatus;
GtDio6xSetupInitializationVisa (0, 1, “PXI5::11::INSTR”, &nHandle, &nStatus);
if (nHandle==0)
{
printf("Unable to Initialize the board")
return;
}
GtDio6xInitialize, GtDio6xSetupInitialization, GtDio6xGetSlaveHandle, GtDio6xGetBoardCount, GtDio6xCalibrateDomainChannelsDeskew, GtDio6xGetErrorString