LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC32

Hi I am trying to do CRC32 on my data but somehow getting wrong value. I am using the CRC 32 code from the following link:

https://forums.ni.com/t5/Example-Programs/Calculating-the-CRC32-of-a-File-with-LabVIEW/ta-p/3496230

but instead of input a file, I am inputting the HEX value of "000102030405060708090A0B" to test the CRC. When i try to compare the results from online calculator : http://crccalc.com/ 

and use HEX input,the result matches "

CRC-32/JAMCRC

0x6D8F369A

But I should get 

CRC-32/MPEG-2 0xAD88945B

I am not sure what the online calculator is reffering to as "Ref in" and "Ref out" as that is the only thing different in two results. 


Is there any setting I need to change from the CRC 32 labview code.

Any help would be appreciated.


Thanks

0 Kudos
Message 1 of 14
(7,000 Views)

The problem with CRCs is that there are so many variations.  Here, this code should do what you need.


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
Download All
Message 2 of 14
(6,953 Views)

Hi Crossrulz,

 

I have labview 2014. Can you send me the vi with the 2014 version.

Thanks alot. 

0 Kudos
Message 3 of 14
(6,949 Views)

Here you go.


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 4 of 14
(6,941 Views)

Perfect.

Thanks alot. I will try to implement this into my overall code. I will keep you posted how it goes.

 

Thanks

0 Kudos
Message 5 of 14
(6,939 Views)

Hello All,

I have used attached CRC32 VI to generate CRC32 for 1020 bytes (provided in the constant in the VI), but this VI result(CRC32) is not matching with our expected value(29 FB 89 83). I am not sure if I am using correct polynomial or not. The following polynomials I used to generate the CRC32  but none of them matching my expected value.

0x04C11DB7, 0xEDB88320, 0xDB710641, 0x82608EDB

 

Kindly help to know the correct polynomial.

 

I have also attached that VI for your reference.

0 Kudos
Message 6 of 14
(6,238 Views)

@453443474 wrote:

Hello All,

I have used attached CRC32 VI to generate CRC32 for 1020 bytes (provided in the constant in the VI), but this VI result(CRC32) is not matching with our expected value(29 FB 89 83). I am not sure if I am using correct polynomial or not. The following polynomials I used to generate the CRC32  but none of them matching my expected value.

0x04C11DB7, 0xEDB88320, 0xDB710641, 0x82608EDB

 

Kindly help to know the correct polynomial.

 

I have also attached that VI for your reference.


This works.

 

FP.PNG

 

 

bd.png

0 Kudos
Message 7 of 14
(6,228 Views)

Hello,

 

Wow!... Thanks for the prompt help. I am new to this topic and excited to know about more. Could you please help to share the documents which you have regarding this?

0 Kudos
Message 8 of 14
(6,195 Views)

@453443474 wrote:

Hello,

 

Wow!... Thanks for the prompt help. I am new to this topic and excited to know about more. Could you please help to share the documents which you have regarding this?


There is plenty of information out there on the web. Just google it. Along with the Wikipedia.org site, here are a couple more that I find very helpful.

 

http://www.ross.net/crc/download/crc_v3.txt

 

http://reveng.sourceforge.net/crc-catalogue/all.htm

0 Kudos
Message 9 of 14
(6,189 Views)

Hi, 

 

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)?

 

Thanks

Durai S

0 Kudos
Message 10 of 14
(6,164 Views)