This widget could not be displayed.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Existing Python Code with TestStand

Solved!
Go to solution

I have a test system developed in Python.  I want to be able to use the software that is developed already with TestStand (not all of it, just the calls to devices and instruments).  I am not sure how this would work.  In python or c/c# I would create a resource manager used to talk to the device.  Then use NI Visa driver or a DLL from the manufacturer to send and receive data from the device.  I have used c in the past to create a .dll for this purpose.  My issue is that Python isn't compiled.  I don't make a .dll with it.  The resource managed must somehow be passed from the initialization software to subsequent method calls in Python.  But each python call is like running a new script, right?  How do I do this?  A simple test program/example would be great.  example: TestStand would invoke the python Init of a DMM then invoke a python read of the DMM.  A little help would be greatly appreciated.

0 Kudos
Message 1 of 3
(199 Views)
Solution
Accepted by topic author NIFrustrated

Use the Computer Motherboard Test example. There is a python version.

 

C:\Users\Public\Documents\National Instruments\TestStand [year] (64-bit)\Examples\Demos\Computer Motherboard Test\Python

Message 2 of 3
(180 Views)

Thanks!  It turned out that my main issue was with the protections imposed by my IT department.  Seem that I have to run all NI software as administrator or I get odd errors.  Had similar issues installing it as well.  My IT has locked down different areas of the disk and it causes software to have issues.  I didn't get it figured out until Microsoft Visual Studio also had issues that were similar.  smh  Hard enough to get new tools figured out but when you have 'puter issues impacting things you can get lost in oit easily.  The example helped prove to me that it wasn't me, nor NI, but rather IT!

0 Kudos
Message 3 of 3
(106 Views)