LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

polymorphic output problem

Solved!
Go to solution

Hi,

 

I have a serie of polymorphic VIs, that leads to an output problems (broken arrow), see images.  I would like the case selector to handle 2 two types (purple and light blue) depending of if it is COM port or TCP/IP communication.

 

How can I do that? the select funtion isn't polymorphic enough ...

 

Thanks

 

FB

 

Download All
0 Kudos
Message 1 of 10
(5,578 Views)

Upload your actual VI(s), we cannot help by only looking at a screenshot...

0 Kudos
Message 2 of 10
(5,558 Views)

here they are, the VIs

 

fb

0 Kudos
Message 3 of 10
(5,539 Views)

Use a variant.

 

George Zou
0 Kudos
Message 4 of 10
(5,523 Views)

Thanks Zou,

 

Thanks for the reply, have you an idea on how to do that?

0 Kudos
Message 5 of 10
(5,501 Views)

http://www.ni.com/white-paper/4998/en/ 

 

You can use the Variant as input or output for your subVI. You just need to know what is the expected data type to make the conversion. In this way you can use (almost) any data type...

0 Kudos
Message 6 of 10
(5,497 Views)
Solution
Accepted by topic author oneFranck

variant.png

 

 

George Zou
0 Kudos
Message 7 of 10
(5,487 Views)

haha, now i got it 🙂

0 Kudos
Message 8 of 10
(5,484 Views)
This could also be a good use case for OOP.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 10
(5,438 Views)

Or simply use VISA for both TCP/IP and COM.

Take a look this document:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3gXCAQ&l=en-US

 

 

 

George Zou
0 Kudos
Message 10 of 10
(5,424 Views)