138
&m_nCount, instrDescriptor);
if (status < 0L)
{
PviClose_usb(m_defaultRM_usbtmc);
hUSBTMCLIB = NULL;
m_defaultRM_usbtmc = 0;
}
else
{
PviOpen_usb(m_defaultRM_usbtmc, instrDescriptor, 0, 0, &m_instr_usbtmc);
status = PviSetAttribute_usb(m_instr_usbtmc, VI_ATTR_TMO_VALUE, m_Timeout);
}
}
else
{
PviOpen_usb(m_defaultRM_usbtmc, instrDescriptor, 0, 0, &m_instr_usbtmc);
status = PviSetAttribute_usb(m_instr_usbtmc, VI_ATTR_TMO_VALUE, m_Timeout);
}
}
if (!hUSBTMCLIB)
{
printf("DL-1060 device connect failed.\n");
return;
}
// Write command "*IDN?" and read the DL-1060 identification string
len = 64;
pStrout = new char[len];
ZeroMemory(pStrout, len);
strcpy(pStrout, "*idn?");
status = PviWrite_usb(m_instr_usbtmc, (unsigned char *)pStrout, 6, &nWritten);
Sleep(30);
if (status != VI_SUCCESS)
{
MessageBox(NULL, "Write to device error.", "DL-1060 multimeter device test", MB_OK);
PviClose_usb(m_defaultRM_usbtmc);
hUSBTMCLIB = NULL;
m_defaultRM_usbtmc = 0;
return;
}
else
{
printf(" output : *IDN?\n");
}
Sleep(1000);
// Read data from device
len = 64;
if (hUSBTMCLIB)
{
status = PviRead_usb(m_instr_usbtmc, pStrin, len, &nRead);
if (nRead > 0)
{
for (len=0; len < (long) nRead; len++)
{
buffer[len] = pStrin[len];
}
}
buffer[nRead] = '\0';
printf(" input : %s\n\n",buffer);
}
// Set sample count to 1
strcpy(pStrout, "SAMP:COUN 1");
Содержание DL-1060
Страница 1: ...INSTRUCTION MANUAL 6 1 2 DIGITAL MULTIMETER DL 1060 DL 1060G DL 1060VG DL 1060R DL 1060VR B71 0180 31...
Страница 91: ...85 3 4 10 Self test Notice Do not use SELF TEST since it is used only for an after sales service operation...
Страница 146: ...7F Towa Fudosan Shin Yokohama Bild 2 18 13 Shin Yokohama Kohoku ku Yokohama Kanagawa 222 0033 Japan http www texio co jp...