BNC 1201 - 6 1/2 Digit Digital Multimeter User Manual
Page 173

174
if (PviOpenDefaultRM_usb == NULL ||
PviFindRsrc_usb
== NULL ||
PviClose_usb
== NULL ||
PviOpen_usb
== NULL ||
PviWrite_usb
== NULL ||
PviRead_usb
== NULL ||
PviSetAttribute_usb == NULL
)
{
FreeLibrary (hUSBTMCLIB);
hUSBTMCLIB = NULL;
MessageBox(NULL, "NIVISA for USBTMC library not ready.", "1201
multimeter device test", MB_OK);
return;
}
printf("\n ###### Start C++ Example program. ######\n");
printf(" We check the 1201 multimeter on USB port and\n");
printf(" identify the first connected 1201 device.\n\n");
// Open Device -- Resource Manager
status = PviOpenDefaultRM_usb(&m_defaultRM_usbtmc);
if (status < 0L)
{
PviClose_usb(m_defaultRM_usbtmc);
hUSBTMCLIB = NULL;
m_defaultRM_usbtmc = 0;
MessageBox(NULL, "USBTMC resource not found.", "1201 multimeter
device test", MB_OK);
return;
}
else
{
// Find the USBTMC device USB[0-9]*::0x1698::0x083F::?*INSTR
( Hex )
status
=
PviFindRsrc_usb
(m_defaultRM_usbtmc,
"USB[0-9]*::0x164E::0x0FA3::?*INSTR", &m_findList_usbtmc, &m_nCount,