Programming Guide
53
{
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);
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 , buffer);
status = viClose (instr);
}
/** Now we will close the session to the instrument using
* viClose. This operation frees all system resources. */
status = viClose (defaultRM);
Summary of Contents for SDG5000 series
Page 38: ...SDG5000 User Manual 27 Figure 2 5 Setting the Offset ...
Page 109: ...SDG5000 User Manual 98 Figure 3 1 Sine Waveform ...
Page 111: ...SDG5000 User Manual 100 Figure 3 2 Square Waveform ...
Page 129: ...SDG5000 User Manual 118 3 12 Figure 3 12 FSK Waveform ...
Page 135: ...SDG5000 User Manual 124 Figure 3 15 DSB AM Waveform ...