NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Old TestStand Queue Example vs New Queue Sub VIs

Hello All,

 

  I'm working to architect several global queues to transfer data back and forth between Labview and TestStand.  For reference, I was directed to 2 old examples that showed how to create the queue in TestStand, and obtain (connect to) it in Labview.  The examples are shown under the titles "Pass Container in a Queue from TestStand to LabVIEW" and Using Teststand Queues in Labview".  The former is actually based on the latter, with a specialized detail related to containers.  They use Invoke Nodes and Active X calls to interface with TestStand.  

 

  I have successfully operated this example and modified a copy to do the opposite (send data).  The example is old, but it still works on newer systems.  However, I also know of, (and have experience using) the more modern Synchronization Queue Operations in Labview.  As I understand it, these new Sub Vis can be used to accomplish the same function as the old examples.  I have attempted this, but have not been able to get it to work.  I tried several different combinations of the 2 options, but can't seem to find the right one.  I think it is because I can't get the correct reference to the TestStand engine, but I am not sure.  

 

First Question:  Am I understanding this correctly?

Second Question:  How do I translate the ActiveX Object Reference from the examples into a Queue name for use with the new Sub VIs?

 

Thanks much,

GSinMN

 

 

0 Kudos
Message 1 of 9
(6,245 Views)

Which LabVIEW functions are you trying to use? May I also ask why you are trying to do this? If I am understanding your application correctly, you could make a code module with a cluster as an input and pass the container from TestStand into the code module. Then, you can enqueue the elements in the cluster and work with them as needed in LabVIEW.

Jason H
Automated Test Software R&D
0 Kudos
Message 2 of 9
(6,199 Views)

Hello Jason,

 

  Thanks for the response.  I have 2 reasons for this.  First, it is unclear to me when the queue gets released, if it is created by TestStand.  If I were to create it in Labview, then I would know for sure, provided I was able to use the new subVIs (I don't see a method in the ActiveX invoke nodes to release the queue).  Second, my code module already contains a cluster for an input, but it is a rather complicated cluster, and my UUT transfers data at several different rates.  I need the benefits of a queue so that no data or commands are lost.  However, dequeueing a TestStand container as a cluster in Labview does not appear to be as straight-forward as I had hoped, (at least not with the old examples), thus my attempt to use the subVIs from the palette.

 

Long story short:  I need to be able to release the queue, and the queue related subVIs from the palette handle clusters more cleanly.

 

GSinMN

        

0 Kudos
Message 3 of 9
(6,195 Views)

Everything you've done so far to set it up sounds correct. Could you post screen shots of what you have so far?

Jason H
Automated Test Software R&D
0 Kudos
Message 4 of 9
(6,167 Views)

Hello Jason,

 

  I have attached 2 screenshots to help explain my question.  These are merely examples extracted from my implementation, and do not show all of the detail, but they should be sufficient to convey the information.

 

  In the attachment labeled "NewQueue", you will see an implementation with the palette VIs.  You can see that this implementation can easily accept cluster (aka container) data types, and it is easy to see that the queue gets released.  These are the reasons I want to use this implementation.  My problem is that the obtain queue function accepts a queue name, not a queue reference (which is what I need to obtain a queue created by TestStand).

 

  In the attachment labeled "OldQueue" you will see an implementation that uses ActiveX invoke nodes to create references and configure the queue.  This implementation does give the option to define the object as a container type (as shown), but when it comes time to queue the data, there is no "set method" that matches this type.  I do realize that one of the examples that I spoke of in the original post explains how to extract container data, but it only shows how to extract 1 element.  I suspect that if I wanted to extract many elements, I would have to have many loops (or a for loop) and set the data type in each one.  No very clean, and not easy to maintain.  

 

So, to restate my question, I would like to know how (if possible) to use the Synchronization Palette Queue Operators with ActiveX/TestStand references, but I do not know how to combine the 2 implementations.  

 

Thanks again,

GSinMN 

Download All
0 Kudos
Message 5 of 9
(6,123 Views)

Since you are using TestStand queues, there is no Release Queue VI to call. TestStand queues are released when you close the reference to it, as shown in the attached picture. I don't believe much has changed since the mentioned examples were made. What LabVIEW functions are you trying to use that don't seem to work the same?

Jason H
Automated Test Software R&D
0 Kudos
Message 6 of 9
(6,065 Views)

Hey GSinMN,

 

You should be able to pass a container from LabVIEW to TestStand with the following PropertyObject structure:

 

QueueToTestStand.PNG

 

 

Also, Jason is correct that the TestStand queue you are creating in TestStand will be released when the reference is closed. Let us know if you have any more questions about the queues!

Message 7 of 9
(6,044 Views)

Happy New Year All,

 

  It sounds like I have still not made myself clear.  Perhaps if I share some numbers:  I have 22 different clusters that vary in size from 1 element to 49 elements, and determination of which cluster to send is dynamic at runtime.  I do not want to use the Property Object structure to enqueue data because it would require me to create property nodes for every element.  I would like to use the "Obtain Queue"  set of functions from the Sync Palette because they can handle clusters directly without splitting them into elements.  My only problem is that I do not know how to translate the ActiveX object reference into something that the Obtain Queue function can use.  

 

GSinMN    

 

  

0 Kudos
Message 8 of 9
(5,729 Views)

That is a LabVIEW queue so you might have better luck posting to the LabVIEW forum. That said, If you have an ActiveX reference, that would be trivial to store in a TestStand queue. Just create an Object reference PropertyObject, store it in that, and then enqueue the propertyobject.

 

-Doug

0 Kudos
Message 9 of 9
(5,693 Views)