LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I tell a variant input that a string is coming in?

I'm just learning how to use LabVIEW, so my apologies if this is a simple/stupid question.
 
I'm trying a variant on a DataSocket Read VI that was supplied with LabVIEW (I'm running version 7.1).  I've got the "data" output line tied into a string.  The "type (Variant)" input is connected to a 1-D array of unsigned bytes.  There is an error in the wire connecting the "data" output to the string element, though:
 
You have connected two termnials of different types.  The type of the source is 1-D array of unsigned byte [8-bit integer (0 to 255).
 
The type of the sink is string.
 
All well and good.  How do I change the type of the source to string?  When I right-click on the source and select "Replace", I can't see anything in there that looks like a string that isn't a constant... that is, a string type.  I'd appreciate any insight you can lend me on this.
0 Kudos
Message 1 of 3
(2,519 Views)
In the strings pallete you an find the Empty string constant or just a string constant . Wire that to the input (type) connector and it should produce the string you want.

Or you insert a byte array to string function in the broken wire.

Regards,

André

Message Edited by andre.buurman@carya on 08-29-2007 12:05 PM

Message Edited by andre.buurman@carya on 08-29-2007 12:05 PM

Regards,
André (CLA, CLED)
Message 2 of 3
(2,517 Views)
Simple enough.  Thank you.  Sometimes, it's just a matter of figuring out what I need to be looking for.
0 Kudos
Message 3 of 3
(2,507 Views)