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 set numeric limit / string test to fail

At the moment I think about what is the best way to set a fail


Who can do best practice sharing with me?

 

I would use the following sample for better understanding.
http://ftp.ni.com/pub/devzone/epd/cvimeas.zip

 

It is clear for me – how to get some values from a module (called DUT = device under test) and set this value as numeric limit or string test.

 

But for me is not clear - what is the best way to set fail.
For example if a value cannot read from DUT

 

In general the error flag can be used like this

 

testError->errorFlag = TRUE;
testError->errorCode = error;
teststData->replaceStringFuncPtr(&testError->errorMessage, errMsg);

 

but make it sense to set the test to error on all fail – for example if the temperature cannot be read from DUT should we set fail or error?

 

On PASS/FAIL Test it is easy to set ERROR on troubles like “RS232 cannot be opened and FAIL if reading from DUT is not successful.

 

But on numeric limit tests or string tests it is not possible to set fail as result.

 

What is the best way?

  • Set error with the error flag à so result will be often error – for example timeout/ack error on I2C/rs232
  • Set a result which should not be happened in real like “-9999” – you have always the risk that the result of DUT will be the same
  • ……..

Who can share and describe his solution and the advantages and disadvantages?

Thanks
TODA1980  

.

 

0 Kudos
Message 1 of 2
(2,717 Views)

Who can help?

 

Today I discuss this topic very long with my colleque - first we think we use error - later we think this is no good idea.

We are very unsure how to handle it.

 

For better understanding a very easy example --> programmed as numeric limit test

 

+++++

open RS232                                                                        --> if RS232 can not open set error --> this is clear --> generall fault of tester

send a command "get temperature"                                  

waiting for a reply like "tempeature=xxxx"                          --> if message "temperatur=" is not received, what should be done???  (error or set a stupid value like -9999)

split response and give xxx back as num                            --> xxx will be given back to teststand and numeric limit will calculate pass/fail

close RS232                                                                       

+++++

 

I hope somebody can help

 

 

0 Kudos
Message 2 of 2
(2,695 Views)