NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing .NET reference to TestStand

Hello,
 
I have an assembly based on VS and I need to do a sequence in TestStand to develop a test program. I have a VI that does that solution but I can't pass the code to TestStand because apparently we can't share the .NET references between LabVIEW and TestStand. Do you know if exists a way to share the .NET references from LabVIEW to TestStand???
 
To solve this problem I decided to use a TestStand step that runs a VI asynchronically. I created a case structure in the VI and from TestStand I call the case that I need to use from the VI that is always running. The problem here is that I need to return certain values from this VI and show this values in the main sequence steps and in the TestStand report. Apparently I need to synchronize the TestStand steps to be able to do the calls to the VI and to receive the values for the VI correctly. Do you know a good way to do this job???
 
Thanks for your help in this two issues.
 
Regards,
 
Gilberto Vargas
0 Kudos
Message 1 of 2
(2,934 Views)

Hi gilvarman,

 

You are correct, we cannot share a .NET object directly between LabVIEW and TestStand. The reason for this is because LabVIEW and .NET are in different AppDomains (Application Domains) and you cannot directly share objects between AppDomains.

 

To get around this, you can use a technology called .NET Remoting that basically lets you create a remote object (can be on the local machine) on a .NET Remoting Server and then share that objects from multiple AppDomains and even Applications.


There is a lot of documentation on the web about implementing .NET Remoting and we have tested this from TestStand/LabVIEW combination as well.

The one common pitfall that I've run into personally is to make sure that the .NET Assembly is in a place that both applications search for. A good choice is the GAC. 

Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 2 of 2
(2,855 Views)