NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems to show IVI driver and Property Loader error messages when using one type of operator interface

Solved!
Go to solution
I am using the Operator Interface (programmed in CVI, with asynchronous timer) in folder OP1 in attached zip file. This operator interface puts not the error message of IVI driver, properts loader etc... on the screen (messages like in attached picture error.jpg in attached zip file). Because of stability problems I am using this operator interface but I need these error message. A Other Operator interface is OP2 in attached zip file. This operator interface puts the error message of IVI driver, properts loader ... on the screen (messages like in attached picture error.jpg in attached zip file). Now I want to have this functionality with OP1 becaus of stability reasons I have to use OP1. How can I implement this in OP1? I tried and searched a lot of time but I have not found a method to implement this. can anyone help me? thank you regards Samuel
0 Kudos
Message 1 of 9
(4,416 Views)

Hi,

 

it tested your bothe CVI User Interface Examples with the Teststand 4.x ivi and property loader examples from

 

C:\Dokumente und Einstellungen\All Users\Dokumente\National Instruments\TestStand 4.1\Examples\IVI

C:\Dokumente und Einstellungen\All Users\Dokumente\National Instruments\TestStand 4.1\Examples\PropertyLoader

 

The Property Loader example works without errors and the IVI example gives a similar error because i had not set the right IVI Settings in MAX (MeasureAutomationExplorer).

 

When i set it here right - then no error with both User Interfaces. Please test your *.seq first in Sequence Editor - when you had here no error - then test it in the User Interfaces.

 

Did you test it in Sequence Editor and what version do you have ? Have you test the existing teststand examples ?

 

Can you attache here your special *.seq file ?

 

Best Regards

 

0 Kudos
Message 2 of 9
(4,386 Views)

The error 1073807195 said, that you called the wrong ressource name in IVI step. Therefore you must look in MAX -> My System -> IVI drivers -> Driver Sessions  -> Hardware.

 

In the Hardware field you see a Ressource Descriptor. The name muste be the Name of Card unter MySystem -> Device and Interfaces -> NI DaqMx or the Name of PXI like in the screenshot i attached here. So the error comes not from your user interface...

 

Best Regards

0 Kudos
Message 3 of 9
(4,385 Views)
Solution
Accepted by topic author sam29

Hello Johann,

I am not sure that you have understood my problem. My problems are not the error messages of the IVI drivers and property loader!! But my problem is, that error messages of IVI drivers and property loader one operator interface brings not on the screen. So to test this you have to provoke an error message of IVI driver or property loader, then you can see that with the one OI you have an error message and with the other OI no error message occures and the test stocks without a message. Do you know why this OI does not show the error messages and how showing the error message can be implemented in this operator interface

regards

Samuel

0 Kudos
Message 4 of 9
(4,367 Views)

Hi Samuel,

 

the first OI looks like the simple OI whose had most features not implemented as the full featured OI. For those you must use an SequenceFailure/StepFailurePost callback whose similar functions should find in tesstand library. Additionally it can be that you need an additionally activeX indicator (find in ActiveX -> Teststand API).

 

I´ve done similar modifying in Labview but not yet in Labwindows/CVI. Must try it the next days.

 

Best Regards

0 Kudos
Message 5 of 9
(4,330 Views)

Hello Johann,

Thank You for your answer.

Is it possible that you give me a feedback, when you have tried it in the next days?

regards

Samuel

0 Kudos
Message 6 of 9
(4,311 Views)

you must implement the error callback - attached here a small example. You can compare the testexec.c with simple.c and see it

 

HRESULT CVICALLBACK ApplicationMgr_OnDisplayExecution(CAObjHandle caServerObjHandle, void *caCallbackData, TSUIObj_Execution execution, enum TSUIEnum_ExecutionDisplayReasons reason)
{
 int error = 0;

 // bring application to front if we hit a breakpoint
 if (reason == TSUIConst_ExecutionDisplayReason_Breakpoint || reason == TSUIConst_ExecutionDisplayReason_BreakOnRunTimeError)
  errChk( SetActivePanel(gPanel));


Error:
 DisplayError(error);
 return error < 0 ? E_FAIL : S_OK;
}

static void DisplayError(int errorCode)
{
 if (errorCode < 0)
  {
  TS_DisplayError(errorCode, errMsg, gEngine); // errMsg is a global, see top of file
  ClearErrorMessage(); 
  }
}

static void ClearErrorMessage(void)
{
  // clear out error message globals so that a future error that lacks an error description does not
  // unintentionally use the error description from a prior error.
 *errMsg = '\0';
 memset(&errorInfo, 0, sizeof(ERRORINFO));
}

0 Kudos
Message 7 of 9
(4,301 Views)

Hello Johann,

I have implemented your suggestion and I get some information in a teststand sequence error window (see right side of attached jpg file) when using the operator interface. On the left side of the attached jpg file you see the error windows the teststand sequence editor gives for the same error. As you can see the windows on the right side do not contain the fields "Error Code" and "Location". Do you know a idea how to implement this?

Thank You

regards

Samuel

0 Kudos
Message 8 of 9
(4,275 Views)

Hi Samuel,

 

not all Callbacks/ActiveXControls have all Properties/Methods you wants to have. For this you can look in the FullFeatured User Interface of Labwindows/CVI

for finding a similar solution for your own User Interface (Operator Interface) 

 

C:\Programme\National Instruments\temp\TestStand 4.1\UserInterfaces\Full-Featured\CVI

 

or in the API Reference Poster for programmatically reading the Error Cluster (ErrorCode, Error Description and ErrorOccured)

via Methods/Properties

 

C:\Programme\National Instruments\temp\TestStand 4.1\Doc\Manuals

 

You can also set a property object to a Step or the Current Execution and then use LookupString for getting the Error Cluster e.g.

 

RunState.Sequence.Main["StepName"].Result.Error.Code

 

So more ways to solution. But needs time and practise for implementation when you not do it before

 

Best Regards 

 

0 Kudos
Message 9 of 9
(4,267 Views)