LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Checksum calculation method?

Solved!
Go to solution

Hello,

I have the below response back from a undocumented instrument's EEPROM through serial port when i send the string command @p

 

1D01 0B00 1742 FA06 0C03 10FF 00F8 300D 0129 0200 0000 960E D4FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 00BE 012C 015E 0190 02BC 044C 09C4 FFFF 034D 034A 036E 036C 0344 0356 03E8 FFFF 00C8 FFFF FFFF FFFF 03E8 03E8 FFFF FFFF FFFF FFFF FFFF FFFF 00C8 FFFF FFFF FFFF 03E8 03E8 FFFF FFFF FFFF FFFF FFFF FFFF 342F

 

Checksum = 342F ( last 2 bytes in the above response)

I have searched and tried few combinations from the posts on this forum. could not get the correct checksum calculation.

can some one help please.

Thanks in advance

0 Kudos
Message 1 of 9
(4,740 Views)

Please make our life easier by attaching a small VI containing a string diagram constant with the correct example string.

0 Kudos
Message 2 of 9
(4,718 Views)

Sorry altenbach my bad,

here's attached.

0 Kudos
Message 3 of 9
(4,713 Views)

Thanks! Sorry, I won't be near a computer for a while.

0 Kudos
Message 4 of 9
(4,710 Views)

This does not look right, because the strig is formatted in hex as plain string (printable characters 0..F and spaces). Shouldn't it be a binary string and look like that in hex display?

 

You are not removing the last two bytes but the last space and four bytes " 342F", i.e. 5 bytes.

 

(It is also disconcerting if you get creative with the diagram background)

Message 5 of 9
(4,677 Views)

Who made the instrument?  Who made the EEPROM?  Any manufacturer information may help lead to the standard being used.  Otherwise, it is a complete shot in the dark.  There are A LOT of ways to perform checksums (simple summation, standard CRC with who-knows what parameters such as polynomial, bit order, where the XOR is performed, invert the final value or not, etc).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 9
(4,656 Views)
Solution
Accepted by topic author freemason1

@altenbach wrote:

This does not look right, because the strig is formatted in hex as plain string (printable characters 0..F and spaces). Shouldn't it be a binary string and look like that in hex display?

 


Here it is. As altenbach said, the data needs to be in binary format.

FP.PNG

 

bd.png

0 Kudos
Message 7 of 9
(4,636 Views)

Thanks guys,

i dint see it this way..

0 Kudos
Message 8 of 9
(4,607 Views)

Instead of using Type Cast, I recommend using the Unflatten From String simply because you can specify the Endianness (the byte order of the values).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(4,593 Views)