Sign in to follow this  
Followers 0
Van

Help: Computing Checksum

3 posts in this topic

Equipment: CJ1M-CPU11 I am trying to figure out how accomplish this using ladder logic. The Omron instruction FCS(180) is similar to my needs but doesn't appear to perform the same math operation (I don't get the same result). I think I have to write this one. Question One: Best method to perform the math? Which instruction would you recommend? Question Two: What really stumps me is the conversion of each digit of the last byte into an ASCII code.

Share this post


Link to post
Share on other sites
In both your examples the Hex sum is incorrect. Should be "28D" and "28E". Use SUM[184] instruction to sum BYTES to calculate these values. In your example the first C[ontrol] word of the SUM instruction would be 13 bytes = #D. The second contol word [C+1] = #2000.

Share this post


Link to post
Share on other sites
Excellent! Thank you for your assistance! And I used ASC(086) to convert my resultant: ASC SUM_RES #0030 XMT_DATA_CS it worked! Edited by Van

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