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 #67 background imageLoading...
Page #67 background image
S331L PM PN: 10580-00322 Rev. F A-1
Appendix A — Examples
A-1 C/C++
This example is run on the command line. It sends the *IDN? query to the instrument and
prints the response to the console.
// IdnExample.cpp : Microsoft Visual Studio-Generated Example
// Based on Example 2-1 in the NI-VISA User Manual
// Usage : IdnExample “USB0::0x0B58::0xFFF9::xxxxxxxx_xxx_xx::INSTR”
// where xxxxxxxx_xxx_xx is the USB Device ID of the
// instrument.
// Output : The string identity string returned from the
// instrument.
// VISA Header : visa.h (must be included)
// VISA Libarary : visa32.lib (must be linked with)
#include “stdafx.h”
#include “stdio.h”
#include “string.h”
#include “visa.h”
#define BUFFER_SIZE 255
int main(int argc, char* argv[])
{
ViStatus status; /* For checking errors */
ViSession defaultRM, instr; /* Communication channels */
ViUInt32 retCount; /* Return count from string I/O */
ViChar buffer[BUFFER_SIZE]; /* Buffer for string I/O */
char tempDisplay[BUFFER_SIZE]; /* Display buffer for example */
char *pAddress;
/* Make sure we got our address. */
if ( argc < 2 )

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