From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Python Step Types for TestStand Now Available!

I am pleased to announce that the Python Step Types for TestStand are now available for download at ni.com. The Python Step Types are a set of custom step types for TestStand 2014-2017 that features the ability to:

 

  • Execute Python Scripts in TestStand – The Python Step Types for TestStand bring the familiar experience of TestStand Action, Pass/Fail, Numeric Limit, Multiple Numeric Limit, and String Value Test steps to Python code. These step types support calls into module functions, getting/setting module attributes, creating class instances, calls into class member or static functions, and getting/setting class member or static attributes.
  • Interpreter Session Management – Python scripts will run outside the TestStand process, in a separate process that hosts the CPython interpreter. Use the advanced session management options to support running multiple instances of the interpreter to enable parallel testing with Python.
  • Support for Python 2.7 and 3.6 – You have the freedom to use either Python 2.7 or 3.6 with these step types. Combined with the interpreter session management features, you can run scripts in Python 2.7 and 3.6 simultaneously.
  • Convert Data Between Python and TestStand – The Python Step Types support passing numeric, enum, boolean, string, container, and array data between Python and TestStand. Data is converted to each environment's native structures, such as mapping Python tuples to TestStand containers. You can also store and reuse Python objects in TestStand object reference variables.

You can go online now at ni.com/downloads to download the step types!

 

Kevin F.

Product Support Engineer | Automated Test Software

National Instruments

Message 1 of 24
(7,368 Views)

I am having difficulty using these python step types. Are there any examples or documentation as how to configure these step types

0 Kudos
Message 2 of 24
(7,207 Views)

Hi jimbo50,

 

Yes, the Python Step Types ship with a help document and a set of examples to help get you started with them. You can find the examples at:

C:\Users\Public\Documents\National Instruments\<TestStand Version>\Examples\Custom Step Types\Python Step Types

 

and the help PDF by pressing the help button on the step settings dialogs or on disk at:

C:\Users\Public\Documents\National Instruments\<TestStand Version>\Components\StepTypes\NIPython\Help

 

Best,

Kevin F.

Product Support Engineer | Automated Test Software R&D

National Instruments

0 Kudos
Message 3 of 24
(7,204 Views)

Hi Kevin,

 

I am seeing an issue with the formatting of the window and am hoping you could help me. See attached image for issue.

 

So far I have tried uninstall and reinstalling the custom step type but that did not help.

 

Using 32-bit TestStand/Labview on Windows 7.

 

Thanks,

Geoff

0 Kudos
Message 4 of 24
(7,059 Views)

Hey Geoff, 

 

Do you have Python 2.7 or 3.6 installed? If you do, you can just type "2.7" or "3.6" into the Version input. Make sure that the paths to the appropriate version of your python.exe is in the PATH environments configuration. 

0 Kudos
Message 5 of 24
(7,048 Views)

Hi,

 

For clarity the issue I have is not the options. I am able to get the step to work properly, however the formatting of the window is messed up making it a pain to work with. Including missing the parameter value text box.

 

Thanks,

0 Kudos
Message 6 of 24
(7,046 Views)

I see! Thanks for clarifying. I'll sync up with the team internally to see what is causing this.

0 Kudos
Message 7 of 24
(7,042 Views)

Hi Geoff, 

 

Can you follow this KB and see whether it resolves the issue? 

0 Kudos
Message 8 of 24
(7,033 Views)

Hi,

 

Unfortunately this didn't fix the issue for me. To make sure I followed the procedure correctly the manifest file should be linked to the SeqEdit.exe file, is that correct? Just want to make sure that there is not another underlying exe file that I should be naming the manifest file after. 

 

thanks,

Geoff

0 Kudos
Message 9 of 24
(7,028 Views)

Hi Geoff,

 

After setting the registry key you are correct that the manifest file should be for SeqEdit.exe, making the file called SeqEdit.exe.ini. You'll also need to restart your system to make the change take effect.

 

Finally, use the settings in manifest.zip not manifest_v2.zip. The v2 version sets the DPI-awareness to "True" which re-enables the OS scaling.

 

Kevin F.

Staff Product Support Engineer | Automated Test Software

National Instruments

0 Kudos
Message 10 of 24
(7,020 Views)