01-14-2008 12:29 PM
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 analyzer 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
01-16-2008 01:40 AM
01-16-2008 07:57 AM
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 analyzer, 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
09-17-2009 06:18 AM
Hi,
Did any of you find a problem with using different functions (where each function uses automation open and close) and each function caused a new instance of the application to launch?
Attached is an example vi.
I have used these vi's with the VSA89601 software when it was installed on the PC with no problems, but now that i have installed the software on the MXA and configured DCOM they do not behave in the same way.
Thanks in advance
Darren
09-27-2009 10:49 PM
03-29-2012 02:16 AM
Hi All,
I have installed VSA 14.23 in my PC and try to communicate with N9030A VSA software. I used example vi from this post to open application but there is error in vi. I could not find AgtVsaVector._Application in ActiveX Class dropdown box. Is there anything to install beside VSA software? Thanks in advance for your help.
With Regards,
Tin Win
03-29-2012 09:52 AM
The VSA software is installed on the VSA controller. This computer also acts as the VSA "Server". The VSA Server is next remotely controlled by a second computer that
acts as the VSA client. This controller must have the DCOM interface installed on it. This is the ActiveX Application that you are looking for. The DCOM interface is what
is coded with to make the DCOM control calls to the VSA server. You did not set up the second computer with the DCOM interface. Please review the documents I posted
earlier in the thread.
03-29-2012 09:56 AM
Sorry my inputs for VSA setup was on antoher thread. Here is the link http://forums.ni.com/t5/LabVIEW/Run-remote-application-with-ActiveX/td-p/942268. I have more than one post and they have all the necessary information fro Agilent to properly setup the VSA Application and the DCOM interface, including all the DCOM system settings ont he client controller to make the DCOM interface work.