How Power Varies With Wavelength - Keysight Technologies 8163A/B Programming Manual

Table of Contents

Advertisement

6
VISA Programming Examples

How Power Varies with Wavelength

244
This example shows how the measured power depends on wavelength.
Install a Power Sensor in Slot 1 and a Tunable Laser Source in Slot 2 and
connect the Tunable Laser Source output to the Power Sensor input,
before executing this example.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <visa.h>
/* function prototypes for this examples*/
/* function for a simple error handling explained in example
1 */
void checkError(ViSession session, ViStatus err_status );
void main (void)
{
ViStatus
errStatus;
visa call */
ViSession
defaultRM;
manager variable*/
ViSession
vi;
ViChar
replyBuf[256]; /*buffer holding answers of the
instrument */
ViChar
c;
loop */
ViReal64
wavelength;
of the tunable laser source */
ViReal64
wavelength_max;
wavelength of the tunable laser source*/
ViInt32
i;
ViInt32
cmdDone;
*/
errStatus = viOpenDefaultRM (&defaultRM);
if(errStatus < VI_SUCCESS)
{
printf("Failed to open VISA Resource manager\n");
exit(errStatus);
}
8163A/B, 8164A/B & 8166A/B Mainframes Programming Guide
/* returned error code from
/* default visa resource
/* current session handle */
/* used in the keyboard wait
/* used to hold the wavelength
/*used to hold the maximum
/* loop counter */
/* return value for OPC command

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a/b8166a/b

Table of Contents