LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC-16 0xA001

Hi All,

 

I am trying to add a crc check to my serial read program. The program now works well other than this.

 

I have inserted my serial data into a byte array. The cells that require the crc check are index one through to nine. The CRC is a CRC-16 with a mask of 0xA001. This result should be equal to the check sum bite (index11 *256)+index12).

 

I have highlighted two different methods on my vi that i have tried. But neither seem to do the job.

 

Any advice ?

 

Thanks,

 

Richard.

0 Kudos
Message 1 of 2
(3,141 Views)

Hi Richard,

 

Could you be mores specific as to the problem that you're seeing? Do both of your calculations give the same value or are they different?

 

I opened up your code but I couldn't see the functions you were using since the subVIs were missing, are you able to upload them? I did, however, find the first subVI when I downloaded the very same VI from the online example. It looks like this VI will definitely give you a CRC-16-ANSI so I'm not sure what the issue could be. Are you certain that your polynomial is correct? It could be that you've got the right implementation but it's simply using the wrong polynomial.

 

I suspect that the first implementation is correct so long as the input data and polynomial are correct, so I'd also recommend probing the wires going into this VI to ensure that the numeric to string conversion happens as expected.

 

Best regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 2
(3,095 Views)