NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ExecRunState_Paused

I would like to run sequence files using the .Net API in C#.
I create an NewExecution object, but when asking for the status using ex.GetStates it directly goes to ExecRunState_Paused.
How can I continue the sequence? Is there an event coming up and it is waiting for an user input which I don't see maybe?

Thanks, Stefan


                                APIPTSEngine.GetSequenceFileEx(_testSequence, 0, NationalInstruments.TestStand.Interop.API.TypeConflictHandlerTypes.ConflictHandler_Prompt);
                                //get seq file name and path from C:\InterLab\PTS\config\StartTest.xml

                              
                                NationalInstruments.TestStand.Interop.API.SequenceFile APIseqFile = APIPTSEngine.GetSequenceFile(_testSequence, 0);
                    
                                NationalInstruments.TestStand.Interop.API.SequenceFile APIseqFileModel = APIseqFile.GetModelSequenceFile(out sModeldescription);

                                NationalInstruments.TestStand.Interop.API.ExecutionRunStates currentTestRunStatus;
                                NationalInstruments.TestStand.Interop.API.ExecutionTerminationStates currentTestTerminationStatus;
            
                               ex = APIPTSEngine.NewExecution(APIseqFile, "Single Pass", APIseqFileModel, false, 0,null,null,null);
                                ex.GetStates(out currentTestRunStatus, out currentTestTerminationStatus);
0 Kudos
Message 1 of 3
(3,154 Views)
It sounds like you may have the Break on First Step option enabled on your station.

Allen P.
NI
0 Kudos
Message 2 of 3
(3,148 Views)
If understand that correctly, I need the ApplicationMgrClass to enable or disable the break?
I'm not quite sure how the ApplicationMgrClass and the Engine Class are working together.
You can not use the Engine Class just by its ownwithout creating an ApplicationMgr object before?

I have tried the following:
            NationalInstruments.TestStand.Interop.UI.ApplicationMgrClass myApplicationMgr = new ApplicationMgrClass();
            NationalInstruments.TestStand.Interop.UI.SequenceFileViewMgrClass mySeqFileViewMgr = new SequenceFileViewMgrClass();
           
            myApplicationMgr.OpenSequenceFile("C:\\temp\\tc_6_1_1_4.seq");
            mySeqFileViewMgr.GetCommand(CommandKinds.CommandKind_RunCurrentSequence, 0).Execute(true);


But I receive an exception for .OpenSequenceFile("C:\\temp\\tc_6_1_1_4.seq"); the file and the folder exists.

Is there a document or an example how to use the ApplicationMgrClass and the Engine class?
Basically I only want to perform the comlete seq file without any breaks.
And I want to poll for the status using the GetStates method from the Engine class.

BR
Stefan

7 layers AG
0 Kudos
Message 3 of 3
(3,133 Views)