From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to handle Termination when using DQMH modules in TestStand - Suggestions ?

Hi,

I decided to use DQMH modules with TestStand for a new project.

 

As advised, I used round trips requests to query my modules from my test sequence and get answers from them.

One instrument (communication handled into its DQMH module) is very slow (10s of seconds) to answer to queries. So the round trip request has quite long timeout (max answer time + margin).

 

Now it comes the time to handle termination requested by an operator (terminate button). What are your tips to do this ?

 

Here are some facts and toughts :

  • The timeout being a notifier timeout within the request VI, when it starts waiting for an answer I cannot interrupt it.
  • I should be able to handle when a user ask for a socket to terminate while letting the others running (batch or parallel process model)
  • I should launch and stop the DQMH modules at the 'accurate moment' in my station test execution so I might use PreUUTLoop callback(sequential model) or PreBatchLoop callback (in case I'm using a BatchModel)

I came to the point that I should modify the RoundTrip request by externalising the timeout (so I can set it from my sequence), and looping around the notifier with steps of 100ms (this value is empirical and just an exemple). While looping I can use the Termination Monitor to check if the sequence is terminating. If so, I can stop looping around the notifier and actaully release the steps execution so that TS can terminate the sequence.

Moreover, this way I avoid specializing the module core with the TS API call and handling (would require an helper loop or calling the termination monitor in every MHL cases requiring it). It only specializes round trips requests that I will only use in TestStand.

 

What are your toughts about that ?

Am I missing something ?

Would you do it another way ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 1
(667 Views)