From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument control(E4440A)

Hello:

 

The link between the instrument and the PC is lan, and the instrument I want to control is spectrum analyzer, its type is E4440A.

I download the driver from the web(see the attached file "Agilent ESA PSA Series.zip"), and control the spectrum analyzer to search the peak, the program I used is the example of the driver, the route of the example is "Agilent ESA PSA Series\Examples\Agilent ESA PSA Series Configure and Query Marker.vi", but the start frequency I only can set to zero or lower, when I set it above 0Hz, it occurs an error(see the attached picture "ERROR.JPG"). It appears that there is a bug in the driver where it is doing something like always setting the marker start frequency to 0Hz even if you set the trace start frequency to something higher.

Please help me to solve the problem.

Thank you very much!

Download All
0 Kudos
Message 1 of 11
(5,061 Views)

The ESA/PSA driver has numerous issues because they did too many things together within several of the vi's. You found one of the more glaring issues with the basic functions. I put a select case around this Marker by freq part, so that if the entered frequency is zero that command part is skipped. They should never have combined the marker by freq with the marker max function, as the one over-rides the other. This is very poor instrument driver writing. I also found that many of the Macro test functions do not work or have all the commands to work properly. Another feature is that the ESA is a very slow instrument and it also does not respond well to OPC?. So you have to comment out the OPC's and use waits instead. They should have seperated the ESA and PSA into seperate drivers and programmed a low level of singular commands and grouped only commands that are appropiate.

0 Kudos
Message 2 of 11
(5,036 Views)

The actual issue here is that you cannot set the marker start frequency to a value that is less than the start frequency. This is due to functionality of the instrument, and not a bug with the driver.

0 Kudos
Message 3 of 11
(5,032 Views)

Sorry Smercurio_fc, it does have the marker by freq before the marker max. I have used this command and run into the same issue he talked about. You can't search marker max and also set the marker to freq. The marker by freq overrides the marker max peak.

0 Kudos
Message 4 of 11
(5,030 Views)

Yes, it has the "marker by freq" before the "marker max", and that's because the one VI is Configure Marker Type and the other is Configure Marker Search. In order to use Configure Marker Type you need to provide valid inputs for the instrument since it configures the marker based on what you specify. And one of those settings is the position of the marker. Which you can't set to a frequency below the start frequency.

 

The question was "is there a bug with the driver". The answer is no. The control's value is not dynamic in that it will automatically change its value so that you cannot enter a value that's less than the start frequency. It requires that the user is familiar enough with the instrument that they know you cannot set the marker's X position to be less than the start frequency. If you want to say the driver is poorly written, that's a different story.

0 Kudos
Message 5 of 11
(5,026 Views)

Hi:

 

The issue is I cannot set the start frequency to the value higher than 0Hz. And when use other methods not labview to control the spectrum analyzer, such as VB or C ,there is no problem.

0 Kudos
Message 6 of 11
(5,017 Views)

Are you sure that's the problem? I ran the example on the E4440 that we have here in the lab, and it can set the start/stop frequencies just fine. The example simply calls the subVI that sets the start/stop frequencies. Open the block diagram and look at the first VI being called. Open up that subVI and run it with the start/stop frequencies you provided in your screenshot. Do you still get an error?

0 Kudos
Message 7 of 11
(5,003 Views)

Yes, I still get the same error.  Did The program you used is the driver I provided? And have you set the start frequency to the value higher than 0Hz? Could you provide your screenshot? I want to compare them. Maybe I have made other mistakes.

0 Kudos
Message 8 of 11
(4,987 Views)

I used the same exact VI that you used. I set the values to the same exact values that you showed in your screenshot. The error I encountered was when it set the marker position, not when setting the start frequency.

 

Run the VI in highlight mode and watch the block diagram. Which VI is generating the error?

0 Kudos
Message 9 of 11
(4,980 Views)

Hi Smercurio Fc:

 

Thank you for your help.

I have find the root caused error. The subVI "configure maker" has set the initional frequency to 0Hz by default, I have ignored the set before.

0 Kudos
Message 10 of 11
(4,967 Views)