Example Code

Creating and Checking a Block Check Character (BCC)

Code and Documents

Attachment

This example illustrates how to programmatically create a block check (BCC) character, also known as a frame check character. In many serial and network communications, an error checking character is appended to the end of the string you want to send. The first VI creates and appends a block check character to a string by performing consecutive exclusive OR (XOR) operations on the characters you want to send. This operation can be repeated on the receiver end and the computed BCC can be compared to the BCC included in the string in order to check for errors in data transmission, as illustrated in the second VI.

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

Contributors