ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Python Script Waiting for Input

Hello everyone,

 

I'm somewhat new to TestStand 2023 and I'm trying to solve a problem that I'm not sure how to pull off.

 

I have a Python script that will write data to a device, and then it will wait for an input. During this wait, I need to power cycle the device. Once the device is power cycled, I can continue through to the end. How can I accomplish this?

I've tried editing the Python script and moving functions around, but it kind of breaks the whole script. I figured there should be a way I can just call main() in Python and let TestStand pass in the input when Python waits for it.

0 Kudos
Message 1 of 2
(524 Views)

Please explain this question with a bit more detail. 

 

As far as I understand it now ,you should be able to separate your functions in python to achieve it via 2 steps instead of 1, ideally having a class inside of your code.

 

Otherwise, if it works for you, you can try to place your python call inside a subsequence and use new thread or execution to run it in the background until it reaches the point you need.

 

luklem_0-1750680794964.png

 

0 Kudos
Message 2 of 2
(493 Views)