Compare

Outlaw10801

Member
Join Date
Sep 2009
Location
Minersville, Pa
Posts
19
I have to arrays both with 100 reals inside and i need to compare them to make sure there is no differences. I know i could do it the long drawn out way with alot of neq's but can someone tell me if there is an easier way/instruction to kind of do it all at once.
 
as blperkins stated the FSC ( File Search And Compare ) would compare values . When using the FSC you need to give it a control name. You will use the control name in your expression to identify which values to compare. Let's say you name the FSC Control word FSC1 then your expression would be Array1[FSC1.pos] <> Array2[FSC1.pos] This uses the control position of the instruction as an indirect address. That way it will compare all values to each other at every position in your arrays. Set the Mode selection to ALL. There are several control word bits that will also be needed to complete your logic. The FSC1.FD or the found bit. This bit will be true if your expression is true. The FSC1.IN the Inhibit bit. This bit also sets when the expression is true and inhibits the instruction from proceeding. This allows the Control word FSC1.pos to identify what position in the array the expression was found. Then the FSC1.DN or Done Bit. This identifies the instruction has completed the search for the entire length. Just remember you must unlatch the inhibit bit to continue searching the array once some mismatch is found. You could have multiple mismatches in the 2 arrays.
If you tell the instruction to activate and the found bit is false and the done bit is true then all are equal. One last thing is you can use the (RES) reset instruction same as the one for RTO timers to Reset the FSC and return the position to 0 and unlatch all the control bits.
 
There is an FSC example of what you're looking for in the CLX instruction reference manual.
 

Similar Topics

Help please. Im new to Omron and have a machine down. I have a compare = for barcode label scan. I've attached two pics. On the Mnemonics you can...
Replies
4
Views
665
Hi everyone! Accidentally closed it and it wont appear again. Checked and unchecked the option and seem to make no difference. Running v7.10.00...
Replies
16
Views
1,976
I'm working on an array that contains a UDT of 5 Items Array[4] DataType[0] - Part 1 - Part 2 - Part 3 - Part 4...
Replies
1
Views
862
Hi. I have 2 files where I would like to see the ladder logic differences (similar to the Rockwell compare function). I am using TISoft Siemens...
Replies
1
Views
1,288
Hello experts, I am just starting with AB programing, I have a questions regarding a compare done in an old RSlogix500 and causing me issues when...
Replies
5
Views
1,978
Back
Top Bottom