LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"agesani Initialize With Options" timeout error on HP E4401B spectrum analyzer

System: Windows XP Pro, LabVIEW 7.1, IVI Compliance Package 3.0, NI-VISA 4.1

I have an HP E4401B Spectrum Analyzer.  I'm trying to write some LabVIEW code for it, using the agesani.llb library. When I try using the agesani Initialize With Options VI, I get the following error:

Error code: BFFF0015
Source: agesani Initialize WIth Options.vi<ERR>Driver Status: (Hex 0xBFFF0015) Primary Error: (Hex 0xBFFF0015) Timeout expired before operation completed.

I've searched the NI Knowlege Base, and haven't found anything that seems useful.  What I _have_ found are the following items.

Knowlege Base article "Time-Out Error with the Agesa Instrument Driver Example".  This refers to the agesa drivers, not the agesani drivers.  It also references an E4440A spectrum analyzer, not an E4401B.  The article says one cause could be that a compatibility mode other that SCPI is in use.  While the articles says how to fix this on an E4440A, the fix does not appear to apply to the E4401B.  In fact, if it is even _possible_ to have a mode other than SCPI on an E4401B, I can't figure out how to do it.  A second possibility the article suggests is that the spectrum analyzer is in Phase Noise mode rather than Spectrum Analyzer mode.  My E4401B is in SA (spectrum analyzer) mode.  I don't even see a way to put it in any other mode - I don't think the required options are installed.  Finally, my VI is configured as the article states - ID Query YES, Reset Device YES, etc.  I should note that the instrument's GPIB address is 18, and that this matches the resource name GPIO0::18::INSTR.

Some additional information: The spectrum analyzer's screen is indicating the instrument is in Remote (R) mode as a Talker (T).  A "Query UNTERMINATED" error message appears at the bottom of the instrument screen.

I've attached the results of a NI Spy capture to this message. (At least, I think I have. I've never tried doing this before, so if it doesn't show up, would some kind soul tell me how to include an attachment to my post?)

Oh, yes.  The agesani version is driver version 1.1, updated 17 Aug 2007.  (The version that's currently on the NI download site.)
0 Kudos
Message 1 of 8
(4,459 Views)
bpownall,

I did get your NI spy capture, Judging from the code showing up on your instrument, It looks like it is timing out due to not getting the proper commands in time. Does your instrument have a timeout setting you can adjust on it? Also, what do you have the timeout set on your computer?  I would try them at a higher value to see if they can resolve it.

It could also be an incorrect command being sent, in this case you would want to make sure your device is in SCPI mode, setting this should be in the user manual for your device. In fact the manual for your device will probably give you lots of insight on how to set up your device to talk to your computer.

Try these suggestions and please post back.
-Marshall R
0 Kudos
Message 2 of 8
(4,438 Views)
Hi MXI Master,

If there's an instrument timeout, I haven't been able to find it yet.  Seems like there should be, so maybe I just haven't looked in the right place yet.  As for the timeout value on the computer, I'm not sure what you mean by this - could you elaborate, and maybe tell me where to find it?

As far as SCPI mode, if it's possible to put the E4401B in something _other_ than SCPI mode, I haven't figured out how.  I can't find any support in the programming manual for anything other than SCPI.

That kind of seques into my next couple points.  The NI Spy output indicates that one of the commands that is being sent is "*SRE 32".

The "User's & Programmer's Reference" for the E4401B says (on page 206) "Send the *SRE <number> command (where <number> is the sum of the decimal values of the bits you want to enable plus the decimal value of bit 6).  [Bit 6 is the Request Service (RQS) Summary Bit.  BP]  For example, assume that you want to enable bit 7 so that whenever the operation status summary bit is set to 1, it will trigger a service request.  Send the *SRE 192 (128 + 64) command."

This statement would seem to imply that the "*SRE 32" command that is being sent by the agesani "Initialize With Options" command is an illegal command, or at best an ineffective command.  In light of that, it is interesting to me that the NI Spy output indicates that the next line , viQuery(GPIB::18::INSTR (0x246E9C8), "%s?","%ld"), is generating an 0xBFFF0015 error.  In addition, I can find neither the "%s?" nor the "%ld" commands listed in the Programmer's Reference.  I wonder if these could be for a firmware revision later than mine (A.01.03), or for instrument options I don't have (A4H, A4J).  Alternatively, I wonder if these are simply mistakes.

The next line in the NI Spy output, Formatted viWrite(CPIB0::18::INSTR (0x0246E9C89),"INST:NSEL?",11,11), also puzzles me.  The Programmer's Reference indicates that this is a supported command, to see what instrument application is currently selected.  (e.g. spectrum analyzer, GSM, Bluetooth, EDGE, noise figure, etc.)  However, when I try to issue this command to my instrument, by using the Instrument I/O Assistant Express VI, I get an "Undefined header" error on the instrument's front panel.  The instrument's error history shows the same "Undefined header" error.  Since my instrument only has the basic spectrum analyzer option installed, I wonder if this command is not valid?  (Personally, I wouldn't write instrument firmware code this way, but who knows?)  Alternatively, I wonder if this command requires a firmware revision more recent than mine.  (The Programmer's Reference is silent about this possibility.)

The next line in the NI Spy output, Formatted viRead(GPIB::18::INSTR (0x0246E9C8),"",4000,0), has another 0XBFFF0015 error associated with it.

Does this information shed any more light on the situation?
0 Kudos
Message 3 of 8
(4,426 Views)
A viQuery consists of a viWrite and a viRead. The %s and %ld are just variables. What is getting passed to the viWrite is the command :INST:NSEL?. It is the that follows that timeouts. If the instrument reports undefinded header, it's not processing the command and is not returning any data. Instead of using the Instrument I/O Assistant, I would recomend using MAX to test the commands. Just right click on the instrument listed in MAX and select 'Communicate with Instrument' When you do this, you will be using the low level GPIB functions and not VISA. See if you can get the instrument to respond here. One thing you should make sure of before issuing any commands after the *RST is that the instrument has actually finished it's reset routine. You can just skip issuing the reset to see if that changes anything.
0 Kudos
Message 4 of 8
(4,422 Views)
My thanks for the responses to my problem.  It looks like the root cause was the firmware version.  I upgraded to A.07.06 (the latest available that is compatible with my hardware), and now everything appears to be working fine, o
r at least the "agesani Initialize With Options" is running without generating an error.  We'll see how the rest of the example VIs in the agesani.llb library go.

Now on to the next problem!
0 Kudos
Message 5 of 8
(4,413 Views)

I know this is a decade old, but I've inherited some code that uses the agesani.llb.  The problem is, the code didn't come with the agesani.llb file.  Does anyone happen to have access to this old driver?

 

Thanks!

0 Kudos
Message 6 of 8
(3,290 Views)

Hey @SWalople

 

I checked our site, and could not find a reference to this lib. I also checked for the original device's driver and could not find anything. You may want to check with HP.

Chase
NI Technical Support Engineer
0 Kudos
Message 7 of 8
(3,276 Views)

I was looking again at the code and I saw that the instrument reference was a VISA of type "IVI Driver".  I found that there is a driver on NI's site that installs this:

Agilent Technologies agesani Analyzer

I must have been looking in the wrong section or something, but I found it this morning without too much problem:

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=321A53D128434BA3E0440003BA7CCD...

 

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