VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Python to interface and automate in NI veristand

Does anyone knows how Can I use Python to interface and automate in NI Veristand?

0 Kudos
Message 1 of 5
(7,957 Views)

I guess you have to use IronPython to be able to import .NET assemblies and wrap to VeriStand Gateway API classes.

0 Kudos
Message 2 of 5
(7,949 Views)

Hi,

 

If you need to use pure CPython it is a bit complicated.

 

The tricky part of this is calling from unmanaged code (C,Python) to managed code (C# .NET) - VS API. CVI has solution for it, called .NET controller. It generates static wrapper for .NET assembly, that you can use for calls from ANSI C. So one solution is to write intermediate layer dll in CVI which will call into .NET managed code.

 

Second solution is to use pythonnet (http://pythonnet.sourceforge.net/). Disadvantage of this approach is, that it supports only CLR 2 and project has vary rare updates. So I wouldn't use is it f.e. for production tester...

 

Jiri Keprt

NI RTT&HIL Systems Engineer

CLA, CTA

0 Kudos
Message 3 of 5
(7,944 Views)

Hi, I have installed VeriStand 2013 SP1 and created project in it. Now I need to control VeriStand from some programming language for automation of various tests.

 

If I choose Python for it, any stepwise guidelines available on how to use python?

From Where I should be executing Python Code? Can I get sample program for opening/Closing VeriStand Project from Python Code?

Thank You,

Amit Saste

0 Kudos
Message 4 of 5
(5,118 Views)

Hi Amit,

 

I see that you posted a similar question on a new thread here.  That new thread will be the best place to get visibility to the community for your question.  Please continue using that post for this discussion.

Cody A.
0 Kudos
Message 5 of 5
(5,094 Views)