NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

String Array send to a Variant Input gives System Level Exception -17502

 

hi All,

 

I read the string array[Out] from a VI   &  in the  "SequenceFilePostResultListEntry"  

 

write the various types (num, bool string array)  to  be saved as TDMS .

 

In this  SaveTDMSFile.VI   I write all  the data thr'  a  Variant.

 

It works for all  except String Array where I get the exception!!

 

thts the issue

0 Kudos
Message 1 of 8
(4,909 Views)

Is it the labview vi where the exception occurs or in teststand? If it's the labview vi, can you reproduce the problem without teststand involved? If not, please explain in more detail as I'm not sure what you are doing. Also, what version of LabVIEW and TestStand are you using?

 

-Doug

0 Kudos
Message 2 of 8
(4,902 Views)

Exception is in Teststand.

 

the same vi works good for Num Array, Boolean Array  input

 

when I give a String array   Teststand brings this exception.

0 Kudos
Message 3 of 8
(4,883 Views)

You mean that the parameter on the LabVIEW VI is a variant and you are passing in an array of strings from TestStand and then in the VI using a "Variant to Data" node to convert the value back into an array of strings correct?

 

What version of TestStand and LabVIEW are you using? I'm having trouble reproducing the problem with TestStand 2014 and Labview 2012 SP1.

 

-Doug

0 Kudos
Message 4 of 8
(4,870 Views)

hi Doug,

 

Ans: Yes..

 

I am using Teststand 2012 & labview 2012

 

I get the Issue in Teststand ,  Teststand   doesnt even go in the vi for execution.

 

the png file shows

 

0 Kudos
Message 5 of 8
(4,856 Views)

Is Locals.CurrElement an array of strings or just a single string?

 

I tried with TS 2012sp1 and LabVIEW 2012sp1 and it's working fine for me, both with an array of strings and a single string. Are you using the Variant to Data node to convert the variant to a string array or string? If not, try doing so, since that is what I am doing, and it's working.

 

Here's a screenshot of the code in the VI I'm using. It passes in the string array as a variant and converts it to a string array and passes that back out as an output.

 

forum.png

 

Hope this helps,

-Doug

0 Kudos
Message 6 of 8
(4,829 Views)

Locals.CurrElement   is a container  -  it can handle any type

 

well my variant to data  node is also same.

 

but the problem is not  with  the vi 

as the error happens in testsand  bfore  Teststand goes in the   vi

 

but now tht  it has worked   at your side i have some hope

 

i will surely try it again  

 

thnks

akshay

0 Kudos
Message 7 of 8
(4,818 Views)

If Locals.CurrElement is a container then passing it as a VARIANT will just end up storing the ProperyObject interface in the variant as an IDispatch or IUnknown which is probably not what you want. So I'm still not sure what you are trying to do. It seems like you should either:

 

1) pass the array directly, not a container for CurrElement.

 

or

 

2) Don't use VARIANT as the data type for your VI parameter, use TS.PropertyObject activex reference type instead and use the teststand API to extract the data.

 

Hope this helps,

-Doug

0 Kudos
Message 8 of 8
(4,700 Views)