Programming Guide

Digital Oscilloscopes Series
154
for (i=0; i<numInstrs; i++)
{
if (i> 0)
viFindNext (findList, instrResourceString);
status = viOpen (defaultRM, instrResourceString, VI_NULL,
VI_NULL, &instr);
if (status<VI_SUCCESS)
{
printf ("Cannot open a session to the device %d.\n", i+1);
continue;
}
/* * At this point we now have a session open to the USB TMC
instrument.
* We will now use the viPrintf function to send the device the string
"*IDN?\n",
* asking for the device's identification. */
char * cmmand ="*IDN?\n";
status = viPrintf (instr, cmmand);
if (status<VI_SUCCESS)
{
printf ("Error writing to the device %d.\n", i+1);
status = viClose (instr);