LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Little Endian Checksum

Hi,

 

I have a question here. My Data is of I64 hexadecimal. I have several of them but i mention one here to simplify things.

 

I need to transmit this data via TCP and therefore need to send them by Little Endian Byte Ordering. For eg. my data is "1020304050607080", therefore in little endian byte ordering form, the data will be send as" "8070605040302010". I have no problem to achieve this. But the problem arises when i need to compute the checksum.

 

For e.g. for this particular "8070605040302010", i need to break them down to "8070", "6050", "4030", "2010" to compute the checksum. Say for e.g. i am using a "numeric constant" to display "1020304050607080" in I64, it then goes through a "Flatten to string" function to convert the format to little endian byte ordering format. Afterwhich the output of the flatten to string function is wired to the "TCP write" function for TCP transmission. Therefore, i wish to ask how can i break up the I64 to four I16 data? Please advise. Thank you.

0 Kudos
Message 1 of 3
(2,730 Views)

hi prince boeing,

  If you want to split a I64 to 4 I16s then use split word which is present in numeric>>data manipulation.

 

 

Thanks and regards,

srikrishnaNF

 

 

Regards,
Srikrishna


0 Kudos
Message 2 of 3
(2,721 Views)

Or you could typecast it to a cluster of 4 U16:

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 3
(2,714 Views)