Instruction Set Quick Reference

D-5

 

 

Instruction

Description

 

 

CTD

COUNT DOWN

Counter C5:1

Preset10

Accum35

Count Down

If the input conditions go true, counter C5:1 starts

 

CTD

 

counting, decrementing by 1 every time the rung goes from

 

false-to-true. When the accumulated value is less than the

 

preset value (10), the counter resets the counter done bit.

Status Bits:

Rung

 

CD

 

DN

 

UN

 

ACC

 

CTD

 

 

 

 

 

 

14

 

13

 

11

 

Value

 

Status

CU-Count Up

Condition

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CD-Count Down

False

 

0

 

0

 

0

 

0

 

Disabled

DN-Count Down done

 

 

 

 

 

 

 

 

 

 

 

False

 

0

 

1

 

0

 

>= preset

 

Preload

OV-Overflow

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Toggle True

 

1

 

1

 

0

 

dec by 1

 

Counting

UN-Underflow

 

 

 

 

 

 

True

 

1

 

0

 

0

 

< preset

 

Done

 

 

 

 

 

 

 

 

 

 

 

 

 

True

 

1

 

0

 

1

 

< -32768

 

Underflow

See page F-8 for a description of prescan operation for this instruction.

Compare Instructions

Instruction

Description

 

 

LIM

LIMIT TEST (CIRC)

Low limit N7:10 3

Test

N7:15

 

4

High limit

N7:20

 

22

Limit Test

LIM

If the Test value (N7:15) is >= the Low Limit (N7:10) and <= the High Limit (N7:20), this instruction is true.

Low Limit

 

Test

 

High Limit

 

LIM

 

 

 

 

 

 

 

0

 

0

 

10

 

T

 

 

 

 

 

 

 

-5

 

5

 

10

 

T

 

 

 

 

 

 

 

5

 

11

 

10

 

F

 

 

 

 

 

 

 

10

 

0

 

0

 

T

 

 

 

 

 

 

 

10

 

5

 

-5

 

F

 

 

 

 

 

 

 

10

 

11

 

5

 

T

 

 

 

 

MEQ

 

 

 

 

 

 

MASKED EQUAL

 

 

Source

D9:5

 

 

 

0000

 

Mask

D9:6

 

 

 

0000

 

Compare

D9:10

 

 

 

0000

Mask Compare Equal

MEQ

The controller takes the value in the Source (D9:5) and passes that value through the Mask (D9:6). Then the controller compare the result to the Compare value (D9:10). If the result and this comparison values are equal, the instruction is true.

Source

Mask

Compare

MEQ

 

 

 

 

0008

0008

0009

T

 

 

 

 

0008

0001

0001

F

0087

000F

0007

T

 

 

 

 

0087

00F0

0007

F

Publication 1785-UM012D-EN-P - July 2005

Page 305
Image 305
Bradley Smoker PLC-5 user manual Compare Instructions, Ctd, Lim, Meq