CRC Help!!

mad@imap

Member
Join Date
Apr 2008
Location
Columbus, Ohio
Posts
25
I have a scanner that is outputing this message string DI;I;02301;01779;01011;06480005;06480004;0404;0000;4653 I know what the DI;I are the 02301 is the length, 01779 width, 01011 hight, 06480005 SN#, 06480004 SN#, 0404 counter, 0000 error, 4653 is the CRC but when I try to enter the message into one of the online converters the CRC dosn't come up to the correct value.

I'm not sure how to tell the difference between 16 bit or 32 bit ??
thanks 🍺
 
What is the algorithm for the CRC? Usually in ASCII protocols the CRC is just one single byte that is an XOR of all other bytes in the message. Note: The CRC byte will not always display as a printable character in a terminal program or word processor.
 
A couple things come to mind.

Is the 4653 the ASCII representation of a decimal number or a hex number (x4635 or x121B)?

Are the high and low bytes of the CRC value swapped? Check for x4635, x3546, x121B and x1B12
 
A little more info

The scanner is a Sick dimensioning head. I believe its 16 bit. From what I’ve read on the web Sick uses a different algorithm to calculate there CRC? I’ve used some online CRC calculators but don’t get the same CRC value…:mad:

Is the 4653 the ASCII representation of a decimal number YES
 
I have had to program CRC 16 a number of times

Usually the Initial Value was all 0's
On one protocol I needed to use all 1's

This may be your problem
 
Got it

All that replyed thank you.
I final got it with help from Sick. I now have there CRC algorithm. I'll post what I got from them here.
Also

the CRC will be calculated in the VMS with following rule:

"Base Protocol"
Dimension; metric; length; width; height; serial number master; serial number slave; Index; status1; CRC16 checksum
DI;M;0402;0302;0202;05320012;00000000;0001;0000;16E8; ;the blue bold area is the range for the CRC calculation

Note all semi-colons, except the last one after the CRC, are included in the CRC calculation. Also, the polynomial being used is 0xF12F.


 

Similar Topics

hello, I'm developing a program in java, that should write programs to fx2n plc from mistubishi, via serial port. I got the comunication...
Replies
15
Views
10,358
Hi, I'm setting up a new cell with a Fanuc R30iB and Compact Guardlogix 5380 PLC. I have gone through my robot setup as usual, but have not...
Replies
2
Views
705
Hello, i am connected l&t energy meter to PLC through RS485 in tia portal v15. i was reading values in plc. my problem is how to check crc 16 in...
Replies
2
Views
1,686
Wondering if any of you old timers have seen a case where you can download to the processor no problem, but on power cycle: fault, and no program...
Replies
8
Views
2,113
Hi All, I'm currently working on a project with some fuji drives (frenic mini) and a micro850. Communication is through Modbus RTU. I don't...
Replies
2
Views
1,758
Back
Top Bottom