Author Topic: GPIB Control of frequency gen and spectrum analyzer.  (Read 2979 times)

0 Members and 1 Guest are viewing this topic.

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
GPIB Control of frequency gen and spectrum analyzer.
« on: October 07, 2018, 08:09:22 pm »
Hello All, 

Just wanted to get your thoughts before I decide to buy a GPIB to USB adapter.

I have a Takeda Rikken TR4132 Spectrum Analyzer with the TR41901B memory unit and an Anritsu MG3601A RF frequency generator. 

I would someday like to build my own radio of some sort (I have LOTS to learn before that happens).  But I was curious and experimenting with filters the other day and built a small band-pass 13.5MHz crystal filter with some crystals I had in a misc. box.  I didn't spend any time to mix and match crystals as I just wanted to experiment and learn more about operating my test equipment. 


Anyway, the issues I am running in to is my spectrum analyzer is a rather basic model, the minimum frequency/ X division is can display is 0.1MHz, so 1MHz across the width of the display, which makes it pretty hard to look at a bandpass filter with less than 100Khz bandwidth or so.

To make a Bode plot, I was setting my spectrum analyzer's memory unit to display MAX values at each X (frequency) location while I manually cranked the RF gen through a frequency range.  Big problem is, when in MAX hold and sweeping across the passing frequencies, the displayed form is wider than the drop-offs of the pass band, so it overwrites the "edges" when swept through the pass band.  (I may need to get a picture to explain better)

But, Looking into the memory unit on my analyzer, it works by breaking down the X-axis (frequency) into 511 locations, the Y-axis, is broken down into 0 to 800.  This brings me to my idea.

I am wondering if I can use the GPIB ports (on both spectrum analyzer and RF gen) to control the frequency steps and then read out the values at each X location on the analyzer to make a better Bode plot on the computer?  To get around the issue above, I'm thinking I would set the RF gen frequency, read the values from 0 to 511, then step the frequency, and do it again.  I would somehow, in my output, need to keep the above issue from happening, so I think I would only record the max value from each sweep.  One thing that would be troublesome, is if the SA drifts center frequency, it would throw it off.  To overcome, the program to perform the control and data recording could be fun.



The SA memory unit has all the functions I should need in the GPIB instructions, RF gen has so many GPIB controls, that it could be a fun one to figure out.
I'm looking at a Prologix GPIB to USB, although more costly than others, seems to be the most supported by opensource GPIB PC software.

Anyway, any thoughts?

Thanks!


(I attached the TR4132 specifications page)
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #1 on: October 08, 2018, 04:17:54 am »
So, the idea is to remotely step the RF generator and measure the signal as a kind of tracking generator? Sounds plausible, though I'm not sure how fast it'll be. An alternative to sweeping the RF generator is to use a noise generator that covers the desired spectrum.
TEA is the way. | TEA Time channel
 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #2 on: October 08, 2018, 05:40:33 pm »
Completely plausible.  If you think about it, what you are doing is using your spectrum analyzer as a crude tracking filter and ac voltmeter.  Thinking about it that way will help you dodge a couple of speed bumps in implementation.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #3 on: October 08, 2018, 05:44:09 pm »
Looking forward to seeing how it turns out, FB72.
TEA is the way. | TEA Time channel
 

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #4 on: October 09, 2018, 06:48:54 pm »
So I have ordered a GPIB daisy chain cable and a USB adapter.  I went with the cheaper "UGPlus" adapter.  We will see how well it works, it has the necessary files to use it with VB studio.  It's been a long time since I've worked with VB, so this could be fun too.  :scared:
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #5 on: October 09, 2018, 09:15:46 pm »
I don't recall if that version of their adapters has proper line drivers. If not, it should still be OK as long as the cable is short and the number of instruments in the chain is at most two or three. Check the specs to be sure.
TEA is the way. | TEA Time channel
 

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #6 on: October 10, 2018, 12:28:53 am »
I dont think it does, they claim it can run up to 5 machines.  I grabbed a 1 meter cable to keep the run short.  They sit next to each other anyway.  I worry about the spectrum analyzer, it doesn't say anywhere that its GPIB follows IEEE 488 (or any other standard), and it has direct support for an HP plotter or a TR plotter.  There is a dip switch on the back to set the GPIB address and one of the switches selects either HP or TR plotter.   But the analyzer memory unit is early to mid 80s so who knows.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #7 on: October 10, 2018, 07:10:51 am »
That sounds about right for GPIB without line drivers. The maximum number of devices that will work also depends on how picky the devices themselves are.

