Specifications

Chapter 16 179
ESA/PSA Programming Examples
Using C to Serial Poll the Analyzer to Determine when an Auto-alignment is
Complete
ESA/PSA Programming Examples
Using C to Serial Poll the Analyzer to
Determine when an Auto-alignment is
Complete
This C programming example (SerAlign.c) can be found on the
Documentation CD.
Example:
/*********************************************************************
* SerAlign.c
* Serial Poll Alignment Routine
* Agilent Technologies 2001
*
* Instrument Requirements:
* PSA Series Spectrum Analyzer or
* ESA Series Spectrum Analyers or
* VSA Series Transmitter Tester
*
* This program demonstrates how to
* 1) Perform an instrument alignment.
* 2) Poll the instrument to determine when the operation is complete.
* 3) Query to determine if the alignment was successfuly completed.
*
**********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "visa.h"
void main ()
{
/*program variables*/
ViSession defaultRM, viPSA;
ViStatus viStatus = 0;
ViUInt16 esr,stat;