LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help converting Python CRC-24q code into LabVIEW code

Solved!
Go to solution

Hi, Need help converting this Python code that implements a CRC-24Q that I believe is correct into LabVIEW code.  I'm close since the CRC-24q table values match my reference Python code, but I'm having trouble where the CRC is actually generated.

 

Three examples listed in the Python code are:

 

CRC24 Result for empty input: FFFFFF
CRC24 Result for 'Hello, World!': 7480DA
CRC24 Result for '123456789': C3A394

 

The Labview code originated from this post:  https://forums.ni.com/t5/Example-Code/Calculating-the-CRC32-of-a-File-with-LabVIEW/ta-p/3496230

By DGardner.

 

Thanks,

SS



Download All
0 Kudos
Message 1 of 3
(108 Views)

If the python code is correct, the error in your LabVIEW code is that you're shifting the character in the input string instead of the CRCBuffer.  Then XOR the unshifted character with the shifted CRCBuffer

--
Tim Elsey
Certified LabVIEW Architect
Message 2 of 3
(101 Views)
Solution
Accepted by topic author ShotSimon

As elset stated, you issue is you are shifting the wrong data for the 16 bit right shift. I did some other minor cleanup in the attached code.


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 3 of 3
(74 Views)