LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

concatenate hex string with ASCII string

Solved!
Go to solution

Hello,

I'm new to LabView and I'm building an application that speaks to a camera. I'm stuck at something that seems quite basic: I need to concatenate a constant string of hex values (0002 040D ...) with an ASCII string of hex characters (00D0A10F, for example), that comes out of a "Number to Hex string" block. The output should be a string of hex values (0002 040D 00D0A10F) and go to the camera, but the concatenate block turns the ASCII string into hex display too, so that every character is converted to two hex symbols....

 

I found a very old post where someone claims they found a solution; unfortunately, it's not posted...

Does someone have an idea what do to do?

 

Thanks a lot!

Michal

0 Kudos
Message 1 of 4
(3,832 Views)

Hi Michal,

is you constand string in hex display? Can you show a vi with your data and your expected result?

 

Mike

0 Kudos
Message 2 of 4
(3,830 Views)
Solution
Accepted by michalm

Hi,

 

Give this a try - it converts an ASCII string of hex characters into the ascii characters.

 

So, if you view the output as hex, it should concatenate properly with your other data.

 

 

 

Dan

Dan
CLD
Message 3 of 4
(3,827 Views)

Hi, Dan,

 

thanks a lot! This leaves an unwanted ascii string hanging somewhere, but who cares, right?  I integrated your suggestion into my vi, and it works :smileyhappy: 

 

 

Have a nice day!

 

Michal 

 

 

0 Kudos
Message 4 of 4
(3,805 Views)