Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Generic data type?

0 views
Skip to first unread message

Benjamin J. Manthey

unread,
Nov 30, 1999, 3:00:00 AM11/30/99
to
How do you make a indicator or control that will accept any data type ie:
string, uint16 etc...

Thanks in advance,

-Ben
man...@dim.com
http://www.dimensional.com/~manthey

Robert Young

unread,
Dec 1, 1999, 3:00:00 AM12/1/99
to

man...@dim.om (Benjamin J. Manthey) wrote:
>How do you make a indicator or control that will accept any data type ie:
string, uint16 etc...>>Thanks in advance,>>-Ben>man...@dim.com>http://www.dimensional.com/~manthey

Ben,
It really depends on what you need it for.

For user interface, a string control will let you enter strings, numbers
(any style), booleans, or paths. You can then parse it in the diagram.
A string indicator can also show a string, number, boolean, or path. This
is fine if you have at least some idea of what to expect. This doesn't work
directly for RefNums.

If you are interested in passing from one VI to a subVI, you may want to
flatten to string and unflatten from string on the other side.

Otherwise, no there is no control/indicator presently in LabVIEW (as far
as I know) that is polymorphic.

I hope that this helps,
Bob Young

John Lum

unread,
Dec 1, 1999, 3:00:00 AM12/1/99
to Benjamin J. Manthey
Seconding Robert, there is no way, as of LabVIEW 5.1, for the user to create VIs with polymorphic
terminals, similar to the polymorphic yellow function nodes in the function palettes.

The flatten approach is the best workaround I am aware of. You can achieve some level of data-handling
flexibility this way (if not true polymorphism) by writing handling routines in case structures that
process the data depending on the type, but of course you'll have to reflatten the result if you want
to pass it out of the subVI in a pseudo-polymorphic manner.

This is a topic that has been on the wishlist for a while, and I know that the developers are
considering how to incorporate it in a future version of LabVIEW.

Regards,
John Lum
National Instruments

Robert Young wrote:

> man...@dim.om (Benjamin J. Manthey) wrote:
> >How do you make a indicator or control that will accept any data type ie:
> string, uint16 etc...>>Thanks in advance,>>-Ben>man...@dim.com>http://www.dimensional.com/~manthey
>

> <snip>

0 new messages