LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How is numeric data received with UDP interpretted?

A device sends numeric data with the UDP protocol and the transmitted data is simply a sequence of numbers.

Example:
Numbers 500, 501 and 502 in 16 bit big-endian representation (0x01F4, 0x01F5, 0x01F6) results in the data
0x01 0xF4 0x01 0xF5 0x01 0xF6 (6 bytes)

How does the LabView UDP Read.vi (ver. 5.1) interpret this data when displaying it in string format? Does it return the string "01F401F501F6" or does it return the six characters that have the ASCII values
0x01 (1)
0xF4 (244)
0x01 (1)
0xF5 (245)
0x01 (1)
0xF6 (246)
making the string "☺¶☺§☺÷" ?
0 Kudos
Message 1 of 2
(2,887 Views)
It does not "interpret" anything, you'll get the string with the six raw bytes. It is up to you to cast it to the right data type.

Use "type cast" to interpret it as the 16bit, see attached image for an example (I assumed U16).

(Note that you can of course set the string to display the hex code for clarity, especially if you expect unprintable ASCII codes. To do so, right click on it and select hex codes. This is only cosmetic).
0 Kudos
Message 2 of 2
(2,887 Views)