LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC16-CCITT verification VI

Solved!
Go to solution

Hello!

I am working in a project that uses CRC16 to evaluate transmission errors between an emitter and a receiver. Data is transmitted via RF.

In the emitter side, I already have an algorithm to generate CRC16. Then, data is sent in a string with the correspondent CRA.

For example, let’s consider the string “123456789”. The CRC for this string is 31C3 (hexadecimal). So, the message sent will be “12345678931C3”.

Now this message will be received in a VI that I want to create, via Serial Port (using VISA Read). Then I must process the CRC verification dividing the received message by the CRC16 polynomial (1021 hexadecimal) to see if the remainder is zero. If so, the message has no errors.

I think that I should provide a XOR operation between the received string and the polynomial for sometimes until no further division is possible.

Can anyone help me with this? I just need the CRC verification part, since the string processing I know what to do and how to do.

Thank you very much.

Duarte

0 Kudos
Message 1 of 6
(5,585 Views)
Solution
Accepted by topic author DuarteCota

Here's a link to LabVIEW CRC stuff.  This should save you a lot of heartache.  😉

 

http://forums.ni.com/t5/Example-Program-Drafts/Inline-CRC-Reference-Library-CRC-32-CRC-16-and-CRC-8/...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 6
(5,578 Views)
Solution
Accepted by topic author DuarteCota

I typically just perform the same CRC algorithm on the data and just check to see if it matches the supplied CRC.  Not all CRCs will go back to 0 when performed with the calculated CRC.


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
Message 3 of 6
(5,573 Views)

Thank you very much!

🙂

0 Kudos
Message 4 of 6
(5,538 Views)

Thanks are given with kudos and marking solutions.

0 Kudos
Message 5 of 6
(5,509 Views)

Hooovahh escreveu:

Thanks are given with kudos and marking solutions.


Not only. 🙂

Done!

Thanks for reminding.

0 Kudos
Message 6 of 6
(5,491 Views)