NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Error Message back before report generated with NationalInstruments.TestStand.Interop.API

I'm using NationalInstruments.TestStand.Interop.API in a VB.NET program and able to get back step results from ResultList as expected when sequence ran without error. When error happened, I could not get 'Error Message' (as shown in the image attached) back. Please shed night on how to get Error Message back before report generated. 

Thanks a million!

 

 

0 Kudos
Message 1 of 4
(2,555 Views)

Hi!

Did you check this post, he is using the RunState.PreviousStep.Result.Error.Msg" to access the
errorMsg or error code.

 

Also, there is good documentation here: Ignoring Errors in TestStand

In the following link, in chapter 4 they talk about error handling. 

0 Kudos
Message 2 of 4
(2,523 Views)

Andr3s_Br3n3s

Thank you for your reply!

 

I tried to check out 'RunState.PreviousStep.Result.Error.Msg' but it did not work in my case, because I'm working on a plug-in which is called as the last step in the sequence to take all of the step results to insert into a database in our MES. Hence it is likely not the Error of PreviousStep.

 

We do not want to create a TestStand report while want to get Error information as in report generated (as in the image attached) before execution finished if possible.

 

Please continue help.

 

Thanks,

0 Kudos
Message 3 of 4
(2,509 Views)

Hi !

Maybe, you can call an engine callback, so you can call a certain sequence before and after the execution of individual steps, a post-step callback you could use, and check if there is an error. if there is an error do something if there is not keep running.

 

 

0 Kudos
Message 4 of 4
(2,487 Views)