SIGLENT
136 SSG5000X Programming Guide
}
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;
}
The run result:
(2) TCP/IP access code.
Write a function
TCP_IP_Test:
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");
}
/* Now we will open a session via TCP/IP device */