NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock SequenceFilePostResultListEntry

hi,

 

I do custom results  i.e. in TDMS format & use the SequenceFilePostResultListEntry.

 

I am using the sequential Model.

 

To save  on  time I would like that  this   engine callback   runs  as a different thread so it can run parallel to my  steps.

Also I would like to lock  it so  2 consecutive steps which save results ((additional results))   can do so  one after other

 

I know I can create a Lock-Synchronization  step in this Callback.

 

But by any means can I just Lock & run the engine-Callback as a new thread .

 

Should I be doing this in the SequentialModel.seq file?

0 Kudos
Message 1 of 3
(4,551 Views)

You could save the last thread reference in a file global, then, each time you enter the callback, do something like the following:

 

 

If (FileGlobal.postResultThread != Nothing)

WaitForThread(FileGlobal.postResultThread); /// use a wait step.

FileGlobal.postResultThread = Nothing

Endif

Call Sequence in a New Thread (store thread reference in FileGlobal.postResultThread)

 

Don't forget to shutoff result collection for all of the sequences in your postresult callback.

 

The above will allow up to one sequence to run in parallel at a time. If another one tries to run before the first one is finish, it will wait.

 

Hope this helps,

-Doug

 

0 Kudos
Message 2 of 3
(4,543 Views)

thnks doug

 

 

have u written any topic in the Teststand advanced archtecture series -- just   for info

0 Kudos
Message 3 of 3
(4,539 Views)