LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does CRC 16 with lookup table work?

I have been try to get CRC16 with a lookup table to work but it does not match the CRC for a device I am trying to simulate.  I have attached the code any help would be great.

0 Kudos
Message 1 of 4
(9,207 Views)

Hello reynolja,

 

The VI you attached has a missing dependency ("Alternate MIB CRC-16.vi") so it's difficult to tell what may be happening.  There are several CRC examples available on NI.com, I've linked one of the most versatile and recommended ones below - that might be what you're looking for.  If not, I suggest a little more searching- there appear to be at least a dozen other examples in various locations.

 

Community Example: Inline CRC Reference Library (CRC-32, CRC-16, and CRC-8)

https://decibel.ni.com/content/docs/DOC-11072

 

Best Regards,

Tom L.
0 Kudos
Message 2 of 4
(9,202 Views)

You can't just say you need a CRC-16.  There are way too many parameters involved: Polynomial, Initial CRC, Data Inversion.

 

When it comes to a CRC with a lookup table, it uses precalculated results based on a specific CRC implementation.  If you don't know which implementation it uses, it isn't really usable.

 

What instrument are you trying to simulate?  What is the exact CRC implementation does it use?


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 3 of 4
(9,187 Views)

reynolja,

 

Here is a link to a thread about using a table to generate a CRC.

Message 4 of 4
(9,186 Views)