LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate CRC table with Formula Node

Highlighted

I want to generate an CRC table by formula Node,but the table which generated is not correct,could someone with experience could help me?


uInt8 j;
uInt16 i;
uInt16 crc, c;
uInt16 crc_tabccitt[255];

for (i=0; i<256; i++)
{
 crc = 0;
 c = ( i) << 8;

 for (j=0; j<8; j++)

 {

    if ( (crc ^ c) & 0x8000 )
        crc = ( crc << 1 ) ^ 0x1021;
    else
        crc = crc << 1;

    c = c << 1;
 }

crc_tabccitt[i] = crc;
}

0 Kudos
Message 1 of 2
(692 Views)

How is it not correct?

 

Post your VI with a description what is wrong and what it should be.

0 Kudos
Message 2 of 2
(678 Views)