LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get a variant's string data?

This means that the original data type wired into the variant is not the same as the data type you have wired to the top input of the Variant to Data function.  It could be that the original data is something like a U8 and you have a U16 or something else wired to the top input.  Or maybe the original data is not a numeric, it may be a string or something else.  If the data is numeric, right click on the original data before it was converted to a variant and look at the Representation line.  You should see a popup next to this line and the data type will be surrounded by a dotted line or something like that.  You have to use this same data type when converting back from variant to data.
- tbob

Inventor of the WORM Global
0 Kudos
Message 21 of 22
(811 Views)


@tbob wrote:
...If the data is numeric, right click on the original data before it was converted to a variant and look at the Representation line. 

Or even easier, open the context help windows (ctrl+h) and simply hover with the mouse over the desired wire. 🙂 It will tell you everything about the representation.

(For kicks, try it on a complicated cluster wire and you can probably guess why I constantly use this method ;)).

0 Kudos
Message 22 of 22
(807 Views)