NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Exceute sequence with custom processmodel

I am trying to execute a sequence file from custom operator interface in C# using a custom process model file. I have attached the sequence files that i have used for testing.

Environment

  • Operator Interface in C# (VS2005)
  • Sequence File - Teststand 3.5
    • ProcessModel - Modified SequentialModel.seq (customized to my requirement)
    • In StationOptions, Customized process model is selected by default.
    • In TestStand environment, sequence file works as expected.
Operation Interface - C# Code snippet - execution call

[...]
CurrentSequenceFile = formView.axApplicationMgr.OpenSequenceFile(_sequenceFilePath);
[...]
NationalInstruments.TestStand.Interop.API.SequenceFile processModelFile = CurrentSequenceFile.GetModelSequenceFile(out processDescription);
mExecution = formView.formModel.tsEngine.NewExecution(CurrentSequenceFile, "MainSequence", processModelFile, false, 0x2, pobj, null, null);
[...]

When i use the following statement, mExecution = formView.formModel.tsEngine.NewExecution(CurrentSequenceFile, "MainSequence", null, false, 0x2, pobj, null, null);
sequence file gets executed (without binding to processModel file). But when i give the processModelFile, sequence file is not getting executed.

Question: How to use the function Engine.NewExection() to run the sequence file with specified processModel file?
                  Is there any other method otherthan the one i am using?



0 Kudos
Message 1 of 3
(3,154 Views)
Hi
 
Take a look into the attachment
 
Hope this helps
 
Juergen
 
A note for other users: becareful when opening upper seq. files. Maybe the files affect your NI-StepTypes. So never acept savings Ni_Types when closing TS !!!!
 
 
 
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 3
(3,130 Views)
Thanks for the response.
Got it working.
0 Kudos
Message 3 of 3
(3,117 Views)