UNI-T MSO/UPO2000 Series Programming Manual page 143

Digital phosphor oscilloscope
Table of Contents

Advertisement

Programming Manual
}
/** Now we will attempt to read back a response from the device to
*the identification query that was sent. We will use the viScanf
*function to acquire the data.
*After the data has been read the response is displayed. */
status = viScanf(instr, "%t", buffer);
if (status < VI_SUCCESS)
{
}
else
{
}
status = viClose(instr);
}
/*Now we will close the session to the instrument using viClose. This operation frees all
system resources.*/
status = viClose(defaultRM);
printf("Press Enter to exit.");
fflush(stdin);
getchar();
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
usbtmc_test();
return 0;
}
Example
b)
TCP/IP
int tcp_ip_test(char *pIP)
{
char outputBuffer[VI_FIND_BUFLEN];
ViSession defaultRM, instr;
ViStatus status;
/* First we will need to open the default resource manager. */
status = viOpenDefaultRM(&defaultRM);
if (status < VI_SUCCESS)
{
printf("Could not open a session to the VISA Resource Manager!\n");
Instruments.uni-trend.com
status = viClose(instr);
continue;
printf("Error reading a response from the device %d. \n", i + 1);
printf("\nDevice %d: %s\n", i + 1, buffer);
MSO/UPO2000 Series
143 / 156

Advertisement

Table of Contents
loading

Table of Contents