beautypg.com

Xxxx: differentiation – KEYENCE Visual KV Series User Manual

Page 161

background image

2.4 Instruction Details

1

2

3-137

Chapter 2 Instructions

Example

Description

Arithmetic instructions have two instruction types: differentiation type and every-
scan type.

The differentiation type instruction is executed only at the rising edge of input
relay 0000.

The every-scan type instruction is executed every scan time while input relay
0000 is ON.

Timing diagram

Instructions with the DIFFERENTIATION function are as follows:
LDA, SAT, CMP, ADD, SUB, MUL, DIV, ANDA, ORA, EORA, SRA, SLA, RRA,
RLA, COM, INC, DEC, MPX, DMX, TBCD, TBIN, ASC, RASC, ROOT

Note:

In the top program, an INC instruction is
executed every scan time, incrementing
the contents of DM0000 by one, while
input relay 0000 is ON.

In the middle program, an INC instruc-
tion is executed and the contents of
DM0000 is incremented only when input
relay 0000 is turned from OFF to ON.

The bottom program uses the
every-scan type instruction which
performs the same operation as the
differentiation type instruction.

Operands

Key operation

@xxxx: Differentiation

Executes instruction only at rising edge of
input to input relay.

@

#,$

FUN

xxxx

0000

0000

DM0000

INC

DM0000

INC

Every-scan type instruction

Differentiation type instruction

ON
OFF

0000

INC

ON
OFF

0000

INC

Executed only once at the rising
edge of input relay 0000.

Differentiation type instruction

Executed

Stopped

Stopped

Stopped

Every-scan type instruction

Stopped

0000

DM0000

INC

0000

DM0000

INC

0000

1000

DM0000

INC

1000
DIFU

@

#,$

FUN

Function No.

ENT

R-SRCH

:

@xxxx

KVNKA Chap 02_4cP.p65

08.3.11, 0:02 PM

137