Programming Examples
How to Set up a Fixed Laser Source
1.2 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;
ViSession
defaultRM;
/
ViSession
vi;
ViChar
c;
ViReal32 wavelength; /* wavelength of the laser source */
/* initialize the visa library (see example 1) */
errStatus = viOpenDefaultRM (&defaultRM);
if(errStatus < VI_SUCCESS)
144
/* returned error code from visa call */
/* default visa resource manager variable*
/* current session handle */
/* used in the keyboard wait loop */