LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array into varient

I am trying to pass array of integer from one main vi to sub vi. The array i convert into variant data type. I want to reconstruct the data using variant to data function. I am not able to retrive the array irrespective to data type i set( int or array of int to variant to data ). Wondering what is going on.  

0 Kudos
Message 1 of 12
(4,468 Views)

Can you give an exaple of your code that doesn't work?

 

You need to supply the data type to convert to on the Variant to Data node (input on the top will accept anything).



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 12
(4,461 Views)

Is there a particular reason you are using a variant? Also, as suggested post your code so we can see what you are doing.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 12
(4,446 Views)

@Mark_Yedinak wrote:

Is there a particular reason you are using a variant? Also, as suggested post your code so we can see what you are doing.


my bet is he's passing different types of data....Smiley Happy

 

 

Spoiler
varients.png

 

 

 

0 Kudos
Message 4 of 12
(4,427 Views)

@apok wrote:

@Mark_Yedinak wrote:

Is there a particular reason you are using a variant? Also, as suggested post your code so we can see what you are doing.


my bet is he's passing different types of data....Smiley Happy


That's a good point.

 

Are you getting an error when you try to convert from a variant?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 12
(4,424 Views)

probe shows input is array inside the variant but out put is null 

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

@apok wrote:

@Mark_Yedinak wrote:

Is there a particular reason you are using a variant? Also, as suggested post your code so we can see what you are doing.


my bet is he's passing different types of data....Smiley Happy

 

 

Spoiler
varients.png

 

 

 


Then he will need some key to indicate how the data should be decoded. I was asking because if he is simply passing the array as a variant because it sounds useful is not a very good reason. Polymorphic VIs are more appropriate. Variants are good for generic messaging schemes.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 12
(4,407 Views)

@ssnp wrote:

probe shows input is array inside the variant but out put is null 


Post your code. It is near impossible to give you good advice without seeing what you are actually doing.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 12
(4,406 Views)

show the code......................................

 

Spoiler
did you signify the type of data used on the "variant to data function"?    Smiley Surprised

 

0 Kudos
Message 9 of 12
(4,404 Views)

@Mark_Yedinak wrote:

 

Post your code. It is near impossible to give you good advice without seeing what you are actually doing.



time to pull out the crystal ball again.....I think I have a few more dollars left in my account for the psychic network

0 Kudos
Message 10 of 12
(4,391 Views)