06-24-2021 12:08 PM
Hi everyone,
I would like to create a SubVI that allows to import a matrix/vector from a binary file.
My problem is that the output could be a 1D or a 2D array (vector or matrix), depending on the number of columns I give in input to the SubVI (so if I have only 1 column, the output should be 1D, otherwise 2D).
I tried using malleable VIs and "variant", since I saw in one example that the output, in variant format, could be connected directly to a numeric indicator.
However, in my case I still get the problem that the output of my "malleable SubVI" cannot be directly connected to a numeric indicator. I found a solution only by adding the block "Variant To Data", which I would like to avoid in order to facilitate protability and usage by colleagues of the same SubVI and also because the LabVIEW examples do not need such conversion block.
Do you have any correction or suggestion about my VI (attached here)? Maybe with other solutions rather than malleable VIs?
Thank you!
06-24-2021 12:21 PM - edited 06-24-2021 12:29 PM
06-24-2021 01:00 PM - edited 06-24-2021 01:05 PM
Here's a quick draft what you could do (i.e. just use a "type" input where you wire a 1D or 2D DBL array. Probably still needs work to deal with unexpected inputs).