1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

06 programming timer and counter instructions Training PLC Allen Bradley

32 108 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 32
Dung lượng 471,12 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

TON OPERATIONThe TON instruction starts accumulating time when the rung goes true, and continues until one of the following happen: • The rung goes false • The accumulated value equals i

Trang 1

DAY 2

SESSION 2

LADDER LOGIC PROGRAMMING – TIMER &

COUNTER

Trang 2

Be able to

Describe the function of an on-delay timer

Describe the function of an off-delay time

Describe the instances in which one would use a retentive

timer

Describe the function of an up-counter

Describe the function of a down-counter

Describe the instances in which one would use an up- versus a down-counter

Define preset value, accumulative value, and timer or counter

address

Trang 3

SUB-WINDOW : TIMER / COUNTER

Timer is used to delay turning on or off output for maximum 9.1

hours

Counter is used to count up and down over a range of -32,768 to

+32,768

Trang 4

TIMER INSTRUCTIONS

Timer Off Delay (TOF)

Retentive Timer On (RTO)

Trang 5

TIMER ON DELAY (TON)

Use TON instruction to turn an output on after the timer has been

on for a preset time interval

Status bit:

EN DN

TON Timer On Delay

Trang 6

TON OPERATION

The TON instruction starts accumulating time when the rung goes true, and continues until one of the following happen:

• The rung goes false

• The accumulated value equals its preset value

• A reset instruction resets the timer

• The processor resets the accumulated value when the rung condition go

false, regardless of whether the timer timed out or not

Trang 7

TON TIMING DIAGRAM

Trang 8

TON STATUS BITS

This Bit: Is Set When: Indicates: And Remains Set Until One of the

Following Occurs:

Timer Enabled

.EN (bit 15)

the rung goes true that timer is enabled • the rung goes false

• a reset instruction reset the timer

Timer Timing Bit

.TT (bit 14)

the rung goes true that a timing

operation is in progress

• the rung goes false

• the DN bit is set (.ACC = PRE)

• a reset instruction reset the timer Timer Done Bit

.DN (bit 13)

the accumulated value is equal to the preset value

that a timing operation is complete

• the rung goes false

• a reset instruction resets the timer

Trang 9

When the input condition is true, the processor increments the accumulated value

of Timer_1 in 1 milisecond increment

Sets the output while the timer is timing

Sets the output when the timer is done timing

TIMER ON LADDER DIAGRAM

EXAMPLE

Trang 10

TIMER OFF DELAY (TOF)

Use TOF instruction to turn an output off after the timer has been

off for a preset time interval

Status bit:

Trang 11

TOF OPERATION

The TOF instruction starts accumulating time when the rung goes

false, and continues until one of the following happen:

• The rung goes true

• The accumulated value equals its preset value

• A reset instruction resets the timer

• The processor resets the accumulated value when the rung condition go

true, regardless of whether the timer timed out or not

Trang 12

TOF TIMING DIAGRAM

Trang 13

TOF STATUS BITS

This Bit: Is Set When: Indicates: And Remains Set Until One of

the Following Occurs:

Timer Enabled

.EN (bit 15)

the rung goes true that timer is

enabled

• the rung goes false

• a reset instruction reset the timer

Timer Timing Bit

• the rung goes true

• the DN bit is set (.ACC = PRE)

• a reset instruction reset the timer

Timer Done Bit

.DN (bit 13)

the rung goes true that a timing

operation is complete

• the accumulated value is equal

to the preset value

Trang 14

EXAMPLE TOF

LADDER DIAGRAM

When the input condition goes false, the processor starts incrementing the accumulated value of Timer_1 in

6-milisecond increments until the input goes true

Sets the output while the timer is timing

Resets the output when the timer is done timing

Trang 15

RETENTIVE TIMER ON (RTO)

Use RTO instruction to turn an output on after the timer has been

on for a preset time interval

Status bit:

Trang 16

RTO OPERATION

The RTO instruction begins timing when its rung goes true

As long as the rung remains true, the timer updates the

accumulated value each program scan, until it reaches the preset

value

The RTO instruction retains its accumulated value even if one of

the following occurs:

• The rung goes false

• The processor faults or loses power

Trang 17

When the input is true, the processor starts incrementing the accumulated value of T4:2 in 6-second increments The timer values remain when the input goes false.

Sets the output when the input is true and the timer is timing

Sets the output when the input is true and the accumulated value is greater then or equal to the preset value

EXAMPLE RTO

LADDER DIAGRAM

Trang 18

RTO TIMING DIAGRAM

Trang 19

RTO STATUS BITS

This Bit: Is Set When: Indicates: And Remains Set Until One of

the Following Occurs:

Timer Enabled

.EN (bit 15)

the rung goes true that a timing

operation is in progress

• the rung goes false

• a reset instruction reset the timer

Timer Timing Bit

.TT (bit 14)

the rung goes true that a timing

operation is in progress

• the rung goes false

• the DN bit is set

• the accumulated value is equal to the preset value (.ACC = PRE)

• a reset instruction reset the timer Timer Done Bit

.DN (bit 13)

the accumulated value

is equal to the preset value

that a timing operation is complete

• the DN bit is reset with the RES instruction

Trang 20

EXAMPLE RTO

LADDER DIAGRAM

When the input is true, the processor starts incrementing the accumulated value of Timer_1 in 6-milisecond increments The timer values remain when the input goes false.

Sets the output when the input is true and the timer is timing

Sets the output when the input is true and the accumulated value is greater then or equal to the preset value

Resets accumulated value of Timer_1

Trang 21

COUNTER INSTRUCTIONS

Trang 22

COUNT UP (CTU)

Use CTU to increment the accumulated value by one count

Status bit:

Trang 23

CTU OPERATION

When the accumulated value equals or exceeds the preset

value, the CTU instruction sets a done bit DN

The accumulated value of a counter is retentive

The count is retained until reset by a reset instruction (RES)

that has the same address as the counter

Trang 24

CTU TIMING DIAGRAM

Trang 25

EXAMPLE CTU

LADDER DIAGRAM

Each time the input goes from false to true, the processor increments the counter by 1

Sets the output while the counter is counting

Tells when the count is reached (ACC > or = PRE)

Reset the counter

Trang 26

COUNT DOWN (CTD)

Use CTD to decrement the accumulated value by one count

Status bit:

Trang 27

CTD OPERATION

The done bit DN is set as long as the accumulated value is

greater than or equal to the preset value

When the accumulated value is less than the preset value, the

done bit DN is reset

The accumulated value of a counter is retentive

When the accumulated value equals or exceeds the preset

value, the CTU instruction sets a done bit DN

The accumulated value of a counter is retentive

The count is retained until reset by a reset instruction (RES)

that has the same address as the counter

Trang 28

CTD TIMING DIAGRAM

Trang 29

EXAMPLE CTD

LADDER DIAGRAM

Each time the input goes false to true, the processor decrements the counter by 1

Sets the output while the counter is counting

Tells when the count is reached (ACC > or = PRE)

Reset the counter

Trang 30

TIMER AND COUNTER RESET (RES)

The RES instruction is an output instruction that resets a timer or

counter

The RES instruction executes when its rung is true

Each time the input goes false to true, the processor decrements the counter by 1

Sets the output while the counter is counting

Tells when the count is reached (ACC > or = PRE)

Reset the counter

Trang 31

Delay turning on an output TON

Delay turning off an output TOF

Trang 32

DAY 2

SESSION 3

LADDER LOGIC PROGRAMMING – CONTROL

INSTRUCTIONS

Ngày đăng: 15/05/2019, 20:44

TỪ KHÓA LIÊN QUAN