National Instruments 4551 User Manual page 56

Ni-dsa software for computer-based instruments
Table of Contents

Advertisement

Chapter 5
Octave Analysis (Add-On) Mode Programming
ViReal64 linAvgTime;
ViReal64 ElapsedAvgTime;
ViString UnitLabel;
ViReal32 NominalCenterFreq[120];
ViReal32 ExactCenterFreq[120];
ViReal32 BandPowerMeas[120];
switch (event)
{
case EVENT_TIMER_TICK:
//Check if a new measurement is ready
NIDSA_check_new_measurement (gDSASession, &NewMeasurement);
if (!NewMeasurement)
return 0;
//Read the new measurement
NIDSA_get_octave_number_of_bands (gDSASession, &NumberOfBands);
NIDSA_get_octave_frequencies (gDSASession,
ExactCenterFreq,NominalCenterFreq);
NIDSA_read_octave_measurements (gDSASession, "0", DBON,&FilterSettled,
&ElapsedAvgTime,&linAvgTime, &TotalBandPwr,BandPowerMeas, UnitLabel);
//Displays Octave graph
DeleteGraphPlot (mainpanel, MAINPANEL_GRAPH, -1,VAL_IMMEDIATE_DRAW);
PlotXY (mainpanel, MAINPANEL_GRAPH, NominalCenterFreq,
BandPowerMeas,NumberOfBands, VAL_FLOAT, VAL_FLOAT,
VAL_VERTICAL_BAR,VAL_EMPTY_SQUARE, VAL_SOLID, 1, VAL_RED);
}
NI-DSA Software User Manual
5-8
ni.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

4552

Table of Contents