LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String in Binary to Hexidecimal for RS-485 Serial Output

Hi,

I'm trying to construct a string suitable for output on RS-485 Serial message.  From what I understand, it needs to be in hexidecimal format for the "VISA Write" function.  I have 5 bytes to write, including my start byte.

I've used the "Build Text" Express VI to merge together booleans, Start Bits, and my Checkstum data, which gives me a string 40 characters long, all comprising "1's" and "0's".

 

I am not sure what to do to convert this 'binary' string to a 'hexidecimal' string programatically.

 

I'm pretty sure this is a very simple problem, and I'm trying to do this the hardest way possible but any help would be very useful.  Thank you.

 

Brendan

0 Kudos
Message 1 of 2
(2,202 Views)
First, VISA or RS-485 does not require data as hex. Your instrument would. Second, one easy way to get create the correct data is to create an array of U8, wire that to a Byte Array to String, and wire that to the VISA Write. Your way is much too complicated.
0 Kudos
Message 2 of 2
(2,195 Views)