VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

VeriStand .NET API

Solved!
Go to solution

I'm evaluating VeriStand. I would like to build a managed C++ application and access parameters in example workspace that comes with Veristand.

As I understood that should be possible through .NET API. Where should be a good place to start?

I only found Veristand Execution VIs (http://zone.ni.com/reference/en-XX/help/372846A-01/TOC12.htm).

Is there any other API reference or maybe a sample application? 

0 Kudos
Message 1 of 17
(14,364 Views)

Hi I attached the doxygen documentation for the .net dll. Open the index.html to get the info.

 

The dll is registered into GAC, so you should be able to load it up.

 

The interface is built using a factory pattern, so to use it you just need to instantiate a factor class from the dll and get the needed interface.

 

I think the doxygen documentation  should give you clear description on the parameters.

 

If you encounter difficulties using it let me know. 

 

Thanks

 

Toga

0 Kudos
Message 2 of 17
(14,363 Views)

I was expecting a component/dll to be shown in AddReference dialog in VS. After a while of searching I only found a (non registered) NationalInstruments.VeriStand.ServerAPI.dll under VeriStand installation which I could add as a reference.

After no sign of ClientAPI I fired up a GAC explorer which listed NationalInstruments.VeriStand.APIInterface and NationalInstruments.VeriStand.ClientAPI but I wasn't able to load it or create a reference to it.

Am I doing something wrong? What way of usage did you have in mind for using ClientAPI? Should there be a NationalInstruments.VeriStand.ClientAPI.dll on my machine? Is this maybe an evaluation period problem?

0 Kudos
Message 3 of 17
(14,355 Views)
Solution
Accepted by topic author enTelet

Hi enTelet, I look at the issue and found that MSVC does not automatically register all the dll that is in GAC. Which is unfortunate. I will make it a CAR to make the installer add the necessary components so MSVC can found the dll.

 

If you are interested in looking into how to add any dll from GAC to MSVC add reference list:

http://www.csharp411.com/adding-assemblies-to-the-visual-studio-add-reference-dialog/

 

I have attached a registry key export for you to use. You can just right click on the file and do merge, this should add the correct registry key.

 

Re-launch your MSVC now you should be able to add the reference to NationalInstruments.VeriStand.ClientAPI.dll 

 

If you are interested to know the actual disk path of the dll it is in (I have tried both windows xp and window vista 32bit OS):

c:\windows\assembly\GAC_MSIL\NationalInstruments.VeriStand.ClientAPI\2.0.0.0__a26d690c380daa308

 

Let me know if this still does not work.

 

Also there is a small console app using manage c++ solution file. I just write a really simple app using msvc express edition, note that I am not a managed c++ guy, I am more fluent in c# so the syntax sort of throwing me off a bit. The example should still show you how to get an IWorkspace and get status of the NIVeriStand engine.

 

 

 

 

Message 4 of 17
(14,339 Views)

Thanks! It works now.

 

One more question... What about connecting to remote system with custom IP and port?

0 Kudos
Message 5 of 17
(14,318 Views)
Are you referring to using the .NET API to connect to an instance of VeriStand running on another desktop PC? Or are you referring to VeriStand connecting to a remote RT Target?
Jarrod S.
National Instruments
0 Kudos
Message 6 of 17
(14,314 Views)

Can you describe your use case you are trying to solve with connecting to remove machine with different port ?

 

Thanks

 

Toga

0 Kudos
Message 7 of 17
(14,308 Views)

I'm interested in using .NET API to connect to an instance of VeriStand running on another desktop PC.

Scenario is a remote test system. VeriStand would be one of test applications all controlled from same remote script.

0 Kudos
Message 8 of 17
(14,278 Views)

CAR #186105 has been filed to address this issue.

0 Kudos
Message 9 of 17
(14,268 Views)

Hi Entelet, ok the short answer is that we have no direct support for remote machine VeriStand access for now.

 

However there are workarounds that you can do depending on your test system configuration:

 

1. If you are actually running the configuration on multiple PXI-RT target, then you just create multiple rig files pointing to different PXI-RT target system. Now with the API you can run these different rig configuration to run test on these PXI-RT target from 1 PC.

 

2. If you are intending to remotely control different NI VeriStand on different Windows Desktop execution, you need to do a bit of custom work. Since you are already doing custom managed C++ application you can write a client .Net WCF layer that sits on our ClientAPI.dll this way you open up remote access to each individual Windows Desktop execution.

 

Toga

0 Kudos
Message 10 of 17
(14,267 Views)