[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] RF Analysis

From: John Ackermann N8UR
Subject: Re: [Discuss-gnuradio] RF Analysis
Date: Wed, 11 May 2005 13:24:35 -0400
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

I suspect the original poster was looking for something a little more sophisticated, but since Richard mentioned using a c program an visa, I'll mention the linux-gpib project which provides drivers and a more-or-less NI compatible library to talk to GPIB cards from several vendors. I've written several programs in Perl to talk to older (ie, sort-of-hobbyist-affordable) HP gear like spectrum analyzers and frequency counters. They're on my website under http://www.febo.com/geekworks, but are sort of scattered around and hard to find. Contact me offline for more details if you're interested.


Richard Cagley wrote:
If you have a GPIB card, you can use a simple program like this to log data
points in a range of spectrum. This was for an HP spectrum analyzer, but if
you're using visa it shouldn't matter.

// SpectrumSurvey.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include <visa.h>
#include <windows.h>
#include <iostream>
#include <fstream>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
  ofstream OutputFile("spectrum.dat", ios::out);

  if (!OutputFile)
    cerr<<"File could not be opened"<<endl;
    return -1;

  ViSession defaultRM, vi;
  char buf [256] = {0};
  char buf2 [256] = {0};

  // set the parameters for measurement: in kHz
  int StartFreq = 210000;
  int StopFreq = 240000;
int StepFreq = 25; int NumberRuns = 1;

  // write out the frequencies in the header
  int CurrentFreq = StartFreq;
  while (CurrentFreq < StopFreq)
    OutputFile<<CurrentFreq<<", ";
    CurrentFreq += StepFreq;

  // Open session to GPIB device at address 18
  viOpenDefaultRM (&defaultRM);
  viOpen (defaultRM, "GPIB5::18::INSTR", VI_NULL,VI_NULL, &vi);

  viPrintf (vi, "ID?\n");
  viScanf (vi, "%t", &buf);
  printf ("Instrument identification string: %s\n", buf);

  double ChannelPower;
  // main loop to do measurements
  for (int n = 0; n < NumberRuns; ++n)
    CurrentFreq = StartFreq;
    while (CurrentFreq < StopFreq)
      viPrintf( vi,"IP;SNGLS\n");
      viPrintf(vi, "FA %dMHZ\n", CurrentFreq);
      viPrintf(vi, "FB %dMHZ\n", CurrentFreq+StepFreq);
      viPrintf(vi, "CHP\n");
      viPrintf(vi, "*CHPWR?\n");
      OutputFile<<ChannelPower<<", ";
      CurrentFreq += StepFreq;

  viClose (vi);
  viClose (defaultRM);
return 0;

-----Original Message-----
From: address@hidden [mailto:discuss-
address@hidden On Behalf Of SIGINT Admin
Sent: Wednesday, May 11, 2005 9:03 AM
To: address@hidden
Subject: [Discuss-gnuradio] RF Analysis


I was wondering if any of you guys had links or pointers to general
good quality RF analysis and logging software?

Ideally it would be compatible with the likes of the gnu radio
hardware, but could also be interfaced to drive an agilent spectrum
analyser or similar....

Any tips or thought welcome

Many thanks


Discuss-gnuradio mailing list

Discuss-gnuradio mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]