10-14-2025 07:45 AM
Hi everyone,
I’m integrating a LabVIEW VI into TestStand and would like to design the VI so that it can process both single numeric values and numeric arrays — but using only one input terminal on the VI.
In other words, depending on the test step, I might want to pass:
a single number (e.g., 5.2
), or
an array of numbers (e.g., [1.1, 2.2, 3.3]
)
I’d like the same VI input to handle both cases automatically, without needing separate terminals or separate polymorphic instances.
What’s the best way to implement it so that TestStand can pass either a scalar or an array seamlessly to the VI?
Thanks in advance for your help!
10-14-2025 12:48 PM
Use a variant in the VI. Variant can take any data type.
Convert variant back to numeric/array, the one without error is the actual input.
See attached VI in LabVIEW 2018.
10-15-2025 06:33 AM
@zou wrote:
Use a variant in the VI. Variant can take any data type.
Convert variant back to numeric/array, the one without error is the actual input.
See attached VI in LabVIEW 2018.
Hey zou thanks for your reply.
We get a smiliar solution like yours but we are not so happy with that because we think its not a nice solution to try out which type it is...
If you have a interface which can include multiple tpyes like numeric, numeric arrays, strings, array of strings, containers (clusters) how would you handel that?
And if you take look at the variant information passed by teststand you can see the datatype but I didn't find a solution to get this typeinforamtion to convert it to its LabVIEW Datatype.
10-15-2025 09:30 AM
> If you have a interface which can include multiple tpyes like numeric, numeric arrays, strings, array of strings,
> containers (clusters) how would you handel that?
Already show you how in my VI. That's how NI determine what data type is.
> And if you take look at the variant information passed by teststand you can see the datatype,
> but I didn't find a solution to get this typeinforamtion to convert it to its LabVIEW Datatype.
I know you can see the data in the variant. But this is not documented. NI could change it in next release.
10-15-2025 05:58 PM
It would be a lot easier if you can specify the data type in your sequence.