Instruction Set Quick Reference

D-17

 

 

Instruction

Description

 

 

BTD

BIT FIELD DISTRIB

Source

N7:3

 

0

Source bit

3

Dest

N7:4

Dest bit

0

10

Length

6

Bit Distribute

When the input conditions are true, the controller copies the

BTD

number of bits specified by Length, starting with the Source bit

 

(3) of the Source (N7:3), and placing the values in the

 

Destination (N7:4), starting with the Destination bit (10).

File Instructions

 

Instruction

 

 

 

Description

 

 

 

 

 

 

 

 

File Arithmetic and

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

 

 

 

FAL

 

 

 

 

 

 

 

 

 

Logic

controller reads 8 elements of N14:0, and subtracts 256 (a

 

 

 

 

 

 

 

 

 

 

 

FILE ARITH/LOGICAL

FAL

constant) from each element. This example shows the

 

 

 

Control

R6:1

 

result being stored in the eight elements beginning with

 

 

 

Status Bits:

N15:10. The control element R6:1 controls the operation.

 

 

 

Length

8

 

 

 

 

Position

0

 

EN - Enable

The Mode determines whether the controller performs the

 

 

 

Mode

ALL

DN - Done Bit

expression on all elements in the files (ALL) per program

 

 

 

Dest

#N15:10

ER - Error Bit

scan, one element in the files (INC) per false-to-true

 

 

 

Expression

#N14:0 - 256

 

transition, or a specific number of elements (NUM) per

 

 

 

 

 

 

 

 

 

scan.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The FAL instruction can perform these operations: add (+),

 

 

 

 

 

 

 

 

 

subtract (-), multiply (*), divide (), convert from BCD (FRD),

 

 

 

 

 

 

 

 

 

convert to BCD (TOD), square root (SQR), logical and (AND),

 

 

 

 

 

 

 

 

 

logical or (OR), logical not (NOT), exclusive or (XOR), negate

 

 

 

 

 

 

 

 

 

(-), clear (0), move, and the new math instructions (see the

 

 

 

 

 

 

 

 

 

CPT list).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

File Search and

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

 

 

FSC

 

 

 

 

 

 

FILE SEARCH/COMPARE

 

Compare

controller performs the not-equal-to comparison on 10

 

 

 

FSC

elements between files B4:0 and B5:0. Mode determines

 

 

Control

R9:0

 

 

 

 

 

whether the controller performs the expression on all

 

 

Length

90

 

Status Bits:

elements in the files (ALL) per program scan, one element in

 

 

Position

0

 

EN - Enable

the files (INC) per false-to-true transition, or a specific

 

 

Mode

10

 

DN - Done Bit

number of elements (NUM) per scan. Control element R9:0

 

 

Expression

#B4:0 <> #B5:0

 

 

 

 

ER - Error Bit

controls the operation.

 

 

 

 

 

 

 

 

IN - Inhibit Bit

 

 

 

 

 

 

 

 

 

FD - Found Bit

When the corresponding source elements are not equal

 

 

 

 

 

 

 

 

 

(element B4:4 and B5:4 in this example), the controller

 

 

 

 

 

 

 

 

 

stops the search and sets the found .FD and inhibit .IN bits

so your ladder program can take appropriate action. To continue the search comparison, you must reset the .IN bit.

To see a list of the available comparisons, see the comparisons listed under the CMP instruction.

Publication 1785-UM012D-EN-P - July 2005

Page 317
Image 317
Bradley Smoker PLC-5 user manual File Instructions, Btd, Fal, Fsc