DB Compare Function For S7 PLC

P

Thread Starter

Peter Hasler

I am looking for a Function that will compare a data area in two Data Blocks and will return a discrete if a difference was found. Any advice or assistance would be appreciated
 
H

Hakan Ozevin

You can simply do this by creating a *pointer* and increasing it from 0 to n as to point DW0 to DWn for DBa and DBb.

DBa= The first data block
DBb= The second data block to be compared

I hope this helps

Hakan Ozevin
 
A

Archie G. Mullins

This method can be improved by setting two pointers in the Address Registers (AR1,AR2)and increasing the Pointer with +AR1,+AR2 inside a LOOP - NEXT. I have used this method in FIFO's and DB Lookups.
 
Top