LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

little endian

I have similar difficulties in digesting how labview interprets strings/hex/etc.

I am doing a project which basically logs the data coming out of an inertial sensor through the RS232 port. One of the commands is to set the erection rate of the sensor (you don't have to understand what this means). The format in which the command is sent is T<x> where T is the ascii character T and x is a parameter which can range from 0-255. The problem is that they request that the argument x be sent as a single hex byte, not an ASCII character. I have uploaded the code which I am using right now but I don't think it is working.

Help?
0 Kudos
Message 11 of 12
(775 Views)

Yush,

You simply need to "type cast" (It's on Numeric -> Data Manipulation) the U8 integer of "erection rate" to a string.  Make sure that the input decimal value is in U8 representation otherwise the string will be longer than a single byte. The type input at the top of the cast can be any string (perhaps a wire from the "T")

You'll get a 1-byte long string having the same bit pattern as the U8.

Rod.

PS You could alternatively use flatten to string (on the same pallette)

Message 12 of 12
(763 Views)