LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Hexadecimal string with UDP

Solved!
Go to solution
I am creating a hexadecimal string that I want to send with UDP. UDP converts the data to ASCII (i.e. (0x00) is send as 31 31) 
0 Kudos
Message 1 of 5
(5,406 Views)

TxJohnUSMC wrote:
I am creating a hexadecimal string that I want to send with UDP. UDP converts the data to ASCII (i.e. (0x00) is send as 31 31) 

You probably want to sent binary data and not a hexadecimal string. Set your string constant or control to display in hexadecimal mode (right click menu) and enter your binary data in hexadecimal mode.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(5,400 Views)
Solution
Accepted by topic author TxJohnUSMC
UDP does no such thing. Are you sure it's not you that's "converting the data to ASCII"? My guess is that you have a string control set to normal display rather than hex display, and when you enter "00" you are entering the characters "0", "0", rather than the value 0, 0.
0 Kudos
Message 3 of 5
(5,398 Views)
It is me.  So, my next question is how to create a HEX string that I can send to UDP that will work.  I want to send 00 01 00 1C 06 04 00.  What is the best way to do that?
0 Kudos
Message 4 of 5
(5,386 Views)
Right click on your string, select "Hex Display" in the menu and enter those numbers in it. Connect that string to your UDP Write et voila.
Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(5,379 Views)