Vijaya Posted August 23, 2012 Report Posted August 23, 2012 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 Quote
Sleepy Wombat Posted August 30, 2012 Report Posted August 30, 2012 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. Quote
HM_Dava Posted August 30, 2012 Report Posted August 30, 2012 (edited) 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 August 30, 2012 by HM_Dava Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.