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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing array of strings from teststand to labview dll

Hello,

 

I want to pass an array of strings to a teststand to a labview dll, and get back another array of strings from the dll to teststand. I have tried both standard calling convention and C calling convention by compiling the dll. In TestStand by specifying the module, I tried all the 4 possibilities to handle the array of strings (C String, Unicode String, C String Buffer, Unicode String Buffer). It doesn´t work, I get always an error from TS: -17502, System Level Exception.

 

It would be easy to pass the TS Sequence Context to the dll, but I don´t want to do it, because use the dll outside teststand too.

 

Mitulatbati

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

Hello Mitulatbati,

 

Did you have a look at the following Link? This is an example which, I guess, will exactly show your application:

http://zone.ni.com/devzone/cda/epd/p/id/134

 

Also the following Link might be interesting for you, even the last post. IOt telles you that you can't use char as data type:

http://forums.ni.com/t5/NI-TestStand/pass-char-array-to-c-DLL-and-return-same-char-array/m-p/1499810...

 

I hope this helps.

 

Best Regards

Regina

National Instruments

AE Germany

 

0 Kudos
Message 2 of 5
(3,059 Views)

Hello,

 

Yes, it is working wih the attached dll, which is written in c (or CVI). But I want to change string arrays between TestStand and a LabVIEW dll. This doesn´t work with the settings, shown in the linked sequence.

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

Hi,

 

Sorry for my late reply.

 

I tested your configuration as well and to be honest: It doesn't work either.

I also could not find any possibility to do that. Using complicated data types for DLL can always be a problem.

Does your dll with string array passing work on the other program you mentioned?

 

I am sorry for having no soltuion for you at this moment but I have got a suggestion for you:

You could use the function flatten to string to pass the string to TestStand. Then you don't require an array and this should work for you.

 

 

Best Regards

Reigna

National Instruments

AE Germany

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

Hi Regina,

 

thanks for your post.

 

I have solved it on a different way. I create a comma separated spreadsheet string from my string array, and I pass only this simple string. In the dll I rebuild the string array, and it´s done.

 

regards

Mitulatbati

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