cancel
Showing results for 
Search instead for 
Did you mean: 

Variant of 1d array

SOLVED
labmaster
Active Participant
Solved!

Variant of 1d array

I met a situation two type of data array, dbl (converted data) and I16 (raw data).

I want to make a subvi for two types of data.

The coversion steps with array manipulation functions are very similar in each data type.

 

It doesn't seems to use a variant data type in array manipulation functions.

 

Do I have to make the subvi separately?

However, I have to consider the speed of conversion.

 

labmaster.

3 REPLIES 3
GerdW
Knight of NI
Solution

Re: Variant of 1d array

Hi labmaster,

 

what about using polymorphic vis? Make one for the DBL case and one for the I16 array, then create a polymorphic vi for both cases...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
labmaster
Active Participant

Re: Variant of 1d array

At last, polymorphic vi was opened to a user.. I didn't know it.

That's what I wanted.

Can you feel some difference in speed comparing to that of single vi?

Anyway, thank you.

 

labmaster.

Highlighted
Knight of NI

Re: Variant of 1d array

There really isnt'a difference. The polymorphic VI is just a shell. The compiler will use whichever one is appropriate for the data type of the wire that's fed to it. If there's no exact match then the first one in the list is the one that will be used.
Message Edited by smercurio_fc on 05-31-2009 08:27 PM