NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out that sequence has finished loading?

Solved!
Go to solution

Hello,

i have a custom C#-OPUI to load and execute testplans.

I do this using these funtions:

 

1. ApplicationManager.OpenSequencFile(filename)

2. ???

3.Command TestStart = axSequenceFileViewMgr.GetCommand(.......)

TestStart.Execute(true)

 

The question is now: How do i know that the OpenSequenceFile has finished doing everything?

I need to know that is finished before i run the execute-command.

 

Is there a specail final-event that i can check?

 

Thanks for help

0 Kudos
Message 1 of 5
(3,719 Views)

Have you tried:

 

ApplicationManager.Executing

 

From the TS Help:

Executing Property (Read Only)
Syntax
ApplicationMgr.Executing

Data Type
Boolean

Purpose
Returns True when an execution is running.

 

Seems that would tell you if there are any active executions.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,710 Views)

Hi jigg,

 

Thanks for the info.


In my sequence file, besides the main sequence, I also enabled "SequenceFileLoad" callback. In "SequenceFileLoad" sequence, I added some instruments initialization tests. The goal is to initialize the instruments only once when the sequence file is loaded. Therefore I need to know when the "SequenceFileLoad" is finished or when the sequence file has finished loading.

 

My first idea is to use the event "axApplicationMgr_SequenceFileOpened", but I found that I will catch this event before the "SequenceFileLoad" execution finished.

 

And then, I also found that together with the execution of sequence "SequenceFileLoad", there are 2 events in my C# code: "axApplicationMgr_StartExecution" and "axApplicationMgr_EndExecution" triggered. So I was thinking may be I can use "axApplicationMgr_EndExecution" to determine if the sequence file has finished loading. But the problem is every sequence execution will trigger these 2 events. The main sequence will also trigger these 2 events. So I needs to know the name/ID of the current executing sequence.

 

So Is there a way to read current executing sequence name?

 

Thanks and regards,

0049

 

0 Kudos
Message 3 of 5
(3,701 Views)
Solution
Accepted by topic author 0049

Well, if you read my previous post you'll see that you can just tell if an execution is occuring.

 

However, if you need the name of the sequence file then you can use:

ApplicationManager.Executions (read more about it in the TS help).  Once you have the list you can check the Count (if it's 0 then you know the SeqFileLoad is completed).  Or you can get Items (Executions).  From there you can iterate the items and do pretty much whatever you'd like.  For instance there is a method called Execution.GetSequenceFile.  This will let you know the name of the Sequence File.

 

For more information about the Execution object refer to the TS help.  This should definitely get you pointed in the right direction.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(3,693 Views)

Thanks. I will try that out.

0 Kudos
Message 5 of 5
(3,667 Views)