SSG5000A Programming Guide 109
3.
Add the following code:
(1) USBTMC access code.
Write a function Usbtmc_test:
int
Usbtmc_test()
{
/* This code demonstrates sending synchronous read & write commands */
/* to an USB Test & Measurement Class (USBTMC) instrument using */
/* NI-VISA */
/* The example writes the "*IDN?\n" string to all the USBTMC */
/* devices connected to the system and attempts to read back */
/* results using the write and read functions. */
/* The general flow of the code is */
/* Open Resource Manager */
/* Open VISA Session to an Instrument */
/* Write the Identification Query Using viPrintf */
/* Try to Read a Response With viScanf */
/* Close the VISA Session */
/***********************************************************/
ViSession defaultRM;
ViSession instr;
ViUInt32 numInstrs;
ViFindList findList;
ViStatus status;
char
instrResourceString[VI_FIND_BUFLEN];
unsigned
char
buffer[100];
int
i;
/** First we must call viOpenDefaultRM to get the manager
Содержание SSG5080A Series
Страница 1: ...SSG5080A Series Signal Generator Programming Guide PG0805A E01A ...
Страница 2: ......
Страница 124: ...122 SSG5000A Programming Guide ...
Страница 136: ......