LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HP 436

This is kind of a shot in the dark, I'll probably have to find an HP forum for this, but I'm wondering if anyone has ever used the HP 436 power meter before.  I am trying to write a driver for it and am running into some problems with the auto-ranging functions.  I attached the driver I made, it is pretty basic and usually the functions work (setting dBm will change the meter to dBm mode, etc) and the manual ranges work as well (1-5, though I hate how they labled them) it is just that I can't get the auto range to work more than once.

 

I also attached a screenshot of the program I am using it in (the sub.vi labled HP 436 Range is just like the driver I attached only it just sends the auto range command).  The program does a simple frequency sweep with the HP 8642A, and the issue I am having is that while the auto range will (sometimes) work for the 1st data point, it stays in that range for the rest of the sweep, and sense cables have more loss at higher frequencies (this is going to be used for a cable calibration program) by the time I get up in the MHz range I am way under range.

 

Like I said, kind of a shot in the dark, but if you have used the HP 436A power meter before I could use some help.

 

(Labview 8.5 only if you want to send me .vis, I kick it old school!)

 

Download All
0 Kudos
Message 1 of 8
(3,827 Views)

I may have given a better explination on my post to the agilent forums, it is copied below (and I also just want to bump this post back up on the board):

 

Auto-ranging: All of the programming commands for the HP are pretty basic, the auto range command is simply "9." However, sending this command does not set the HP to an appropriate range, and I often get underrange/overrange indicators. All of the manually selected ranges seem to work, but for the final application of this program I will need the auto-range capabilities. Is there a trick to getting this to work? Because it seems that I cannot simply send the device a string "9D+T" (autorange, dBm, cal off, trigger w/ settling) and have it set the range correctly. The D and + commands seem to work, and I assume the T command will (though I can't get past the ranging so who knows).

Reading Values: Usually labVIEW's VISA read function works, though every now and again I get a timeout error message associated with the read function, and once this happens, I need to power cycle the HP 436, otherwise I won't be able to read from it.

 

Maybe that helps?

0 Kudos
Message 2 of 8
(3,824 Views)

Lars,

I'm not absolutly certain of this but you might try a small delay between the 8642 configure and the auto-range command.  The first iteration the generator is off so slapping a signal on is quick (explaining why it works the first time).  On the rest of the iterations the generator actually needs to shut off apply settings and turn back on.  if you are autoranging during this "Glitched" output you might see what you are seeing.

 

Let me know if that fixes it!


"Should be" isn't "Is" -Jay
Message 3 of 8
(3,819 Views)

It's a good suggestion, and I'll probably throw in a pause just in case, but I think the problem is a little deeper than that.

 

The reason I think so is because if I skip labVIEW altogether and just send the auto-range command (9) through MAX, it still won't auto-range.  When I try it this way the signal generator has been sitting on the freqeuency/level for a while, so I shouldn't have that "glitched" issue.

 

I came up with a work around that seemed to work alright in the test-version of the program I was working on, but when I moved it over to the real thing it didn't do anything, and half my measurements were under-range.  The workaround pretty much just takes 2 measurements, the 1st one checks if it is under-range, and if it is, it incriments the range to the next one.  See if you can spot the difference, in the first attachment the compare/case structures on top sucessfully changed the range to the correct setting, while the 2nd attachment failed to do so.  The only difference between the 2 programs should be the driver for the signal generator (the test will use the 8341B but I don't have one where my station is set up, so I substituted a 8642A just for working with the power meter).

Download All
0 Kudos
Message 4 of 8
(3,808 Views)

I should probably mention that if the power meter is under-range, it sends a reading of either 0, -10, or -20, depending on which range you are on.

0 Kudos
Message 5 of 8
(3,805 Views)

Hi,

 

Some thoughts.  Some instruments seem to need to take several measurements when in autorange, allowing the instrument to get a good range.

 

Is there an error clear that might be used to avoid having to power cycle the PM?

 

Mark

-------
Mark Ramsdale
-------
0 Kudos
Message 6 of 8
(3,796 Views)

So I went to RTFM Here and lo and behold.  Thats just the way it works!  Reading between the lines their example programs suggest the following Pseudo code process

 

Init instrument communication

Try AutoZero

    If not autozeroing Try again

Connect source

Try Reading

     config reading with auto range

     Wait 4 seconds

     Get reading

     If reading makes no sense wait 10 seconds and Try again

 

 

the 436 is a POS!

 

    


"Should be" isn't "Is" -Jay
Message 7 of 8
(3,778 Views)

Hahaha "the 436 is a POS!"

welcome to every gpib device I work with.

 

I ended up creating an auto-ranging program from scratch (which I attached, in case you are curious), that just reads the status bit at the front of the data string and bumps it up or down, but in doing so I found a major source of the problems I was having:  the GPIB interface on the 436 I have is completely screwy and is sending the wrong status bytes, telling me I am under range when I am not, and that I am in Watts mode when I am in dBm.  The errors it has are predictable, so the auto-ranging program I made should work (so long as I never use it in Watts mode and start the auto range from the bottom...long story... I hate this 436).

 

So thanks for all your help guys, if the lab tech comes back saying it still doesn't work, I'll probably be back posting more problems : )

 

 

(note: attached .vi requires the 436 setup.vi that I attached in the 1st post of this thread)

0 Kudos
Message 8 of 8
(3,757 Views)