NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

queue a dynamic container type

Solved!
Go to solution

Hi,

 

I have several threads running, each waiting for an input queue (queue names are numbered  by threads: "Queue0", "Queue1", ...) and expecting an individual container type as input in the queue.

I have variables for all these input containers, also numbered by threads: FileGlobals.Input0, FileGlobals.Input1, ...

Now I would like to send these input containers through the queues to the various threads in a loop in TestStand, e.g., something like (in pseudo code representing steps in a sequence):

 

for thread = 1 to n

Enqueue(Queuename= Str(thread, "Queue%d"); Element to enqueue: Str(thread, "FileGlobals.Input%d"))

end

 

I tried to enqueue

FileGlobals.GetPropertyObject(Str(thread, "Input%d"), 0)

and the thread end of the queue gives me an error about an incompatible type being dequeued. I also tried the same with "AsPropertyObject", did not work either.

 

Is there a way to do this?

 

Thanks,

 

Peter

0 Kudos
Message 1 of 3
(3,545 Views)
Solution
Accepted by topic author pwaszkewitz

Hi Peter,

 

Yes it is possible if you use Evaluate().

Just see the example

 

regards

 

juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Download All
Message 2 of 3
(3,531 Views)

Works! Perfectly!

 

Thank you.

 

Peter

 

0 Kudos
Message 3 of 3
(3,523 Views)