NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel execution of Python scripts

Hi 
Does someone know if its possible to execute two Python Action steps in parallel?
I already tried so many things and nothing really worked.

  • Tried using seperate sub-sequences started as New Thread.
  • Set Python Setting Interpreter to use "Per Thread".
  • Used on each Action step different intepreter for one step python 3.13 and for the other step 3.14.
    According to this doc entry Python Interpreter Sessions - NI it's recommended to use seperate interpretor but even this did not work.

It's always the same result, when I have a while Loop in one Python script this will blocking.
Does anyone have experience how to execute Python steps in parallel?

Thanks
BR
Kevin

0 Kudos
Message 1 of 3
(115 Views)

Don't have much Python experience.... though still trying to be helpful asking some stupid questions 🙂

 

1.) It's two different script, right?

2.) What do these scripts do?

  • Is this caused by some implicit ressource locking? 
  • Have you tried with a simple script (no hardware or such)
0 Kudos
Message 2 of 3
(91 Views)

Many thanks for your fast reply.
I didn't interact with any hardware, they were just two seperate simple Python scripts with prints and loops to understand the issue.
I tried now to make an example test sequence with example python scripts which I could share here in the forum and now it is working for some reason. I have no clue why it didn't yesterday.
But for now my issue seems to be solved.
I come back as soon I would have the same issue again

0 Kudos
Message 3 of 3
(59 Views)