LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use 89600B VSA .NET API in LabView

My Labview (Rev8.5) program works fine with E4440A & 89600A VSA software through COM API on 802.11a/g/n EVM tests. But recently we got another E4440A & 89601B VSA license which changed interface from COM API to .NET API. Now my test software doesn't work on this set up anymore.

 

I was trying to modify the Labview code to use the .NET API that 89601B VSA provided but encountered some issues. First I placed a .NET constructor in Labview block diagram and tried to select the assembly. According to the Help files, "the .NET API is located in  %PROGRAMFILES%\Agilent\89600B VSA xx.y\89601B\VSA\Interfaces for .NET 4.0", and "In the 89600B VSA .NET API, you need to add a reference to the Agilent.SA.Vsa.Interfaces Assembly of the version you wish to use. You then call ApplicationFactory.Create() in order to get a handle to the Application Class". But when I actually selected the ApplicationFactory in the Labview .Net assembly selection window, it said :"There is no public class in this assembly ". Why? Has anyone actually used .NET API with Labview to control 89600B VSA? Could you share the experience?

 

By the way a comment in the 89600B Help file is " a backwards-compatibility COM (BWCC) API is provided with the 89600B VSA", does this means that I can actually still use my current Labview code without changing them,

by simply registering the B version as the current COM server? 

 

Your help is greatly appreciated.

 

Thanks,

George

 

 

 

0 Kudos
Message 1 of 22
(5,533 Views)

LabVIEW 8.5 does not officially support .NET 4.0. It might work, but chance are it probably won't be able to load the assemblies. You could try restricting the .NET version to use as described here: http://digital.ni.com/public.nsf/allkb/32B0BA28A72AA87D8625782600737DE9

 

As for your second question, the comment from the help file does seem to imply they've provided an updated COM server, so I think your idea of registering the updated COM file is worth a try.

0 Kudos
Message 2 of 22
(5,530 Views)

Hello,

 

Did you succeed in getting your VSA 89600A program works thanks to tha backward compatibility?

Or did you succeed in using .NET assemblies for 89601B?

 

I tried to use the backwards compatibility but my program doesn't work. Error 3005 "object specified is not creatable".

On another computer, I got error 3008, property node (arg1) in my .vi.

 

Thanks for your help.

 

Best regards,

 

 

0 Kudos
Message 3 of 22
(5,406 Views)

Hi Ladomy,

 

As mentioned before, those errors likely mean your .NET assembly is not compatible with your version of LabVIEW.  What are the differences between the two computers that you are using?  Are they different LabVIEW versions?

Cole R.
National Instruments
Software Engineer
0 Kudos
Message 4 of 22
(5,394 Views)

I was never sucessful in controlling 89600B VSA with .NET interface in LabView 8.5. 89600B does support COM backward compatibility, so I am still using its ActiveX interface in LabView. Before you start LabView, you have to register 89600B V14.2 COM as your default COM interface. You can find this utility in the installed Agilent VSA program list. Then you can start your existing LabView code which previously worked with 89600A VSA V12.x, and reload/relink the VSA ActiveX Application to the new COM server. If you still have trouble to run your code after that, you will have to delete and replace every single VSA related ActiveX property block in your code. This was proved to be the effective way to make my code work with the new 89600B VSA COM interface.

 

Agilent guys suggested to move to SCPI commands through TCP/IP Socket completely but I found ActiveX interface seems more reliable in EVM measurement especially when the VSA software is still working on the PC which runs LabView. But I do use SCPI commands to set some of the VSA parameters (tracking timing/phase/amplitude, and burst length etc.).

 

Hope this will help.

 

George

0 Kudos
Message 5 of 22
(5,387 Views)

The Problem is not .NET 3.5 or .NET 4 nor LabVIEW's support of .NET

Using the .NET Contructor Node to browse constructors will display "This class contains no public constructors" in both .NET versions and all LabvIEW Versions. 

 

Instead use a Property/Invoke node directly without a reference from the .NET construct and right click on them to "Select Class", .NET & Browse to the .DLL ( .\Interfaces (.NET 4) and .\Interfaces_v3.5 ). After you have done this once, the "Aglilent.SA.Vsa.Application", and any others you have selected will be availible in the .NET pulldown without having to browse to the DLL anymore. You can then traverse the Tree of the Application Class and Measurement Extensions (See Attachment)

 

Take note that the ActiveX / COM driver is going obsolete and is currently backwards compatable by selecting Agilent VSA v12..."  (even in v16+), but this will probably eventually go away in future versions. 

 

For more information see : 

http://lavag.org/topic/13791-when-accessing-a-net-assembly-from-lv-i-cannot-see-public-methods-and-i...

 

"Static methods are not accessed via constructor, but by selecting the method in a stand alone .NET invoke node."

0 Kudos
Message 6 of 22
(4,995 Views)

Hi LABVIEWFL,

 

I followed your instruction: right click on the property--->Select Class--->.NET---->Browse--->Agilent.SA.Vsa.Application.dll

 

 and I got a message:

 

System.BadImageFormatException: Could not load file or assembly 'C:\Program Files\Agilent\89600 Software 19.0\89600 VSA Software\Agilent.SA.Vsa.Application.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

 

 

How do I fix this?

 

Thanks

 

Phong

Phong
0 Kudos
Message 7 of 22
(4,676 Views)

Hi gduz,

 

for 89600B COM backward compatibility,

 

I have trouble finding the ultility in the installed Agilent VSA program list.

 

Can you show me where to find?

 

How do I register 89600B v14.2 COM as my default COM interface?

 

 

Thanks

 

Phong

Phong
0 Kudos
Message 8 of 22
(4,658 Views)

Hi Phong,

 

It's possible that gduz may never see this, as his previous post was a couple years ago.  I'd recommend starting a new thread, if he doesn't respond soon.  

 

I hope the issue gets resolved soon.

 

Andy

Andy G
Applications Engineering
National Instruments
0 Kudos
Message 9 of 22
(4,626 Views)

Thanks Andy,

 

 

I'll try a new thread.

 

 

Phong

0 Kudos
Message 10 of 22
(4,613 Views)