LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRC-CCITT

Hi Toro,

just to give you a chance for a rating.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 11 of 17
(4,617 Views)
Following is a list of the most used CRC polynomials
· CRC-12: X^12+X^11+X^3+X^2+X+1
· CRC-16: X^16+X^15+X^2+1
· CRC-CCITT: X^16+X^12+X^5+1
· CRC-32: X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X+1

The ModusBus that I have is using the CRC-16 listed above.
0 Kudos
Message 12 of 17
(5,061 Views)
Hello,
The CCITT CRC-16 is the one used in Europe where as my version is the one usually used in the US

In your attached VI, if you use the followinfg settings
For CRC-16
set poly= 8005

and Set
Precond T
LSB First T
Reverse CRC T
others F

Then you get the same answer of my attached vi

hope this explains it
0 Kudos
Message 13 of 17
(4,617 Views)
Hi Dr. Imad,

I have seen that I must set Precond to TRUE but I thought all others will be FALSE. In your VI you use the polynom in inverse sequence (0xA001 is backward reading of 0x8005). In this case it makes sense to set the reversing flags to TRUE.

Although LSB First and Reverse CRC are independent I have seen no case in which they have different states. I think this comes from the HW implementation of CRC calculation.

Wouldn't it be interesting to use the RIO card as a 48 (24 with handshaking) full duplex serial channel card with integrated CRC calculation and checking? You only need something like the MAX232 converters to get from TTL to RS232 and vice versa.

W
aldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 14 of 17
(4,617 Views)
I've been trying to use this VI for an application. It doesn't seem to give the correct results. The inner loop has eight iterations, suggesting this is done bytewise. This goes against the mathematical definition of CRC-CCITT. It also seems pointless to use a 16 bit polynomial for an 8 bit message.
0 Kudos
Message 15 of 17
(3,687 Views)

 

Dr._Imad,

Do you have the VI, to send a String to a MODBUS RTU microporcessor and get response back, using your CRC-16 calculator?

 

thank you

0 Kudos
Message 16 of 17
(1,986 Views)

Merci bien, j'ai pu résoudre mon problème de calcul de CRC qui correspndait pas au CRC obtenu avec la fonction crc_ccitt_ffff de excel

 

Il fallait juste modifier 0x0 en 0xFFFF en entrée

0 Kudos
Message 17 of 17
(659 Views)