KEYENCE Visual KV Series User Manual

Page 187

Advertising
background image

2.4 Instruction Details

1

2

3-163

Chapter 2 Instructions

0000

ANDA

0100

LDA

DM0000

ORA

TBIN

C001

STA

#04

SLA

$000F

$000F

ANDA

0000

LDA

DM0000

STA

2002

2002

2002

#00099

C000
0001

Line No.

Instruction

Operand

0000

LDB

0001

0001

C

001 #00099 0001

0002

LD

2002

0003

LDA

0000

0004

CON

0005

ANDA

$000F

0006

CON

0007

STA

DM0000

0008

LD

2002

0009

LDA

0100

0010

CON

0011

ANDA

$000F

0012

LD

2002

0013

SLA

#04

0014

CON

0015

ORA

DM0000

0016

CON

0017

TBIN

0018

CON

0019

STA

C001

Sets C001.

Writes data of 7000 to 7003 into DM0000.

Writes data of 8000 to 8003 into internal regis-
ter.

ORA / @ORA

Separate input of 2-digit BCD
Fetches only 2 digits of the BCD digital switch (0000 to 0003 for the 1st digit, 0100
to 0103 for the 2nd digit) and sets it as the counter value.

Coding

ORs content of internal register which is shifted
to left by four bits and data of 7000 to 7003,
converts ORed data into BIN, and write it into
C001.

KVNKA Chap 02_4cP.p65

08.3.11, 0:02 PM

163

Advertising