06-02-2009 04:17 AM
Hej NI Community,
I have programmed an stand alone application, which can execute sequence files. The CVI application is programmed with CVI 7.0 and Teststand API 4.0. You can select a sequence file and run the application without the SequenceFileEditor...
My sequence file is programmed under Teststand 4.1 and uses sequence file library functions, which are developed with Teststand 4.0 (stored in different sequence files).
I can run the sequence file under Teststand 4.1 (SequenceFileEditor) without any error messages. My own application cannot run the sequence file. The function TS_EngineNewExecution comes back with a error message:
_______________________________________________________________
Error code: -2147352567
CA automation error string: Ausnahmefehler aufgetreten.
Teststand API error information:
wCode: 0
sCode: -17329
source: TSAPI
description: Error loading step 'In-Circuit-Test' of sequence 'MainSequence' in file 'bscan_demo.seq'.
Error loading step 'Insert name of step into operator interface' of sequence 'Load and run ICT program' in file 'Test_Library.seq'.
Type 'NumericLimitTest' is invalid because it conflicts with the existing type of that name. To avoid this error message, you should open the file with the type conflict in the Sequence Editor and resave it.
The sequence file 'C:\Program Files\Sequences\Utility_Library.seq' could not be loaded.
helpFile:
helpContext: 0
errorParamPos: -1
_______________________________________________________________
I can resave the sequence to avoid this message. My own application can execute the sequence file after resaving. The library is saved now in Teststand 4.1 format. But this is not my interest.
Can anyone tell me, why the sequence editor (4.1) don't show me any error? How must I program my own application to avoid this error message?
Thanks a lot.
Solved! Go to Solution.
06-04-2009 04:23 AM
Can you load the sequence file in your application without an error? Then you could try loading it in your application and saving it programatically before running it.
Regards,
06-04-2009 04:56 AM
Is your OI and SeqEditor on the same system or is one only on a target system.
Regards
Ray Farmer
06-08-2009 02:30 AM
The SeqEditor and my OI are installed on the same system. TSAPI is not included in my app. So my OI uses the actual activated Teststand Engine.
Should I post my code?
06-08-2009 04:14 AM
Hi,
If you can.
Regards
Ray Farmer
06-09-2009 01:10 AM
Hej,
I'm posting my tracefile. I think its easier to unterstand. Here are tracing with the error:
0.000s Program started
0.000s Tracing started
0.002s Function LoadPanel finished with no errors
0.000s Initialize Teststand Engine
0.892s Function --> TS_NewEngine finished with no errors
0.000s Function --> TS_EngineRegisterUIMessageCallback finished with no errors
0.001s Function --> TS_EngineSetProperty finished with no errors
0.000s Function InitEngine finished with no errors
0.000s Start login process
0.000s Function --> TS_EngineNewPropertyObject finished with no errors
0.000s Function --> TS_PropertySetValBoolean finished with no errors
0.000s Function --> TS_PropertySetValBoolean finished with no errors
0.030s Function --> TS_EngineCallFrontEndCallback finished with no errors
0.000s Function --> TS_ExecutionGetProperty finished with no errors
0.000s Function CallLoginLogoutCallback finished with no errors
0.000s Show panel behind logon panel
0.017s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.003s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.011s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.224s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.247s Waiting for Login
0.500s Waiting for Login
0.086s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_ExecutionGetProperty finished with no errors
0.005s Logon process done
0.000s Check user
0.000s Function --> TS_EngineGetCurrentUser finished with no errors
0.000s User can run any sequence
0.000s Function CheckUserPrivilege finished with no errors
0.000s Open sequence
0.000s Show file select popup window
1.297s Function --> TS_EngineGetSeqFile finished with no errors
0.000s Sequence file path is:
0.000s c:\Program Files\Spectral Electronic\SW-ITS\Projects\BScan_Demo\bscan_demo.seq
0.000s Function OpenSequence finished with no errors
0.000s Check sequence
0.000s Function --> TS_SeqFileSequenceNameExists finished with no errors
0.000s Function --> TS_SeqFileSequenceNameExists finished with no errors
0.000s Function --> TS_SeqFileSequenceNameExists finished with no errors
0.000s Function --> TS_SeqFileSequenceNameExists finished with no errors
0.000s Function --> TS_SeqFileSequenceNameExists finished with no errors
0.000s Function --> TS_SeqFileSequenceNameExists finished with no errors
0.000s All sequences found, iStartSequence automatically true
0.000s Function CheckSequence finished with no errors
0.000s Start execution of loaded sequecence
0.248s Function --> TS_SeqFileGetModelSeqFile finished with no errors
3.123s An error has occurred in function: --> TS_EngineNewExecution useProcessModel
Error code: -2147352567
CA automation error string: Ausnahmefehler aufgetreten.
Teststand API error information:
wCode: 0
sCode: -17329
source: TSAPI
description: Error loading step 'In-Circuit-Test' of sequence 'MainSequence' in file 'bscan_demo.seq'.
Error loading step 'Insert name of step into operator interface' of sequence 'Load and run ICT program' in file 'Test_Library.seq'.
Type 'NumericLimitTest' is invalid because it conflicts with the existing type of that name. To avoid this error message, you should open the file with the type conflict in the Sequence Editor and resave it.
The sequence file 'C:\Program Files\Spectral Electronic\SW-ITS\Sequences\Utility_Library.seq' could not be loaded.
helpFile:
helpContext: 0
errorParamPos: -1
0.015s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> CA_CreateObjHandleFromIDispatch finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
0.000s Function --> TS_UIMessageGetProperty finished with no errors
4.303s An error has occurred in function: ExecuteSequence -> Test UUTs
Error code: -1
Error message: No error message
0.628s Start free all resources
1.060s Free all resources done
0.000s Tracing stopped
0.000s Programm ended
06-09-2009 01:17 AM
This is the tracing after resaving. See attachment:
If you have questions about the functions calls, please ask me.
Thank you very much.
06-10-2009 11:12 AM
renr,
Is you standalone application using the Application Manager UI control? If not, your application should be calling TS_EngineLoadTypePaletteFilesEx() after creating the engine. The Application Manager does this for you, but if you are not using the Application Manager control then you need to do it explicitly. If the type palette files are not loaded then you will get whatever version of the types were last saved for the sequence file rather than the version that ships with the version of TestStand you are using. I suspect that this is the problem you are seeing based on the error message you are getting.
Hope this helps,
-Doug
06-11-2009 03:27 AM
06-11-2009 02:06 PM
For anyone else in this situation, or experiencing similar trouble, if you are writing a User Interface directly using the TestStand API, then you will want to reference this help topic:
Writing an Application with the TestStand Engine API
If you are using the TestStand UI controls, which are usually an easier choice, you can reference this help topic:
Writing an Application with the TestStand User Interface Controls