Sign in to follow this  
Followers 0
Benjamin Soriano III

CRC Code (Checksum Program)

8 posts in this topic

Good morning people! May I ask if there are some sensei in ladder programming that can help me interpret this code to a ladder program. Initialize CHECKSUM as FFFF(Hex) (There is a FOR NEXT Instruction) FOR each Byte CHECKSUM = CHECKSUM XOR (current byte) FOR I = 0-7 If ((CHECKSUM AND 1) = 0) CHECKSUM = Right_Bit_Shift CHECKSUM 1 bit Else CHECKSUM = (Right_Bit_Shift CHECKSUM 1 bit) XOR A001(Hex) NEXT I NEXT Byte I hope you can give me some ideas on this guys. I need some CRC function on the machine I am programming and I find it hard interpreting it in a ladder program. Thanks guys.

Share this post


Link to post
Share on other sites
What PLC type? What programming software?

Share this post


Link to post
Share on other sites
And which language? If you can use FB's I might have an existing library for the CRC in hand...

Share this post


Link to post
Share on other sites
OK, so you cannot use FBs. Did you solve it? It's a little bit of work to make the CRC check, so I don't think anyone will make it for free... Did you solve it? Do you interface with an existing CRC application, or do you need it for your personal need in some way?

Share this post


Link to post
Share on other sites
Good day sir. I am trying to figure this out. Somehow I did some progress, but this is far from complete. I came to use FOR NEXT statements and I saw in the programming manual that there are existing logical ops that might help me. I am now trying to figure out the stuff that must be programmed inside the ladder to complete the process as it has a time prerequisite (It was a MARKEM printer on a high speed horizontal wrapping machine. I will update you regarding the stuff.

Share this post


Link to post
Share on other sites
Did you achieve a success?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0