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
(3,482 Views)

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

0 Kudos
Message 2 of 10
(3,462 Views)

here they are, the VIs

 

fb

0 Kudos
Message 3 of 10
(3,443 Views)

Use a variant.

 

George Zou
0 Kudos
Message 4 of 10
(3,427 Views)

Thanks Zou,

 

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

0 Kudos
Message 5 of 10
(3,405 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
(3,401 Views)
Solution
Accepted by topic author oneFranck

variant.png

 

 

George Zou
0 Kudos
Message 7 of 10
(3,391 Views)

haha, now i got it 🙂

0 Kudos
Message 8 of 10
(3,388 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
(3,342 Views)

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

Take a look this document:

http://digital.ni.com/public.nsf/allkb/80C28CC795611E4A86256AB100209521

 

 

 

George Zou
0 Kudos
Message 10 of 10
(3,328 Views)