NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Sequences of SequenceFile in a C# Application

HI

 

I have the following Task:

Consuming sequnces of a sequence file "like" a function in a c# application.

 

There is an example shipped with teststand that shows how to do this.

..\Examples\TestStand API\Executing Sequences Using API\DotNet.

Pretty clear that calling it like a c# function will not work of course.

But using just the two API functions  Engine.NewExecution() and Execution.WaitForEndEx() are a great deal to approach it.

 

This is working pretty well for a single sequence.

My problem is that my SequnceFile is a sequnce library with Open, ReadOrWrite and Close architecture. That means "Open" will create IO handles stored in FileGlobals. "Read/Write" consuming them and "Close" finally release the handles.

After the api-function call Execution.WaitForEndEx(). the contents of my file global values are gone and are not accessible for next "calls".

 

I thought about threads. But theads are inside an execution....

.. no idea to achive it.

 

Regards

 

Juergen

 

 

 

 

 

 

 

 

 

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 1 of 2
(2,468 Views)

Hello Jürgen,

 

one idea would be to start an execution of a master sequence which spawns subthreads. That way you'll be able to manage your FileGlobals approach.

 

What are the handles holding, Files/HW handles? If that's the case, you could open the handles in the process model once using a process model callback (e.g. process setup) and access them from your client sequence file.

 

Kind regards

Andreas Gareis
Senior Applications Engineer, NI
Certified LabVIEW Developer & TestStand Architect
0 Kudos
Message 2 of 2
(2,403 Views)