Quantcast
Channel: NI TestStand topics
Viewing all articles
Browse latest Browse all 6524

Calling Python functions, some issues.

$
0
0

I am using the python step type in TS 2016 32 bit version. Currently working with Python 3.6.x

I want to first start by saying I have gone through the examples provided and understand how they work.

First I initialize my object reference to the class that I am using.

Next I do something like a "string value tests" and click on "configure Python Step"

I select "Operation Scope" drop down menu and have the option to pick "Class Instance" or "Class static" or "Module."

The problem:

If I pick "Class Static" all the drop menus will populate with my classes and Function names, that's Great!

1. But if i pick "Class Instanced" none of the functions populate. Is this designed this way on purpose  even though my functions are "instanced"?

2. When ever I update my python code and change the name of a function for example; I can see the new function by pressing the "refresh blue icon" but none of the calls to my functions work and i get an error. The error always says "MyClassNameHere object has no attribute MyFunctionHere .....NI_teststand_helper.py line 30"

Essentially what this error is telling me is that TestStand is still holding some reference to my last .py code and cant properly find the updated one. I can delete my .seq file and restart TS and have success calling my edited .py but otherwise that old code is stuck in memory....or something.


Viewing all articles
Browse latest Browse all 6524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>