09-13-2009 02:34 PM
I'm trying to use LabVIEW to control an HP E4403B spectrum analyzer. The LabVIEW I installed is 2009, the drive/example I downloaded is from the link below:
I tried all the example program but none of them worked. Some commands like *IDN workes okay, but if I run the example programs, it will cause the spectrum analyzer "Undefined header" error.
Any one with experience of using HP spectrum analyzer can give me some clue about what's wrong?
Best regards,
Guangde
09-14-2009 07:48 AM
I've seen similar errors using drivers written for multiple variations of instruments. Usually this occurs because the instrument doesn't support all of the commands that the generic driver has included. Try stepping through the example code and find where the error shows up and that command probably isn't supported.
09-14-2009 02:21 PM
Thank you for responding to my email. I can narrow down to the following commands that are causing problem, but I don't know how to solve it. Do you have a clue about how to deal with it?
:SWE:TIME:AUTO ON;
:BWID:AUTO ON;
:BWID:VID:AUTO ON;
:BWID:VID:RAT:AUTO ON;
The firmware version of my machine is A.07.06.
Best regards,
Guangde
09-14-2009 02:34 PM
First, are you using this with GPIB and an NI GPIB board?
Second, have you turned on NI-spy to get a capture of the commands being sent? If not, do that and attach the results.
Third, have you sent the commands manually using MAX? If not, do that and see if the error occurs. If it does not, you can compare NI-spy results for this with the NI-spy results with the driver.
09-14-2009 04:45 PM
Hi Dennis,
Thank you for responding to my message.
I deleted some of the commands from two of the subVIs, the error is gone. But the program is still not working right. The following is some details:
The program I used is: Agilent ESA PSA Series Acquire Trace which is an example of Agilent ESA PSA Series.
In the subVI: Configure Sweep Coupling.vi, I deleted :SWE:TIME:AUTO ON; and :BWID:VID:RAT:AUTO ON; from the following commands:
:SWE:TIME:AUTO ON;
:BWID:AUTO ON;
:BWID:VID:AUTO ON;
:BWID:VID:RAT:AUTO ON;
In the subVI: Configure Acquisition.vi, I deleted :DET:AUTO ON;
:INIT:CONT OFF;:DET:AUTO ON;:DISP:WIND:TRAC:Y:SPAC LIN;:DISP:WIND:TRAC:Y:PDIV 10.000000;
So I can run the program through without an error message. But it doesn't seem it's measuring. Another problem is that it runs very slow, about 2 to 3 seconds per cycle.
Please let me know what I need to do after I deleted the three commands.
Thanks,
Guangde
09-14-2009 04:49 PM
Hi Dennis,
Thank you for responding to my message.
I deleted some of the commands from two of the subVIs, the error is gone. But the program is still not working right. The following is some details:
The program I used is: Agilent ESA PSA Series Acquire Trace which is an example of Agilent ESA PSA Series.
In the subVI: Configure Sweep Coupling.vi, I deleted :SWE:TIME:AUTO ON; and :BWID:VID:RAT:AUTO ON; from the following commands:
:SWE:TIME:AUTO ON;
:BWID:AUTO ON;
:BWID:VID:AUTO ON;
:BWID:VID:RAT:AUTO ON;
In the subVI: Configure Acquisition.vi, I deleted :DET:AUTO ON; from the following:
:INIT:CONT OFF;:DET:AUTO ON;"DISP:WIND:TRAC:Y:SPAC LIN;:DISP:WIND:TRAC:Y:PDIV 10.000000;
So I can run the program through without an error message. But it doesn't seem it's measuring. Another problem is that it runs very slow, about 2 to 3 seconds per cycle.
Please let me know what I need to do after I deleted the three commands.
Thanks,
Guangde
09-14-2009 04:58 PM
I'm frustrated with these funny charecters. I'll redo it again:
In the subVI: Configure Acquisition.vi, I deleted
:DET:AUTO ON; from the following:
:INIT:CONT OFF;
:DET:AUTO ON;
:DISP:WIND:TRAC:Y:SPAC LIN;
:DISP:WIND:TRAC:Y:PDIV 10.000000;
09-14-2009 04:59 PM
Did you delete those commands because they are not supported by the instrument or just because?
If they are supported by the instrument, you should really try to determine why the instrument is throwing an error. If they are not supported, you need to dig into the manual to see what really should be sent. The commands were there for a reason and I would imagine you don't have some necessary parameters set up so that no measurement can be made.
Did you try any of the earlier suggestions I made? I know you did answer any questions here but I would like to know if you tried
09-14-2009 05:42 PM
Hi Dennis,
I read some of the posts and they mention that the drivers/examples are newer than the firmware in my machine. This machine is about 10 years old. I contacted Agilent and I was told that to upgrade the firmware, I have to add a new memory module that will cost over $400. It's hard for me to justify the cost. That's why I'm trying to modify the program to make it work, I couldn't find any older version of the program.
I tried the NI Spy but I don't know how to copy it. Right now I know which command is causing problem, what I need to know is which command I should use to replace them.
Best regards,
Guangde
09-15-2009 04:31 PM
Hi Guange,
If you’re editing an instrument driver, the best place to find those commands for you instrument would be in the manual that came with your device. That should have all the commands your device will recognize for your devices specific firmware revision.