SIGLENT
SSG5000X Programming Guide 135
* also use a string that indicates which instrument to open. This
* is called the instrument descriptor. The format for this string
* can be found in the function panel by right clicking on the
* descriptor parameter. After opening a session to the
* device, we will get a handle to the instrument which we
* will use in later VISA functions. The AccessMode and Timeout
* parameters in this function are reserved for future
* functionality. These two parameters are given the value VI_NULL.*/
for
(i=0; i<
int
(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);
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);
Содержание SSG5000X Series
Страница 1: ...SSG5000X Series Signal Generator Programming Guide PG0805X E01A...
Страница 14: ...SIGLENT 14 SSG5000X Programming Guide...
Страница 131: ...SIGLENT SSG5000X Programming Guide 131...
Страница 152: ...SIGLENT 152 SSG5000X Programming Guide To close the normal telnet window type Quit and press Enter...