beautypg.com

Application of udc instruction – KEYENCE Visual KV Series User Manual

Page 101

background image

2.4 Instruction Details

1

2

3-77

Chapter 2 Instructions

Application of UDC instruction

Multi-level UP/DOWN counter
UP/DOWN counter which allows a count setting value up to 99,990,000.

Coding

The example below outputs the high-order 4 digits of 8-digit BCD to UDC001 and
the low-order 4 digits of 8-digit BCD to UDC000.

Low-order 4 digits

0001

0002

0003

UDC 000

UP
#09999

DW

RES

C000

C000

0001

0002

0003

UDC 001

UP
#09999

DW

RES

0001
0002

BCD

BCD

High-order 4 digits

Line No.

Instruction

Operand

0000

LD

0001

0001

LD

0002

0002

LD

0003

0003

UDC

000 #09999

0004

LD

C000

0005

AND

0001

0006

LD

C000

0007

AND

0002

0008

LD

0003

0009

UDC

001 #09999

0004

C000

LDA

TBCD

0500

STA

C001

LDA

TBCD

0600

STA

Up-input
Down-input

Low-order
4 digits

High-order
4 digits

UDC

KVNKA Chap 02_4aP.p65

08.3.11, 11:58 AM

77