05-10-2019 05:25 PM
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
Solved! Go to Solution.
05-10-2019 06:25 PM
Please make our life easier by attaching a small VI containing a string diagram constant with the correct example string.
05-10-2019 06:31 PM
Sorry altenbach my bad,
here's attached.
05-10-2019 06:54 PM
Thanks! Sorry, I won't be near a computer for a while.
05-11-2019 02:06 AM - edited 05-11-2019 02:29 AM
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)
05-11-2019 04:18 PM
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).
05-12-2019 08:09 AM
@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.
05-12-2019 10:55 PM
Thanks guys,
i dint see it this way..
05-13-2019 06:08 AM - edited 05-13-2019 06:08 AM
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).