Good point, I never thought of that. Your suggestion didn't fix the original problem but it may have prevented future ones. Thanks.
Doug
This is a discussion on 3008 Error with DCOM and Agilent 89601A - labview ; All,   I'm running Agilent's 89601A software on an MXA spectrum ****yzer, and accessing the 89601 functions using DCOM.  Almost everything works - I'm able to see all the objects, I'm able to use some of them.  When I try ...
All,
I'm running Agilent's 89601A software on an MXA spectrum ****yzer, and accessing the 89601 functions using DCOM. Almost everything works - I'm able to see all the objects, I'm able to use some of them. When I try to use the Measurement object however, I get the following error:
Error 3008 occurred at Automation Interface for the specified class cannot be obtained. Check if the automation refnum type is the correct class for this operation in Untitled 4.vi
This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input.
This error occurs if I use DCOM from my laptop to access the MXA remotely. It also happens if I build a test application and install it on the MXA itself. When running on the MXA, i get the same error if I supply Automation Open with the computer name or leave it blank. Oh, and by the way - the same code works FINE in Agilent Vee!!!
I've been poking at this for a couple of days now. Agilent hasn't come up with a solution. NI Helpdesk was pretty lost - not surprising since they don't have Agilent's hardware/software in front of them. I'm pretty much at a loss myself. Anybody have ideas????
Thanks in advance,
Doug
DCOM_Test.vi:
http://forums.ni.com/attachments/ni/...1/DCOM_Test.vi
Vee Screenshot.xls:
http://forums.ni.com/attachments/ni/170/270405/2/Vee Screenshot.xls
Good point, I never thought of that. Your suggestion didn't fix the original problem but it may have prevented future ones. Thanks.
Doug
Doug wrote:
Found it!
The versions of the 89601 software didn't match. I had V7.01 on my pc and 6.31 on the test equipment. I Up'd everything to V7.20 and it now seems to work.
Doug
That's great. And thanks for replying back. That kind of information could help someone else in the future with a similar problem
Doug,
I am trying to make a similar DCOM vi and communicate with the 89601A.
On your DCOM_Test.vi block diagram, you tied in the DCOM interface with
the labview objects labeled AgVsaVector._Application, COM/DCOM, etc.
What labview objects did you use?
thanks,
Wayner07
Hi Wayne07,
I think what you're looking for are the AgtVsaVector properties and methods. The first thing you have to do is install the Agilent 89601 VSA software on your local pc and on the spectrum ****yzer. I used version 7.20. As noted earlier, 6.x didn't play well. When you install the 89601 software on your pc, DO NOT install the Agilent IO libraries. Doing so will trash your GPIB setup because Agilent an NI used the same filename for one of the .dll's. The control I used to get to the application is just an Automation Refnum control. On the front panel: Modern/Ref Num/Automation Refnum, then rightclick on it and choose "Select Activex Class... Browse... Select "Agilent 89600 Vector Signal ****yzer Version 7.20...." in the drop down box, then select "_Application" in the table. Connect this to an Automation Open vi. You can leave the machine name unwired. Dcom will pick up the computer name to connect to through Component Services.
In the folder where the VSA software installed on your pc, there is a subfolder named "dcom". On my pc, the path is "C:\Program Files\Agilent\89600 VSA\dcom". In that folder, there is a Readme.txt file. Follow the instructions in there to set up dcom communications. The ****yzer name is the computer name of the spectrum ****yzer. If its an MXA, then its probably A-N9020A-(last 5 digits of serial number). You can also find this under "Show", "System" on the spectrum ****yzer.
Once you've run setup.bat, you can then run testconnect.bat anytime to test the connection. All setup.bat does is set default settings in Component Services. You can do this manually through Component Services. Once that's done, it tries to launch the VSA software. Play around with the permissions until testconnect.bat is able to launch the vsa software. I gave the users I created on the vsa Full Access and things worked fine.
Couple of notes:
- My pc's are in a domain. I had to add the spectrum ****yzer to the domain and log in with the same user as was logged into the pc. Create users on the spetrum ****yzer and make them "admin of the box".
- If you want to see the vsa actually running on the spectrum ****yzer, you must set "Interactive User" in dcom config on both the pc and the ****yzer. If you don't do this, the software will still run, but all you'll see is a splash screen.
- The software takes about 20 seconds to start. The only way you can tell its launching is to watch the spectrum ****yzer sweep - it will stop sweeping intermittently as the software launches.
- The default port for the license handler is "12345". Our virus scanner software used the same port. This created all kinds of wierd behavior - vsa AND spectrum ****yzer software wouldn't launch, vsa would launch with "Simulated Hardware" to name a few. To fix - on the spectrum ****yzer, look in "C:\Program Files\Agilent\Signal****ysis\Infrastructure" for a file named "Agilent.SA.xSA.exe.config". Open this file with a text editor and look for a line containing "<add key="LicenseHandlerPort" value="12345"/>". Change the value to something else (11111 doesn't work either - be more creative). Save and reboot the ****yzer.
Let me know if this helps.
Good Luck,
Doug
Hi Wayne,
Sorry I didn't get back to you sooner - time off.
I used the Automation Refnum on the front panel (rightclick on front panel "Modern_, "Refnum", "Automation Refnum"), then rightclick on the control you just placed and "Select Activex Class", "browse...."). Select "Agilent 89600 Vector Signal ****yzer 7.20 Version 1.10" from the drop down box. Doubleclick on "+ Application" under "Objects" to expand it. Select "_Application" and click "OK". That should do it for you.
I stripped out all the extra stuff from my DCOM Test vi. If DCOM is set up properly on your pc, it should run without modifications. It will launch the 89601 software, read back the start freq, and end the 89601 software.
Take a look at <a href="http://forums.ni.com/ni/board/message?board.id=170&thread.id=167201&view=by_date_ascending&page=3" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&thread.id=167201&view=by_date_ascending&page=3</a>. Sparky was kind enough to upload his vi's. They were a big help to me getting started.
Doug
DCOM_Test_12.vi:
http://forums.ni.com/attachments/ni/...COM_Test_12.vi
Hi Doug,
I seems like you know your way around working with the VSA. I also work with it and have some automatic tests written for it in CVI. There is one thing I didn't manage to do that you might have. I open a new application and close it on each of my tests since they are running on different instances. I would like to only open it once for all tests and use a function that will check if there is an active application running and return a handle to it. On the function panel under "_Application" there is a function called "AgtVsaVector_Active_Application" that should do the work but it doesn't work. Maybe I am not using it right. If you have any idea or did something like that it will help me a lot.
Thanks in advance,
Moshik
Hi Moshik,
That's something I haven't tried yet. Presently, I'm doing the same thing as you - closing the application after I finish using it and re-opening later. In doing so, I take a 20 second hit while the software starts every time I use it.
Here's something that may warrant investigating - If you use the front panel Mode key, an instance of the VSA stays running in the background. There may be a "Mode" command through DCOM. In theory, this should allow you to switch back to the VSA quickly. The downside is you may end up doing all your spectrum ****yzer commands through DCOM too. Also, if you're using a floating license, switching through the Mode key (and I assume a Mode command) ties up the license so it can't be used by another machine.
There is a "quick and dirty" way to do what you want - I assume you're passing a reference to the VSA application around in your program somehow. Try to do something simple with the existing reference (read the center freq. for example). If it fails, then start a new instance of the VSA application and retry. If you're able to do your operation with the new reference (read start freq in this example), then pass the new reference out. If it still fails with the new instance, then pass the failure to Error Out. You could even refine this to test for a specific error code that's passed when the reference isn't valid. One thing you'd probably need to do would be to change the timeout to something like 2 seconds before you tried to read the start freq., otherwise you could end up sitting there for some time waiting for the the read routine to fail.
Let me know how you make out.
Good Luck,
Doug
Hi Moshik,
Just a thought - what version of VSA are you running? I had 6.31 on one of my machines and had some real problems with it. I installed 7.20 on my pc and ****yzer, and the problems went away. Be careful if you try this though. When installing on your pc, don't install VISA drivers. Agilent and NI use the same filename for one of the .dll's.
Good Luck,
Doug
I just want to pass on that the DCOM error 3008 is still a problem with VSA 89601A version 7.2. I can open the application and a measurement handle, but when I try to use the measurement object I get automation error 3008. I got it with version 7.01 and upgraded the the latest 7.x version I could (7.2) and it is still a problem. VSA version 10.01 everything worked fine. I also wanted to mention that there were notes on Labview User forum about DCOM problems with version 6.3.1 and prior. Looks to me like they still have issues thru version 7.2.
Joe