NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can data analysis be done in a separate thread?

I want to minimize the total elapsed time required for a series of tests. If I don't want to take time at the end of each test to analyze and limit-test the measurements, can I put this into a separate thread to be done while the main test thread is waiting on instrument I/O?

 

Thanks in advance for helpful responses.

 

David Friedman

Sr. Principal Engr.

Symtx, Inc.

Austin, TX

0 Kudos
Message 1 of 5
(3,309 Views)

Hey David,

What type of analysis are you doing and how are you doing your analysis currently? Could you post a simple example or a screenshot of what you are doing?

 

If you separate your analysis and instrument I/O then you should be able to pass the analysis step or sequence the required information and let it go. If you place the steps you want to run in a different thread into a subsequence then you can call this in a separate thread by using a SequenceCall step and changing the Execution Option to "Use New Thread."

 

Lars

0 Kudos
Message 2 of 5
(3,286 Views)

OK, that essentially answers my question, and thanks for your response. So if I understand correctly, TS has a mechanism for overlapping the analysis with the measurement I/O of the next test, so as not to take time in the main test sequence.

 

Is it possible to set the priority of the new theread to just below that of the main thread, so as not to delay the main thread? And is there any time overhead in the SequenceCall with Use NewThread?

 

David Friedman

Sr. Principal Engr.

Symtx, Inc.

Austin, TX

 

0 Kudos
Message 3 of 5
(3,279 Views)

Hey David,

I'm not exactly sure what you mean by "overlapping". By default, TestStand is going to run your sequence sequentially by executing your steps one at a time. Now if you have time intensive analysis that has to be done, then you should probably separate this from your Measurement I/O and run them in their own threads.

 

Setting the thread priority of particular threads is quite easy. In the step types window, under Synchronization>>Advanced you will find a Thread Priorty step type. If you put this step in the thread that you want to have higher priority, and configure it to set the priority to something above Normal.

 

Lars
0 Kudos
Message 4 of 5
(3,257 Views)

By "overlapping" I meant doing the post-measurement analysis concurrently (maybe that's the word I was looking for) with the measurement phase of the next test, during the instrument I/O waits, rather than in-line, which would increase the total time taken by the test sequence. Putting the analysis in a separate thread is precisely what I was thinking of doing.

 

Where priority came in is that I don't want the analysis thread to cause the main (measurement) thread to run more slowly, so I want to give the analysis thread a lower priority - or give the main thread a higher priority, which will definitely make it run in the minimum possible time.

 

I have to apologize for not being more familiar with the facilities of TestStand, but this speedup project came up and I'm the one who has to make it happen. In any event, it looks like what I want to do is within TS's capabilities, so thanks again for your helpful responses.

 

David Friedman

Sr. Principal Engr.

Symtx, Inc.

Austitn, TX

0 Kudos
Message 5 of 5
(3,254 Views)