EasyManuals Logo

Agilent Technologies 8166B Programming Guide

Agilent Technologies 8166B
274 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 #192 background imageLoading...
Page #192 background image
VISA Programming Examples How to Set up a Fixed Laser Source
192 Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
How to Set up a Fixed Laser
Source
This example sets up a fixed laser source.
Install a Laser Source in Slot 2, before executing this example.
#include <stdio.h>
#include <stdlib.h>
#include <visa.h>
/* function prototypes for this examples */
/* function for simple error handling explained in example 1 */
void checkError(ViSession session, ViStatus err_status );
void main (void)
{
ViStatus errStatus; /* returned error code from visa call */
ViSession defaultRM; /* default visa resource manager
variable*/
ViSession vi; /* current session handle */
ViChar c; /* used in the keyboard wait loop */
ViReal32 wavelength; /* wavelength of the laser source */
/* initialize the visa library (see example 1) */
errStatus = viOpenDefaultRM (&defaultRM);
if(errStatus < VI_SUCCESS)
{
printf("Failed to open VISA Resource manager\n");
exit(errStatus);
}
/* Open session to GPIB device at address 20;*/
errStatus = viOpen (defaultRM, "GPIB::20::INSTR",
VI_NULL,VI_NULL,&vi);
if(errStatus < VI_SUCCESS)
{
printf("Failed to open instrument\n");
exit(errStatus);
}
/*set timeout to 20 sec; this should work for all commands except
zeroing */

Table of Contents

Other manuals for Agilent Technologies 8166B

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8166B and is the answer not in the manual?

Agilent Technologies 8166B Specifications

General IconGeneral
BrandAgilent Technologies
Model8166B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals