Instruction Set Quick Reference

D-19

 

 

Diagnostic Instructions

Instruction

Description

 

 

FBC

FILE BIT COMPARE

Source

#I:031

Reference

#B3:1

Result

#N7:0

Cmp Control

R6:4

Length

48

Position

0

Result Control

R6:5

Length

10

Position

0

File Bit Compare

When the input conditions go from false-to-true, the controller

FBC

compares the number of bits specified in the CMP Control

 

Length (48) of the Source file (#I:031) with the bits in the

Status Bits:

Reference file (#B3:1). The controller stores the results

EN - Enable

(mismatched bit numbers) in the Result file (#N7:0). File R6:4

DN - Done Bit

controls the compare and file R6:5 controls the file that

ER - Error Bit

contains the results. The file containing the results can hold up

IN - Inhibit Bit

to 10 (the number specified in the Length field) mismatches

FD - Found Bit

between the compared files.

 

Note: To avoid encountering a possible run-time error when

 

executing this instruction, add a ladder rung that clears S:24

 

(indexed addressing offset) immediately before a FBC

 

instruction.

 

 

 

 

DDT

 

 

 

 

Diagnostic Detect

When the input conditions go from false-to-true, the controller

 

 

 

 

 

 

 

DIAGNOSTIC DETECT

 

DDT

compares the number of bits specified in the CMP Control

 

 

 

 

Length (20) of the Source file (# I:030) with the bits in the

 

 

Source

#I:030

 

 

 

 

 

Status Bits:

Reference file (#B3:1). The controller stores the results

 

 

Reference

#B3:1

 

 

 

 

EN - Enable

(mismatched bit numbers) in the Result file (#N10:0). Control

 

 

Result

#N10:0

 

 

 

 

DN - Done Bit

element R6:0 controls the compare and the control element

 

 

Cmp Control

R6:0

 

 

 

 

ER - Error Bit

R6:1 controls the file that contains the results (#N10:0). The file

 

 

Length

20

 

 

 

 

IN - Inhibit Bit

containing the results can hold up to 5 (the number specified in

 

 

Position

0

 

 

 

 

FD - Found Bit

the Length field) mismatches between the compared files. The

 

 

Result Control

R6:1

 

 

 

 

 

controller copies the source bits to the reference file for the

 

 

Length

5

 

 

 

 

 

 

next comparison.

 

 

Position

0

 

 

 

 

 

 

 

 

 

 

 

 

The difference between the DDT and FBC instruction is that

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

each time the DDT instruction finds a mismatch, the controller

 

 

 

 

 

 

 

 

 

 

changes the reference bit to match the source bit. You can use

 

 

 

 

 

 

 

 

 

 

the DDT instruction to update your reference file to reflect

 

 

 

 

 

 

 

 

 

 

changing machine or process conditions.

 

 

 

 

 

 

 

 

 

 

Note: To avoid encountering a possible run-time error when

 

 

 

 

 

 

 

 

 

 

executing this instruction, add a ladder rung that clears S:24

 

 

 

 

 

 

 

 

 

 

(indexed addressing offset) immediately before a DDT

 

 

 

 

 

 

 

 

 

 

instruction.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data Transition

The DTR instruction compares the bits in the Source (I:002)

 

 

 

 

DTR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DATA TRANSITION

 

DTR

through a Mask (0FFF) with the bits in the Reference (N63:11).

 

 

 

 

 

 

When the masked source is different than the reference, the

 

 

 

 

Source

I:002

 

 

 

 

 

 

 

 

instruction is true for only 1 scan. The source bits are written

 

 

 

 

Mask

0FFF

 

 

 

 

 

 

 

 

into the reference address for the next comparison. When the

 

 

 

 

Reference

N63:11

 

 

masked source and the reference are the same, the instruction

 

 

 

 

 

 

 

 

 

 

remains false.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Publication 1785-UM012D-EN-P - July 2005

Page 319
Image 319
Bradley Smoker PLC-5 user manual Diagnostic Instructions, Fbc, Ddt