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.

John
----

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;
  }
  OutputFile<<endl;

  // 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"); Sleep(1000*10); viPrintf(vi, "*CHPWR?\n"); viScanf(vi,"%lf",&ChannelPower); OutputFile<<ChannelPower<<", "; CurrentFreq += StepFreq; } OutputFile<<endl; }

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



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

Hi

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

Mochara


_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio




_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to