Sign in to follow this  
Followers 0
Vijaya

Omron Array Comparision

3 posts in this topic

Hi all, I am using a CJ1M Omron Controller. I want to compare an Array of 32 DINTs (say Source) with another Array of 32 DINTs ( say Reference) and record the Miss matching elements Bits Position of these arrays into another Array(Result) Is there any direct Instruction in OMRON or we need to build this logic using some other Instruction I am Very new to Omron and unable to move forward in my Project. Please give me a suggestion. Thanks Vijaya

Share this post


Link to post
Share on other sites
there is no quick instruction for 32 DINT - that is 64 words to compare.... the only other way is use the MCMP - this is generally used to compare words - then in the result word, a bit is turned on where there is a mis match,,,, you should be able to use this still as bits will turn on where a match... you will have to execute 4 variations of the command.

Share this post


Link to post
Share on other sites
I've just had go using a Double Signed Compare inside a FOR-NEXT Loop. The example compares an array of 32 double words starting at D100 with another array starting at D200. The result of each compare is displayed as a bit in W0.00 to w1.15 Will this do the job? 32 DINT Array Compare.cxp Edited by HM_Dava

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