Jump to content

Driver for Agilent Spectrum Analyzer


hambazaza

Recommended Posts

Hi,

I am new to LabVIEW and am working on a project that requires downloading data from a Spectrum Analyzer (Agilent E4448A series). I downloaded the driver from the labVIEWs driver download site, and have been playing around with it, however, the problem I am having is that one of the buttons on the Spectrum Analyzer is the "Max Hold" button, But I am having the hardest time finding out how to use LabVIEW to set that option. It doesn't appear as a VI, nor does it appear in the configure/trace/analyze pallets specific to the driver.

I am wondering, is there a way I can find out who the developer of the driver was and maybe ask him the question directly? Has anybody ever worked with instrument drivers that are missing a function and had to write it themselves? I am at a loss as to where to go from here.

Any guidance would be appreciated.

Thank you

H.

Link to comment

The LabVIEW driver will usually have the most commonly used commands. For something not in the driver, you will have to write it yourself. Check the SCPI commands in the manual for your instrument to automate the command(s), make a copy of some basic command VI that you already have in the driver, then modify it with the new command strings. Shouldn't take you more than 30 mins to an hour to have something working.

Neville.

Link to comment

Command is in the manual that was attached to a previous post...

2.18.3 Max Hold

Enables you to turn maximum hold trace feature on or off for the measurement. Maximum

hold displays and holds the maximum responses of a signal.

Key Path: Meas Setup

State Saved: Saved in instrument state.

Factory Preset: Off

Remote Command:

[:SENSe]:OBW:MAXHold OFF|ON|0|1

[:SENSe]:OBW:MAXHold?

Example: OBW:MAXH ON

OBW:MAXH?

Link to comment

QUOTE (bbystrek @ Apr 14 2009, 12:13 PM)

Command is in the manual that was attached to a previous post...

2.18.3 Max Hold
Enables you to turn maximum hold trace feature on or off for the measurement. Maximum
hold displays and holds the maximum responses of a signal.
Key Path: Meas Setup
State Saved: Saved in instrument state.

Factory Preset: Off

Remote Command:
[:SENSe]:OBW:MAXHold OFF|ON|0|1

[:SENSe]:OBW:MAXHold?

Example: OBW:MAXH ON

OBW:MAXH?

thanks, just found it in the file attached by brianlachlan right before you quoted it here.

I appreciate the help guys. I didn't realize that there was a programming guide for devices. My basic understanding of the drivers was that they were magic. but now I think I have an understanding. this should enable me to get the project done.

again, thank you. I think it should work.

Link to comment

I apologize in advance if the following is confusing. Just a few concepts to come back and read again should you have any problems...

I can offer you one more point that you might not have absorbed yet. As with many of Agilent's instruments, they remember which subsystems that you’re talking with. This particular command that you've mentioned is associated with the "Sense" and OBW subsystems. You can think of it as if the instrument has multiple brains (a brain = a subsystem) which are in some respects capable of operating independently. It's almost as if they’re separate execution threads if your familiar the concept. There are instances with many of spectrum and network analyzers, including Agilent's, where it's necessary to manage execution of the incoming command queue so that things like Config subsystem operations complete before requesting data using the Measure subsystem. Otherwise what can/will happen is that the measure subsystem will literally return a value, despite that the Config subsystem is still working. A couple of commands that are sometimes inserted to control this aspect of execution are OPC? and WAI which hold the incoming command queue until all executing tasks are finished. This is not something get overwhelmed with, and you can probably ignore it if you don't experience any issues, but these are a couple of core concepts that I had struggled with a bit when first introduced to Agilent's 8753 and 8560 series Network and Spectrum analyzers.

In the case of the noted command, you can always send a command in it's full form from the root ":" (I've taken advantage of the abbreviations as indicated by the lower letters in the documentation)...

:SEN:OBW:MAXH ON

:SEN:OBW:MAXH?

Alternately, once the Sense subsystem has been addressed, it's no longer necessary to specify the subsystem on consecutive commands. Once you send a command to another subsystem, it would again be necessary to change the subsystem.

:SEN:OBW:MAXH ON

OBW:MAXH?

I believe you can even simply it further as the ""SEN:OBW:" has already been addressed.

:SEN:OBW:MAXH ON

MAXH?

My suggestion to you would be to code your application such that any new conversation you initiate, never assumes that a previous process left the proper subsystem addressed. In other words, always fully specify the command from the instrument's root. An exception would be where, all of the commands are being sent sequentially from within the same VI, or series of VIs where the context is absolutely clear.

Link to comment
  • 2 weeks later...

bbystrek,

I had trouble following your advice, I had been away for a week and just got back to try to work this problem some more. I attached an image file of my VI so far, I'm having trouble getting the Instrument to respond to this set of commands, but it doesn't give me any errors at all. Am I coding this correct? I don't think I understand exactly how the machine works therefore I'm having some trouble giving it the correct code to have the "Max Hold" Feature turned on.

post-15261-1240858217.jpg?width=400

does anybody have any suggestions?

Link to comment

QUOTE (hambazaza @ Apr 27 2009, 02:49 PM)

I just caught one error in my original post, "SEN" is not the right abbreviated version, should have been "SENS".

Try changing your constant from ":OBW:MAXHOLD " to ":SENS:OBW:MAXHOLD ". The leading ":" in your original constant would have told the instrument to look for an "OBW" subsystem from the root. As it doesn't exist in the root, you would need to tell it that it's a subsystem of the "SENS" subsystem. Your original form probably would have been OK if you had omitted the leading ":", but only, if on your last command, you had already addressed the "SENS" subsystem (such as the corrected, fully qualified command that I'm suggesting). To stay out of trouble with this aspect, simply always write your code with the full command syntax. There's nothing wrong in doing so, just that a handful of extra characters need to be transmitted and processed by the instrument. Generally should be trivial for most purposes.

If you still have trouble with this particular command, you might try sending a different command that's easily verifiable just to confirm connectivity.

Brian.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.