LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

special characters

Solved!
Go to solution

How do I insert special characters in a string? For example I'm trying to insert the hex equivalent of 0x01, 0x04, and 0x00. The hex data is being sent over through a serial connection and the device I'm sending it to needs the data in this format.

0 Kudos
Message 1 of 4
(3,278 Views)
Solution
Accepted by topic author NickBl

Display style.png

Hex.png

string.png

0 Kudos
Message 2 of 4
(3,276 Views)
Solution
Accepted by topic author NickBl

Not sure exactly what you need, but you can use "format into string" for a lot of your string constructing needs. The specifier for hex is just "%x" but we can pad it with a zero using "%02x".

 

temp.png

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

Okay thank you gregoryj and HopeH. I'll add that into my code.

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