LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass array of clusters from Teststand to labview DLL

I have a labview DLL which accepts an array of clusters as an input. How do i pass an array of clusters from Teststand.I followed this http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67 and managed to pass a cluster to labview DLL. But when i try to pass an array of clusters i get this error -17502; System Level Exception. I have attached my sequence and the DLL.BTW, i already posted this in http://forums.ni.com/ni/board/message?board.id=330&thread.id=883&view=by_date_ascending&page=2, but since it is little bit different the original topic i decided to start anew thread.
0 Kudos
Message 1 of 12
(4,228 Views)
Sorry forgot to attach
Download All
0 Kudos
Message 2 of 12
(4,226 Views)

Hello,

 

Here is a good KB that explains the caveats: http://digital.ni.com/public.nsf/allkb/5FE3C48E8E1C3D018625722900681AF6?OpenDocument

National Instruments
0 Kudos
Message 3 of 12
(4,189 Views)
Thanks for your reply. The KB talks about passing array of clusters from Labview to DLL. What are the steps i should follow in Teststand to achieve the same thing. My labview DLL accepts an array of cluster as an input. Do i need to have an extra parameter in my DLL for the array size as well?
0 Kudos
Message 4 of 12
(4,180 Views)

Hey Sarasvisu,

 

I have not personally tried to do this, but here is another KnowledgeBase that might help a little more.  It specifically talks about structured datatypes being passed to a LabVIEW dll from Teststand, so I'm hoping it's a little more pertainent to what you're trying to do here.  Let me know if it helps and if it solves it, mark it as solved so someone else who's looking to do the same thing in the future can quickly find their answer.  

ColeR
Field Engineer
0 Kudos
Message 5 of 12
(4,148 Views)

Hi Cole Train,

 

Thanks for your reply. I have included that KB in my original post. In fact i learned to pass structs only by looking at that KB. But i could not extend that to pass array of structs.  It would have been nice if that KB talks about array of structs as well. When i create an array of cluster datatype in Teststand, there is no way to mention it is a Labview Array. The only option i have is Pointer to Array and Embedded Array. But for example, when you create an array of string, you can store the array as 1. Labview Array 2. Embedded Array 3. Pointer to Array. For some reason, the labview array option does not appear when you create array of structs.

0 Kudos
Message 6 of 12
(4,129 Views)

It would have been nice if you would have attached the source code for the LabVIEW built DLL. When I attempted to modify your sequence and call the ErrorPrompt function of the DLL, I was prompted with a LabVIEW Front Panel, which I had no idea how to use. I also could not resize this panel. Perhaps you could tell me how I should be using this dialog:

 

frontPanel.png

 

Nevertheless, I made some modifications to the step in your sequence file. Please try this out.

 

I would really appreciate it if you let me know if it works, or if it doesn't work. If it works, I will explain the changes I made. Hope this helps.

 

P.S. The sequence file attached is TestStand 4.2 compatible.

Message Edited by Manooch_H on 03-23-2010 04:46 PM
Manooch H.
National Instruments
0 Kudos
Message 7 of 12
(4,054 Views)

HI Manooch_H,

 

Thanks for your response. I tried your sequence. Though it does not give any error, i am still unable to pass array of clusters to the labview DLL. I have attached the source code, your sequence (modified to suit parameters), and the DLL. I would not mind even if the array of clusters must have a fixed size. 

0 Kudos
Message 8 of 12
(4,044 Views)

Hello Sara -

 

Thank you for attaching your files. I spent a little time attempting to get this working, then I decided to look further into our documentation. Unfortunately, this is currently a Known Issue (158938) and limitation in TestStand. Please see the link below for information on this Known Issue. You can use the Known Issue ID to check the Bug Fix List for future versions of TestStand to see if this issue has been resolved or not.

 

TestStand Known Issue 158938

 

I would like to point out that you can accomplish this task by simply calling a VI. Is there a particular reason you prefer calling a LabVIEW built DLL as opposed to a LabVIEW VI?

Manooch H.
National Instruments
0 Kudos
Message 9 of 12
(4,029 Views)
Thanks for your response. There are other programmers who use Teststand but they do not have Labview installed. Also, when you use Labview VI with Teststand, there are occassions, Teststand loses its activex connection to Labview. That is the main reason for going to DLL. Anyway i will wait for future release and hopefully this will be solved in the future
0 Kudos
Message 10 of 12
(4,012 Views)