LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polymorphic VI is not adapting to type automatically

Actually I was searching for a polymorphic VI with dynamic dispatch input in order to have the same member VI, which can output different datatypes. But since this seems not to be possible I added a polymorphic VI, which holds inlined, reentrant, static SubVI's.

 

Why does my Measure Poly VI not automatically adapt to the indicators type.
It can switch from VAR to numeric, but not to DBL in particular automatically.
Is this a bug? 

 

Quiztus2_0-1711306868037.png

Measure DBL.png

 

Actor Framework
0 Kudos
Message 1 of 5
(505 Views)

Polymorphics can adapt to inputs, but not to outputs.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 5
(471 Views)

Which mechanism does the 'Variant to Data' then use to adapt to it's output?

 

Actor Framework
0 Kudos
Message 3 of 5
(434 Views)

@Quiztus2 wrote:

Which mechanism does the 'Variant to Data' then use to adapt to it's output?

 


Such "back type propagation" is a very specific thing of the "Variant to Data" primitive, you can't get this with polymorphic nor malleable VIs without dedicated input, which will give the information about desired type.

I think, you shall be (probably) able to achieve your goal with XNode, unfortunately I haven't working example in my hands. Use this doc as "getting started" - Labview Xnode output Adapter.

 

0 Kudos
Message 4 of 5
(422 Views)

Yes here is a thread on LAVA where AQ talks a bit about it.  In that thread I link to my Variant Repository which is a set of XNodes for reading and writing variant attributes and it has this backwards type propagation.  Pretty neat, but a decent amount of work and uses XNodes which aren't an official technology that NI supports outside of ones they make.

0 Kudos
Message 5 of 5
(395 Views)