12.05.2014 Views

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

plc function ref - 34.12<br />

FBC, DDT - File Bit Compare, Diagnostic DetecT<br />

A<br />

CLR<br />

Dest S2:24<br />

Description:<br />

FBC<br />

FILE BIT COMPARE<br />

Source #B3:0<br />

Reference<br />

Result<br />

Cmp <strong>Control</strong><br />

Length<br />

Position<br />

Result <strong>Control</strong><br />

Length<br />

Position<br />

#B9:0<br />

#N10:0<br />

R6:0<br />

10<br />

0<br />

R6:1<br />

3<br />

0<br />

This instruction will compare the bits in two files <strong>and</strong> store the positions<br />

of differences in a result file. In this example the files compared when<br />

’A’ goes true. Both files start at ’B3:0’ <strong>and</strong> ’B9:0’ <strong>and</strong> 10 bits are to be<br />

compared. When differences are found the bit numbers will be stored<br />

in a list starting at ’N10:0’, the list can have up to three values (integer<br />

words). The ’Cmp <strong>Control</strong>’ word is for the bits being compared. The<br />

’Result <strong>Control</strong>’ word is for the list of differences. The manual recommends<br />

clearing ’S:24’ before running this instruction to avoid a possible<br />

processor fault.<br />

The DDT instruction is the same as the FBC instruction, except that<br />

when a different bit is found the source bit overwrites the reference<br />

bit. It is useful for storing a reference pattern for later use by a FBC.<br />

Status Bits:<br />

Registers:<br />

EN (Cmp)<br />

DN (Cmp)<br />

ER (Cmp)<br />

IN (Cmp)<br />

FD (Cmp)<br />

DN (Result)<br />

ER (Result)<br />

LEN (Cmp)<br />

POS (Cmp)<br />

LEN (Result)<br />

POS (Result)<br />

enable - enabled when the instruction input is active<br />

done - enabled when the operation is complete<br />

error - set if an error occurred during the operation<br />

inhibit - set when mismatch found, must be cleared to<br />

continue the comparison<br />

found - set when a mismatch is found<br />

done - set when the result list is full<br />

error - set if an error occurred with the results list<br />

length - the number of bits to be compared<br />

position - the position of the current bit being compared<br />

length - the number of result positions allowed<br />

position - the location of the last result added<br />

Available on: Micrologix, PLC-5<br />

www.PA<strong>Control</strong>.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!