LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC32


@453443474 wrote:

Thanks for your reply. There are plenty of method of CRC32. How did you identify which method to be used to achieve the expected CRC32 value(29 FB 89 83)?

 


For me it was all trial and error.

 

I got lucky and found it quickly. You mentioned that the polynomial was probably 0x04C11DB7. So, I started there and methodically changed the other parameters (initial value, final XOR, reverse data, reverse CRC) until I found the right CRC. Initial Value is most often all Zeros (0x00000000) or all 1's (0xFFFFFFFF). Same with the Final XOR. The Reverse Data and Reverse CRC are Booleans and each can be toggled true/false.

 

NOTE: Your CRC algorithm is slightly different. The standardized CRC-32/ISO-HDLC calculates the CRC value as 83 89 FB 29, but is was simple to reverse the bytes to get your result 29 FB 89 83

0 Kudos
Message 11 of 14
(1,362 Views)

Hi, 

I am having the same problem, I am trying to use the examples in the link below, but I am not getting the same answer as I could find in the webpage Online CRC-8 CRC-16 CRC-32 Calculator (crccalc.com)
https://forums.ni.com/t5/Example-Programs/Calculating-the-CRC32-of-a-File-with-LabVIEW/ta-p/3496230

Example: HEX 000100010400000000

From ccralc.com:

Algorithm Result Check Poly Init RefIn RefOut XorOut
CRC-32
0x147F6155 0xCBF43926 0x04C11DB7 0xFFFFFFFF true true 0xFFFFFFFF


From the Labview example:

leonardoramal_0-1687166663897.png


I kindly ask for help with this issue

0 Kudos
Message 12 of 14
(717 Views)

If I open the NI verified example in your link, remove the file reading code and use a string instead, I get exactly the value you say you expect:

 

MECC CRC32 LV2012 NIVerified.png

 

Note that I set the display style of my string to hex before I pasted your value. This means that the hex value of the bytes in my string are 00, 01, 00, etc.

 

If you still can't get it to work, you should include your actual code with default values configured, what you expect to see and what you actually see.

 


___________________
Try to take over the world!
0 Kudos
Message 13 of 14
(697 Views)

It worked, Thank you very much.

0 Kudos
Message 14 of 14
(652 Views)