KEYENCE Visual KV Series User Manual

Page 381

Advertising
background image

8.2 Details

3-357

1

8

Chapter 8 Programming Examples

MUL

LDA

2002

LDA

STA

DIV

TBCD

STA

DM0000 DM0001

#10000

DM0101

TM01

7500

LDA

TBCD

STA

DM0101

8500

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2002

0010

CON

0001

LDA

DM0000

0011

TBCD

0002

CON

0012

CON

0003

MUL

DM0001

0013

STA

750

0004

CON

0014

CON

0005

DIV

#10000

0015

LDA

DM0101

0006

CON

0016

CON

0007

STA

DM0101

0017

TBCD

0008

CON

0018

CON

0009

LDA

TM01

0019

STA

8500

2002

TBIN

LDA

7000

STA

C001

#09999

0000

C001

0001

Converts data of 7000 to 7015 to BIN
data and writes it into C001.

Sets C001.

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2002

0004

CON

0001

LDA

7000

0005

STA

C001

0002

CON

0006

LDB

0001

0003

TBIN

0007

C

001 #09999 0000

Ladder diagram

Coding

➮ Refer to p. 3-180.

Application of TBIN instruction

Output of 4-digit BCD data
Sets 4 digits of the BCD digital switch (7000 to 7015) as the counter C001 value.

Ladder diagram

Coding

➮ Refer to p. 3-183.

KVNKA Chap 08.p65

08.3.11, 0:12 PM

357

Advertising