Arithmetic instructions – KEYENCE Visual KV Series User Manual

Page 367

Advertising
background image

8.2 Details

3-343

1

8

Chapter 8 Programming Examples

2002

0000

0500

#00010

T000

0500

T000

STA

T000

TMIN

0

2002

0000

0500

#00010

T000

0500

T000

STA

T002

STA

T001

STA

T000

TMIN

0

0001

0501

#00010

T001

0501

T001

0002

0502

#00010

T002

0502

T002

Arithmetic Instructions

Applications of TMIN (Analog timer) instruction

■ Changing timer setting value
Uses analog timer (TMIN0) to change the timer setting value (0 to 24.9 s).

Ladder diagram

Coding

■ Changing setting values of multiple timers
Uses analog timer (TMIN0) to change setting values of multiple timers (0 to 24.9 s).

Ladder diagram

Coding

*

In the above example, T000, T001,
and T002 have the same setting value.

➮ Refer to p. 3-138.

Applications of LDA/STA instruction

■ First-in first-out (FIFO)
DM data flow

Line No. Instruction

Operand

0000

LD

2002

0001

TMIN

0

0002

CON

0003

STA

T000

0004

LD

0000

0005

OR

0500

0006

TMR

000 #00010

0007

ANB

T000

0008

OUT

0500

Line No. Instruction

Operand

0000

LD

2002

0001

TMIN

0

0002

CON

0003

STA

T000

0004

CON

0005

STA

T001

0006

CON

0007

STA

T002

0008

LD

0000

0010

TMR

000 #00010

0011

ANB

T000

0012

OUT

0500

0013

LD

0001

0014

OR

0501

0015

TMR

001 #00010

0016

ANB

T001

0017

OUT

0501

0018

LD

0002

0019

OR

0502

0020

TMR

002 #00010

0009

OR

0500

0021

ANB

T002

0022

OUT

0502

D M 0 0 0 2

D M 0 0 0 0

D M 0 0 0 1

D M 0 0 0 3

D M 0 0 0 4

Data shift

OK/NG judgement

Unloading timing

KVNKA Chap 08.p65

08.3.11, 0:12 PM

343

Advertising