Specifications
298 Chapter 18
PSA Programming Examples
Using C with the CALCulate:DATA:COMPress? RMS Command
PSA Programming Examples
* CALC:DATA0:COMP? RMS parameters:
* soffset = 25us (This avoids averaging data points when the burst
* is transitioning on.)
* length = 526us (Period over which the power of the burst is averaged)
* roffset = 4.165 ms (Repition interval of burst. For this example
* it is equal to one GSM frame: 4.165 ms.)
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <math.h>
#include "visa.h"
void main ()
{
/*program variable*/
ViSession defaultRM, viPSA;
ViStatus viStatus= 0;
ViUInt16 stb;
FILE *fDataFile;
long lthrowaway,lbursts;
long lNumberPoints= 0;
long lNumberBytes= 0;
long lLength = 0;
long i = 0;
long lOpc = 0L;
double sweeptime = 0;
unsigned long lBytesRetrieved;
ViReal64 adDataArray[500];
ViReal64 adPowerArray[500];
char sBuffer[80]= {0};
char *basicSetup = // measurement setup commands for VSA/PSA
":INST:SEL BASIC;"// Put the instrument in Basic Mode
"*RST;"// Preset the instrument
"*CLS;" //Clear the status byte