SSG5000A Programming Guide 113
(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 */
char
head[256] = "TCPIP0::";
char
tail[] = "::INSTR";
strcat(head,pIP);
strcat(head,tail);
status = viOpen (defaultRM, head, VI_LOAD_CONFIG, VI_NULL, &instr);
if
(status<VI_SUCCESS)
{
printf ("An error occurred opening the session\n");
viClose(defaultRM);
}
status = viPrintf(instr, "*idn?\n");
if (status<VI_SUCCESS)
Содержание SSG5080A Series
Страница 1: ...SSG5080A Series Signal Generator Programming Guide PG0805A E01A ...
Страница 2: ......
Страница 124: ...122 SSG5000A Programming Guide ...
Страница 136: ......