NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
mef526
Posts: 19
0 Kudos

Generate a Report from tests in a thread

I put my TestStand test code in a seperate thread and now the reports are missing the tests.

I wanted to have a cancel button so I created 2 threads + the main line process.

The threads are created as an executable using "Use New Execution" and terminated using the automation server.

 

  1. Thread 1. A Cancel button on a message popup.
    If the user click the cancel button then a global flag is set, CancelTests =  True

  2. Thread 2. The actual test code.
    This controls the instruments and takes measurements and does tests.
    The flag: "TestRunning" is set true at the start and set false when complete.

  3. Main Line.
    A while loop that does a 5 second sleep then checks the status of the TestRunning and CancelTests flags.

This all works fine except now the threads fail to log any tests that are in the thread 2.

 

How can I get the test code in Thread 2 to record results?

 

 

Member
Rohama_K
Posts: 163
0 Kudos

Re: Generate a Report from tests in a thread

Hi,

 

Take a look at this KnowledgeBase article, NI Community Example and Developer Zone article.

Hope that helps.

Rohama K.
Applications Engineer
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page