NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Concurrent run of LXI instrument​s self-test/​measuremen​t problem in Teststand

Solved!
Go to solution

I have almost the excat same question and problem as already posted under this link:

https://forums.ni.com/t5/NI-TestStand/Concurrent-run-of-LXI-instruments-self-test-measurement-proble...

Only difference ist, I'm using the IVI-COM driver with .NET steps and not CVI.

Has someone an idea how to solve this?

0 Kudos
Message 1 of 4
(3,076 Views)
Solution
Accepted by topic author Vince_CH

TestStand execution threads are by default MTA from a COM perspective, see this help topic for more information:

http://zone.ni.com/reference/en-XX/help/370052M-01/tsapiref/infotopics/thread_concurrency_models/

It might be that the OS is funnelling the COM calls for the instrument to an STA thread due to the design of the instrument driver, and that is causing the serialization that you do not want. A quick test would be to spawn off new STA threads using Sequence Call steps in TestStand, one for each of the two calls that you want to perform. The rationale is that the OS would not need to funnel the instrument call to an STA thread if the call is already in an STA thread.

Scott Richardson
0 Kudos
Message 2 of 4
(2,752 Views)

Hi Scott, thank you for the fast response.

I tested it yesterday and it works now.

To be honest I don’t really understand what STA is doing and how it works. But that’s a point I have to dig deeper to understand the behavior.

0 Kudos
Message 3 of 4
(2,752 Views)

Great, thanks for letting me know.

Searching the internet you will find lots on STA vs MTA threading models. Here is a KB from Microsoft that might be a good start: INFO: Descriptions and Workings of OLE Threading Models.

Scott Richardson
0 Kudos
Message 4 of 4
(2,752 Views)