From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Executing a Sequence with process model in LabVIEW

Hello everybody,

I would like to run a specific Sequence from a Specific file with the stations default process model. I've managed to wire some blocks together which seem to make sense to me. However the VI is not working as intendet because the "New Execution" always gives me the error -17320, telling me TS was unable to find the Sequence. I am certain, the correct name is passed, so why this error? Are my other parameters incorrect or is this completely the wrong track anyway?


Greetings
Tarik

Singlesequence.jpg

0 Kudos
Message 1 of 11
(5,602 Views)

I really would appreciate help with this one, can't even get the example "Execute With Process Model" running. Did I do something wrong or why is noone trying to help me?

0 Kudos
Message 2 of 11
(5,555 Views)

I guess my question would be: Why are you not using the User Interface as your template?  All of the source code is there for you and it ships and installs with TestStand.

 

Regards,

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

If you aren't familiar, here is a document that talks about the UI:

 

http://www.ni.com/white-paper/7560/en/

 

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

The User Interfaces I have seen so far always directly connect the VI-buttons to the TestStand commands. Unfortunately we cannot use this for several reasons and have to work with API only.

 

So far this has been no problem: I can load sequencefiles and start executions via entry point and run even a single sequence without a process model. I also managed to handle UIMessages but I lack the skill/experience to implement the execution of one sequence from a sequence file with a process model. Will you help me with that?

0 Kudos
Message 5 of 11
(5,541 Views)

There is an example that demonstrates this called TestStand UI with Native Controls.  You can strip a lot of it out to get what you want.  It shows how to use the API to dynamically execute sequence files:

 

C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\Examples\Modifying User Interfaces\Building a TestStand UI with Native Controls\LabVIEW

 

It is located there on my machine.  Specifically look at the Open Button and Execute cases in the Event Structure.

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

Thanks, but as I wrote, I am able to execute the MainSequence of a SequenceFile. But how do I execute the Sequence XY of the same SequenceFile?


There is an Example under

C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\Examples\TestStand API\Executing Sequences Using API\LabVIEW called Execute With Process Model.vi which contains the code I think I need, but somehow I fail at implementing it because the block IEngine.NewExecution always returns "file not found".
As you can see I work with the enginereference not the sequencecontext and do not use the block IEnginge.FindFile. Could this be the error?

0 Kudos
Message 7 of 11
(5,504 Views)

Why are you using Execute With Process Model.vi if you are trying to call a sequence that is not MainSequence?

 

It shouldn't matter where the engine comes from.  As long as it is a valid engine you should be fine.

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

@~jiggawax~ wrote:

Why are you using Execute With Process Model.vi if you are trying to call a sequence that is not MainSequence?


Because I thought that was the whole point of this VI - to run any given sequence with a process model, the same as one can run "Execute Without Process Model" to start any sequence whithout one. Or was that a misunderstanding? If you ask not why this vi but why at all I am trying to do this: I want to implement a single-test, where I just test one function of the device under test. 

0 Kudos
Message 9 of 11
(5,448 Views)

It doesn't make sense to run "any given" sequence with the process model.  The reason is that the process model will only invoke callbacks from the client file.  So if you try and run a Normal sequence (the teal blue kind) with the process model it will never get called.  This is why I asked the question.  And to be clear, the process model needs an entire sequence file as the client.  It cannot run with just a sequence.  If you want to run a sequence by itself then you need to start an interactive execution.  That's why I suggest you look at the example with No Process Model.  Here is some more info on it: http://zone.ni.com/reference/en-XX/help/370052H-01/tsapiref/infotopics/app_executing_a_sequence/

 

Hope this helps,

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 10 of 11
(5,435 Views)