NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

calling labview array of string dll in teststand

hai,
  can anybody guide me how to call a dll which contain array of strings in teststand? i have attached the dll(str_arr without extension) and its labview program. i got a message when i choose dll function which i have attached.
i am using Labview 7.1 and Teststand 4
 
thank you
Download All
0 Kudos
Message 1 of 5
(3,799 Views)
Hello Assumptha,

It sounds like you are trying to pass strings from a dll to TestStand.  With any dll, you do not want to pass out a reference to memory created inside the dll, which is what your dll would mostly do (I am assuming the VI you attached would be complied into a dll).  Also, you might want to consider calling the VI directly from TestStand instead of compiling the LabVIEW code into a dll?

Also, if you want to pass strings to TestStand from LabVIEW, I would recommend using the TestStand API, namely SetValString, to set TestStand's memory directly from your VI (or dll).  I hope this helps!
Best Regards,
Software Engineer
Jett R
0 Kudos
Message 2 of 5
(3,770 Views)
hello JettR,
   thank you, using "SetValString" i can work with string but i want array of strings from dll. i can get or set array of numbers but why not array of strings? could u explain in detail more?
 
 
thanks
assumptha
0 Kudos
Message 3 of 5
(3,753 Views)
Hey Assumptha,

There is a great knowledge base on three different methods for creating a new array in TestStand memory.  How Can I Programatically Create a TestStand Array?  Once you create an empty (string) array, you can call SetValString to set the individual elements.  Below is an example that inserts a new element into an empty array (or replaces the first element if it already exists).  I hope this helps!

myNewStringArray.AsPropertyObject().SetValString("[0]", 1 /*This inserts if missing*/, "My first element at myNewStringArray[0]")

You may not need the "AsPropertyObject()." in all languages.
Best Regards,
Software Engineer
Jett R
0 Kudos
Message 4 of 5
(3,722 Views)

hi,

 Thank u for ur help and sorry for delay. The following link help me to solve this problem

http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67?OpenDocument

assumptha

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