As for GPIB standards and IEEE 488, it's probably too old to have that particular standard labeled. Electrically, it'll probably be fine. The commands, though, are likely to be proprietary. So, you'll definitely need documentation on what to send to it to make it do things.
TEA is the way. | TEA Time channel
 

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #8 on: October 10, 2018, 10:45:20 am »
I do have the manuals for the analyzer, Advantest was nice enough to post all the manuals/documentation for their discontinued models. 
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #9 on: October 10, 2018, 05:59:32 pm »
Great. Have fun and post an update with how it all turns out.
TEA is the way. | TEA Time channel
 

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #10 on: October 17, 2018, 01:43:45 am »
So far so good,

The UGplus GPIB to USB cable and software showed up as well as the GPIB link cable.

Once I loaded the test software, both the RF gen and Spectrum analyzer initialized successfully!

I was able to use the basic test software to send commands to the spectrum analyzer and read data back from it as well.



I was quite surprised that the software installed and operated within five minutes, doesn't get much better than that!

Next is trying to get a VB program going that can send/receive through the GPIB adapter.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #11 on: October 17, 2018, 02:18:08 am »
Very cool! It certainly is nice when things work straight away. :-+
TEA is the way. | TEA Time channel
 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #12 on: October 17, 2018, 04:04:39 pm »
Will be interested to hear how the VB interface goes.  I have one of those adaptors, and got the test interface you show working easily.  Had less luck interfacing with VB or other programs.  Largely my fault and lack of programming skill so it would be good to see how someone else accomplished it.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #13 on: October 20, 2018, 04:58:13 am »
A positive result sounds like a good GitHub project release.
TEA is the way. | TEA Time channel
 

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #14 on: October 28, 2018, 06:54:51 pm »
Will be interested to hear how the VB interface goes.  I have one of those adaptors, and got the test interface you show working easily.  Had less luck interfacing with VB or other programs.  Largely my fault and lack of programming skill so it would be good to see how someone else accomplished it.

I haven't used VB for about a decade, and that might have been in Visual Studio 2005.  So this will be a journey to say the least....

I have spent a few hours fiddling with Visual Studio 2017 and getting familiar with the layout and toolboxes.  I started a VB program, but I'm having trouble calling the UGPlus .dll functions, I get an exception error.  This will be fun,  :scared:
 

Offline FB72Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #15 on: October 28, 2018, 07:54:48 pm »
Here is the I clicked buttons for two hours until it worked update.   

I was able to get the VB app to control equipment!!   :-+ :-+

It took me messing around with specific settings to get it to work.

Basically I made a new VB Form application, added the UGPLUSVB64.vb module to the project to declare the functions and call the .dll file (provided with the USB adapter), and then had to make these settings:

Platform: X86  (I had to change the target CPU from anyCPU to X86)

Target Framework: .NET Framework 3.5

Here is a snapshot, I read data from my signal generator. The generator has a beeper to tell you when it's processing, and it was beeping away as soon as I clicked read, it is definitely working.    :phew:

I hadn't told it to do anything so it just returned this:



Now to begin an actual application for what I want to do, and re-learn VB language......

 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: GPIB Control of frequency gen and spectrum analyzer.
« Reply #16 on: October 28, 2018, 10:32:19 pm »
Thanks.  With those clues I should be able to get it working.  I solved my initial problem by getting a NI (probably clone) adapter and using EZGPIB.  But still have the other adapter and might as well put it to work.

By the way, I find VS 2017 incomprehensible.  You can still download 2010 which is the last version I have been able to track.  Don't know the drawbacks other than lack of support to using the older version.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf