Example Code

High Efficiency CRC16-CCITT (Poly: 0x1021) Seed: 0xFFFF

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 Overview: This VI takes in a string variable and calculates the 16-bit CRC value based on the CRC16-CCITT standard (polynomial 0x1021) with seed value of 0xFFFF ONLY.


Description:

This VI takes in a string variable and calculates the 16-bit CRC value based on the CRC16-CCITT standard (polynomial 0x1021) with seed value of 0xFFFF ONLY. This VI code is based on an extremely efficient implementation originally intended for microcontrollers and is adapted for LabVIEW.


Requirements: LabVIEW 2012 (or compatible).


Steps to Implement or Execute Code:

1. Input a string.
2. Run this VI.


Additional Information or References: 

 

undefined

 

undefined

 

All thanks go to:
Original Code: Ashley Roll
Optimisations: Scott Dattalo


**This document has been updated to meet the current required format for the NI Code Exchange.**  

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.