Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HP8757 Scalar Analyzer

Solved!
Go to solution
Highlighted

Having some struggles with getting some drivers together for the HP8757.  Have both the C, D and E version.  Generally when you query the instrument, there is typically a question mark (?) at the end of the query string.  To get the number of points that the 8757 is set up in, it indicates that command is simply "OPSP" - no question mark in sight.  I can't seem to write that with a VISA Write, as it hangs the bus up.  Tried a Read, with same result.  I'll then need to read back that number.  When I do Write the "OPSP" string, I get a display on the 8757's screen indicating it's sending data to the GPIB, but I get back an Error Code and I have to Preset the instrument to clear the bus.

 

 

0 Kudos
Message 1 of 34
(4,961 Views)

Hi djpritchard,

 

I would like to clarify a few things you mentioned in your post, which will help us all understand your issue and hopefully get you on track. First, what driver are you using for the 8757 and where did you download it from? Also, you mentioned that it indicates what the command is... what is it that indicates that command? When you try to write "OPSP" with no question mark, do you get a timeout error? What error number/message do you get? 

 

Am I correct in understanding that when you write "OPSP" to the bus, the 8757 indicates that it has received the message and is responding? What error/message do you receive when you try to read from the bus?

 

Thanks,

 

John M.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 34
(4,914 Views)

John - I have not been able to find a driver for the HP8757, so was working to create some.  I found several posts on the NI forums where folks have been looking for NI to develop some, but all the threads end with no resolution. 

 

I'll send the exact error when I get in to work in the AM.  OP is Output and with it followed by SP, it is supposed to output the number of points.  I do get a message displaying on the instrument that it's sending info to the GPIB, but the bus hangs up.  I need to get this in order to map the data in to a specifiic frequency.  I can use the VISA Write just fine - sending an "SP201" wil set the number of points to 201.

 

Another note is that I have tried to send the OPSP command from the NI Measurement and Automation utility, but it also hangs up.  A collegue who is more familiar with GPIB command and the NI utility was able to successfully send them from the interactive window in the 488 utility, by using the SEND command, followed by a RECIEVE command - but is scratcing his head on why the NI M&A utility hangs.

0 Kudos
Message 3 of 34
(4,903 Views)
sounds like you are not correctly terminating the OPSP command. Try adding a semi-colon (;) after the OPSP or, failing that, try adding an LF character (ASCII #10)
0 Kudos
Message 4 of 34
(4,891 Views)

Sloppy - already tried the semi-colon, but it did not work.  Did not try the Carriage Return.  How would one do that within LV and the VI?  I'll see if I can figure it out through the NI M&A window.

 

John - see below for the specific errors I'm getting - to answer your question:

 

Error Displayed in NI 488.2 window:

 

iberr = EABO

 

EABO indicates that an I/O operation has been canceled, usually due to a timeout condition after a GPIB read.  Before reading from the instrument, verify that the GPIB command you are sending is understood by your device and instructs it to place data in its output buffer.  For information on your device's command syntax, consult the instrument manufacturer's user documentation.

 

Error From LabVIEW:

 

Error -1073807339 occurred at VISA Write in Set Format_8757_RevA.vi->Agilent 875X_Take Sweep_Graph Data_StoreFile_RevC.vi

 

Possible reason(s):

 

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

John - if you're aware where I can already get some canned dirvers, I'm open to that - but I'd still like to understand where things are going wrong.  I'm wondering if the 8757 is "finnacky" and that's why NI hasn't released drivers.  Maybe you could talk to that.

 

Thanks

 

 

0 Kudos
Message 5 of 34
(4,881 Views)
sounds like you are not correctly terminating the OPSP command. Try adding a semi-colon (;) after the OPSP or, failing that, try adding an LF character (ASCII #10)
0 Kudos
Message 6 of 34
(4,877 Views)

Hi djpritchard,

 

Thanks for the additional feedback (and suggestions, Sloppy!). If the problem is the termination character, you can add a carriage return in LV as follows: right-click your string control (or constant) and select  '\' Codes Display. In this display mode, if you type \r or \n into the string box, they will be interpereted as a carriage return and line feed, respectively.

 

In regard to the timeout error, here is a good KnowledgeBase article that addresses this error and provides several suggestions for resolving it.

Why do I Receive Timeout Error -1073807339 on VISA Read or Write?

 

Have a good evening!

 

John M

National Instruments
Applications Engineer
0 Kudos
Message 7 of 34
(4,843 Views)

Hi guys,

 

I am having similar issues with my 8757D Scalar Network Analyzer.  I am talking to it through an NI USB-GPIB-HS cable.  The NI drivers for Linux worked great for me when I tested out communication with a Frequency Counter.  I was able to write/read to/from it no problem.

 

I don't seem to have any issues performing GPIB writes to the SNA, but the GPIB reads are very finnicky It seems once it gets hosed up my only recovery is a front panel preset.  I took some screen shots of my NI GPIB configuration, as well as the NISpy GPIB capture showing that my calls appear to look just fine, but still oddly enough error out.

 

 

Here are the settings I'm configuring the cable with.  Also, I use the same settings in my call to "ibdev" in terms of time out and EOI/EOS.

 

GPIB Config Settings

 

 GPIB Config Adv.

 

 

Here, I have no problem putting the SNA into Passthru mode, and setting up start and stop frequencies.  Then I perform an "output identity" call, and the read fails.  The second time it succeeds, however after that all calls fail (timing out), and I can't even send an "IP".

 

NI Spy Capture

 

 

NI Spy Error

 

 

Any help/suggestions on this would be greatly appreciated.  I can provide any other data or screen captures if needed.


Thanks!

-Tim

0 Kudos
Message 8 of 34
(4,760 Views)

I think what you all need to keep in mind is that interfacing with the 8757, particularly getting data out of it requires attention to a couple of details.

 

generally you must specify the data transfer type first. the command FD0; is useful for specifying ASCII output and is satisfactory for pretty much any application. 

 

you generally must specify the amount of data you expect to get from the instrument. If you get this wrong the 8757 will hang. when downloading traces from the 8757, the number of bytes to receieve is

 

points per trace * 8 bytes per character in FD0; ASCII tranfser mode.

 

so for a 401 point trace you will receieve 3208 bytes. If you don't specify this you can hang the 8757 during the transfer.

 

when outputing general parameter information, 13 bytes are usually output for most parameters. again, you must correctly specfify this or you can hang the 8757

 

All commands to the 8757 should be terminated with a semi-colon. A LF (ASCII #10) should be used as a terminating character on data writes to the 8757.

 

 I've been programming 8757's since it first came on the scene, in LV as well as a couple of other languages. It works well and reliably when you get all the little details correct

 

 

0 Kudos
Message 9 of 34
(4,736 Views)

Sloppy - would you be willing to share a small VI that just pulls a simple Gain response on Channel 2?  I also am having a similar issue, and I can't seem to get the read routines working.  The VI's I've been building to set up the instrument are working just fine.  Appreciate it.

 

If you don't want to post it, I can give you my email address.

 

Thanks,

 

John

Message 10 of 34
(4,672 Views)