Programming Guide

Digital Oscilloscopes Series
155
continue;
}
/** 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)
printf ("Error reading a response from the device %d.\n", i+1);
else
printf ("\nDevice %d: %*s\n", i+1,retCount, buffer);
status = viClose (instr);
}
/** Now we will close the session to the instrument using
* viClose. This operation frees all system resources. */
status = viClose (defaultRM);
return 0;
}
3.2 TCP/IP access code:
Write a function TCP_IP_Test.
Int TCP_IP_Test(char *pIP)