Dennis:
One alternative to having to create many different versions of the
generic Binary Save.vi for each data type would be to have a
polymorphic data input control and then use the casting function (I
forget the official name of this function, but it kind of looks like a
sausage grinder) on the byte manipulation palette to cast that
incoming polymorphic data to type U8.
You can easily convert the Write I16 Data File VI to data type U8 by
changing all of it's data inputs (1D array and 2D array) to U8 and
then following the attached wire all the way through (including the
sub-vi inside) to assure that the U8 data type is used instead of I16.
One fine detail is that somewhere in the Write I16 Data File VI, it
accounts for the fact that an I16 uses 2 bytes (I think by multiplying
by 2) You will have to adjust this for the fact that a U8 is just one
byte.
Once you have rewritten the Write I16 Data File VI to use U8, you can
connect this rewritten VI to the output of the casting function and
you should have a polymorphic binary data file writer.
As for professional version requirement, I've only ever used the
professional version, so I'll have to take your word on that.
As an aside, it would be nice if LabVIEW supported pointers and
handles as general data types (other than for file references etc.) as
exists in C, C++, Delphi, Pascal, etc. This is a major programming
functionality that is lacking in LabVIEW. Data conversions would be a
trivial matter then. Of course I say this, but I have been burned by
pointer mistakes that I have made before.
Douglas De Clue
LabVIEW programmer
ddeclue@bellsouth.net
Dennis Knutson wrote in message news:<50650000000500000035910000-1027480788000@exchange.ni.com>...
> You can't create a polymorphic VI the way you're trying. To create a
> polymorphic VI, take your generic VI and create versions for each data
> type you want to handle. That means that you would create one with an
> array of doubles and an array of strings to use your top level VI as
> an example. The connector pattern for all the VIs need to be the same.
> Once they're created, from the file menu, select new>polymorphic VI.
> Add all of the subVIs that you created into the new polymorphic VI.
> The creation of polymorphic VIs is only possible with the professional
> version of LabVIEW.