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
TODA1980
Posts: 4
0 Kudos

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  

.

 

Member
TODA1980
Posts: 4
0 Kudos

Re: Best way to set numeric limit / string test to fail

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

 

 

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