Help - Search - Members - Calendar
Full Version: CRC Computation in PLC
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
Autom8n
I'm working on a project where I need to compute a CRC value for a group of bytes recieved from a serial device. The serial device sends the CRC value as a part of the string. I need to compute the CRC in the PLC and compare to the recieved CRC for a pass/fail signal.

The protocol uses CRC16-CCITT to compute the CRC. I'm using an Allen-Bradley Compactlogix PLC to recieve the data.

Any information that would help will be appreciated!!!
hipoint2
Can you use BCC its alittle bit easier to compute?
Ken Roach
There is a Modbus logic routine in the RSLogix 5000 Samples folder. It has a functional (though not well documented) CRC routine in it.

You need to know the polynomial being used and the seed value (usually 0000 or FFFF). The "CCITT-CRC16" description might include those pieces of information.
Autom8n

Ken,

I could not find the Modbus example. What is the title?


Thanks!!
TWControls
In version 15 go to Help, Vendor Sample Projects
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.