01-12-2012 02:21 PM
Hi Sparky,
Thanks for your attached codes. They really help me a lots.
You're writing ActiveX VI to access ActiveX Object (in this case 89601 VSA ) that's associated with the 89601 VSA Software to access the 89601 VSA Software Windowed base amplication, correct?
However, I have some troubles writing back the Labview codes to the instrument.
I'm using PXA N9030A Signal Analyzer (behaves as PC ) and 89601 VSA software is installed on this PC as well (not on seperate PC as in PSA Signal Analyzer ). So in this case, we don't need to open application on seperate PC, but we have to open it on the instrument PC.
So, if we use Labview instrument driver from NI, we can easily use the Labview to write and read all the settings on the instrument through the GPIB interface.
For 89601 VSA application on this intrument, how do I write and read all the settings to and from ActiveX Labview VI through GPIB interface?
Please help
Thanks in advance
Phong
01-12-2012 04:07 PM
Phong,
You can not access the 89600 series software virtual instrument from GPIB. This is a COM based application that uses an Active X Interface to the VSA software. It not that tough to code this instrument, you just have to know how to code with Active X and have the documentation of the VSA objects, so you know which to open to access the properties and methods available for the VSA. In my case I had the VSA software on a PC with a firewire connection to the 89600 hardware, but the same applies to Spectrum Analyzers, Logic Analyzers or High Speed Oscopes that can also be configured to operate as a VSA with this VSA software from Agilent. I then had a second computer tied to the VSA controller, that acted as the test program controller for the VSA and all communication for control and readback occures thru TCP/IP using the COM interface. You must have the 2 computers as the first VSA controller as as a Server for the VSA and the cliet is the test controller second computer.
Keep in mine that you must select an Active X constructor to connect to the application, open the application and any of the objects you need to set properties and methods and be sure to close them and not leave open objects, or you will crash the appliccation and it will not work properly. There is a Agilent paper that the folks at the Agilent help center can provide that gives the PC setting details to establish the connection. Also keep in mind that the older COM standard has a finicky security standard and must be set properly for the COM interface to connect and work properly. Agilent help center can walk you thru all the details to connect and program. I worked with this instrument extensively and programmed it with VB6 and Labview.
01-12-2012 06:47 PM
Hi SunShineDesign,
Correct me if I'm wrong
I have 2 computers:
1. One computer is the instrument PXA N9030A Spectrum Analyzer with 89601 VSA software already installed on it. I can launch 89601 VSA software and configure parameters on this instrument (computer ).
======> I will configure this instrument (computer ) as a VSA controller acting as a Server?
2. The second computer is the Labview installed application computer acting as a test controller
======>I will configure this computer as a client to access all properties and methods of the objects of the server?
More specific,
On the second computer (Labview computer ), I have to write ActiveX VIs which will create reference to ActiveX object that is associated with the application.
Say, I'll create a reference to ActiveX object (89601 VSA object) associcated with 89601 VSA application on the 1st computer (the instrument ), read or write the properties of the object and invoke the actions of methods on the object?
The last thing is the trouble for me is how write back all the values from the Labview computer (client ) to the instrument computer (the instrument ) through COM interface, but not the GPIB
I have to contact Agilent to get the PC settings to establish the connection between 2 computers? Do you have any paper in your hand that can forwad to me?
Thanks a lot.
Phong
01-14-2012 09:35 AM
Phong,
Yes you have the test topology correct. You are not communicating with the VSA Server with GPIB, you are using the TCVP/IP connection and the DCOM interface using Active X calls to make the connection and communicate with the instrument. I can send some more info when I get home and have access to the files. But basically once you setup the DCOM connection and reboot, then you code the active X in labview to connect and talk to/read from the VSA.
I'll attach the DCOM connection doc and provide a screen shot or two on the Active X control a bit later, when I have access to upload.
Sunshine Design
01-16-2012 12:57 PM
The 89600 is a virtual instrument that runs as a DCOM server on a host computer that controls either of several instruments that can act as the measurment engine for the VSA DCOM server software running on the test server. To setup the VSA download the latest VSA software and install. To Automate the VSA DCOM driver that comes with the VSA software and has a version to match the VSA software (these versions have to match for the DCOM driver to work properly). Also you will want to download and setup the Agilent IO version 15 or later (most current version) This tool from Agilent is very similar to the MAX from National. The VSA software must see all the instruments connected and visible on this Agilent IO for the VSA software to come up properly, if the instuments are not configured properly, the VSA comes up in Simulation mode. You will have to go thru the Agilent IO to resolve these connection issues.
Next comes the DCOM connection to the test controoler (client) that makes the automation calls to the test VSA server (controller). The DCOM driver must be installed on the test client and the DCOM setup properly for the connection and control to work properly. The DCOM install directory has a "Test Client.Bat" that can be run after setup to verify the VSA DCOM connection is setup and ready. See documents attached to see details on setting up the security model and access for the DCOM setup.
The COM Tree document can help provide the Map as to which objects have what methods and properties you will want to access to control or get data from the VSA. This control is with DCOM over the TCP/IP network from the client test controller to the VSA server VSA controller. All setup, control and readback are done with Active X calls that are very similar to making calls to Excel or Word. YOu have to oppen and setup objects to access their features. I provided a small code snippit attached. I coded the VSa using VB6 and Labview, so I got a fair degree of experience with it doing all sorts of functions and readback and using most of the features and measurements. I was even able to setup a limit line for a modulation mask of the VSA.
01-16-2012 01:13 PM
And here is a screenshot of the VI I used to start and open the VSA application and another that I used to capture the Spectrum Trace and convert to a real array. You can see how the objects are opened, worked and then closed to kkep the objects clear, when not in use. If these objects are left open and VSA restarted the computer looses resources and at some point the VSA will lose it's handles and control of the VSA application. I hope this helps you.
01-16-2012 01:19 PM
And last the link at Agilent to get the software version for VSA that you need for the version you have licensed can be found here:
02-25-2015 03:30 PM
Hi SunshineDesign,
It's been couple years since I've followed your instructions to make DCOM settings work on my Window XP PC (the VSA 89601A VSA software installed on this PC) using Labview 8.2. I could see my "AgtVsaVector.Application".
However, now I'm using Window 7 PC (with 89601B VSA installed on it) and Labview 2011 and I cannot see the "AgtVsaVector.Application" using dcomcnfg from the DOS prompt.
Did I do something wrong or I missed something?
Thanks
Phong
02-25-2015 04:10 PM
You will have to see if Agilent has a windows 7 version of the dcom. I don't know if the oler one will load on Win7. I have not worked with it on Win 7, so Agilent Technical Support will have to help you.