NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How I can overwrite Open seq method/callback?

I want to create new callback, which loads sequence. The callback should just load the sequence and open it, not execute it.

The reason why I need this kind of functionality is following:

I working with a project, where my part is create OI & process model for a semi-automatic tester.

1. step is read barcode from DUT.
2. step is load correct testsequnce.

3. step is run test sequence (run all) OR just run selected steps on the sequence.

So, does anyone have an example process model that just loads a sequence file (Whitout execution)?
(same way as Open, under the TS's menu works)

My TestStand version is 3.0
0 Kudos
Message 1 of 3
(3,022 Views)
Hello JP,

In your TestStand 3.0 Operator Interface, you can use the OpenSequenceFile method of the Application Manager control to open a sequence file. This will cause the DisplaySequenceFile event to be fired, in which you can assign the sequence file to the Sequence File View Manager control (i.e. SequenceFileViewMgr.SequenceFile) to have it displayed in the Sequence View control on the Operator Interface.

The Sequence Editor is a bit different. You will need to call Engine.GetSequenceFileEx, to get a reference to the sequence file. You can then post a UIMessage with the event UIMsg_OpenWindows along with the reference obtained from GetSequenceFileEx to have the Sequence editor open the file in a new window.

Let me know if this helps.

Bob
0 Kudos
Message 2 of 3
(3,023 Views)
Thanks Bob,

I put three activeX -steps into my callback, and
now it works on the Sequence Editor.

Steps in my callback:

0. Opens my own "file dialog".

1. Step calls Engine.GetSequenceFileEx to get a reference to the sequence file (as you adviced)

2. Step calls Engine.PostUImessage with input parameters are following:
event code: UIMsg_OpenWindows
executionParam: RunState.Execution
ThreadParam: RunState.Thread
ActiveXDataParam: Locals.SequenceFileReferene (this is referance that I get from step 1)

3. Steps calls Engine.ReleaseSequenceFileEx
(first I tried calback whitout this step, and I was't able to close seq. file from TS editor).



--
J.P
0 Kudos
Message 3 of 3
(3,022 Views)