EasyManuals Logo

Anritsu Site Master S331L Scpi Programming Manual

Anritsu Site Master S331L
96 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #68 background imageLoading...
Page #68 background image
A-1 C/C++ Appendix A — Examples
A-2 PN: 10580-00322 Rev. F S331L PM
{
printf(”Usage: IdnExample
\”USB0::0x0B58::0xFFF9::xxxxxxxx_xxx_xx::INSTR”);
printf(”\t where xxxxxxxx_xxx_xx is the USB Device ID of your
instrument.\n”);
return -1;
}
/* Store the address. */
pAddress = argv[1];
/* Begin by initializing the system*/
status = viOpenDefaultRM(&defaultRM);
if (status < VI_SUCCESS)
{
/* Error Initializing VISA...exiting*/
printf(”Can't initialize VISA\n”);
return -1;
}
/* USB0::0x0B58::0xFFF9::xxxxxxxx_xxx_xx::INSTR*/
/* NOTE: For simplicity, we will not show error checking*/
/* TODO: Add error handling. */
status = viOpen(defaultRM, pAddress, VI_NULL, VI_NULL, &instr);
/* Set the timeout for message-based communication*/
/* TODO: Add error handling. */
status = viSetAttribute(instr, VI_ATTR_TMO_VALUE, 120000);
/* Ask the device for identification */
sprintf(buffer, “*IDN?\n”);
status = viWrite(instr, (unsigned char *)&buffer[0], 6, &retCount);
status = viRead(instr, (unsigned char *)buffer, BUFFER_SIZE,
&retCount);
/* TODO: Add code to process data. */

Table of Contents

Other manuals for Anritsu Site Master S331L

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Anritsu Site Master S331L and is the answer not in the manual?

Anritsu Site Master S331L Specifications

General IconGeneral
BrandAnritsu
ModelSite Master S331L
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals