08-14-2015 01:43 PM
Hi,
I'm new to CRC calculation and currently having difficulty finding Labview VIs that I can use to do the calculation. I was able to find and use an online CRC calculator to generate correct values however I couldn't find any Labview VI that generates values that match the online calculator. See link: http://www.lammertbies.nl/comm/info/crc-calculation.html
I'm using CRC-16-IBM. I found a VI that seem applicable but I'm not sure how to use it. All my attempts thus far to perform a CRC calculation with the vi was not successful. Perhaps, it's not the right vi or I'm doing something wrong. Please try to see if you can use the VI and generate matching values with the online CRC calculator. See attachment.
Thanks
Solved! Go to Solution.
08-14-2015 02:00 PM
Do you have an example of input data and what the CRC should be? It is really hard to verify anything without it.
And any more information you may have on the CRC calculation would be helpful, the polynomial used being the most important.
08-14-2015 02:12 PM
Hi Crossrulz,
An example is the number 13100521 as ASCII input. The correct output is 0x444E if you use the online calculator. Please give it a try. I really don't know the actual polynomial but I belive it has the general form as
X^16+X15+X^2 +1.
Thanks
08-14-2015 02:22 PM
Your VI works for me.
make sure you typecast your ASCII string to Array of U8.
08-14-2015 02:58 PM - edited 08-14-2015 02:58 PM
I had to do some digging to find what the real polynomial was (that site actually lied). But then looking at the code, I came up with this. Granted, the lookup table version will be faster since a lot of these calculations are predone.
08-17-2015 09:03 AM
Thanks Crossrulz. I tjink I can work with this.
08-17-2015 10:28 AM
Just to muddy up the water a bit, here's a VI that I used for CRC16 about 15 years ago.
I don't know if it's "standard", but it worked with a set of hardware that the customer had.
It does NOT get the same answer as SolPS said above.
Anyway, it's fast and it's free.
Blog for (mostly LabVIEW) programmers: Tips And Tricks