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: 

Dequeue a teststand queue with labview

Hello,

 

I'm trying to dequeue elements since a VI that is running in a Thread independent of the mainsequence (Teststand).

 

I :

 

1.- Create a Queue.

2.- Launch the VI in a new trhead (Is a states machine controlated by the queue ).

 

3.- Now in TESTStand mainsequence i will like enqueue elements to give orders at VI. Any idea how to do this?

 

egards,

 

Oriol

0 Kudos
Message 1 of 5
(3,491 Views)

In TestStand you call a VI that is a wrapper for Enqueue FIFO element. (FGV so you have the FIFO reference in a shift register)

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 2 of 5
(3,486 Views)

Using queues only with labview The "Dequeue" function is in standby waiting 2 possible events:

 

1.- Element to dequeue in the queue --> Return the queue element.

2.- The queue is closed --> Return Error.

 

Using a "Reference Object" I don't find how to do this.

0 Kudos
Message 3 of 5
(3,485 Views)

Thxs roderic,

 

The problem is in the labview part.... I don't find a easy way to do the dequeue.

 

Regards

 

Oriol

0 Kudos
Message 4 of 5
(3,483 Views)

Hi,

 

First, the best way is to enqueue a close message so you know it has to close.

 

Second, it returns an error when the queue ref is destroyed =>you just need to handle the error! Maybe the easiest way would be to add a failure post step action to your step (in TestStand) and do whatever exit code you need to perform!

 

BR,

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 5 of 5
(3,464 Views)