beautypg.com

Dw: data memory write, Example, Description – KEYENCE Visual KV Series User Manual

Page 160: Tips, Operands key operation arithmetic flag

background image

2.4 Instruction Details

3-136

2

Chapter 2 Instructions

Example

Coding

When starting operation, $0018 is written into DM0000 and #00050 into DM0001.

Description

Values are directly written into data memories, without using the internal register.

Note: The contents of the internal register and the arithmetic flag do not change
even after the DW instruction is executed.

Tips

The DW instruction can be used to reset the contents of data memories.

Operands

Key operation

Arithmetic flag

2009, 2010, 2011

No change

2012

No change

DW: Data Memory Write

Directly writes constant into data memory.

D W

nnnn

DMmmmm

DW

2008

#00050

DM0001

DW

$0018

DM0000

DW

Line No.

Instruction

Operand

0000

LD

2008

0001

DW

$0018 DM0000

0002

CON

0003

DW

#00050 DM0001

D

15

D

14

D

13

D

12

D

11

D

10

D

9

D

8

D

7

D

6

D

5

D

4

D

3

D

2

D

1

D

0

D

15

D

14

D

13

D

12

D

11

D

10

D

9

D

8

D

7

D

6

D

5

D

4

D

3

D

2

D

1

D

0

2008

#00000

DM0001

DW

#00000

DM0000

DW

D W

reraly

First operand

Second operand

ENT

R-SRCH

:

First operand

Second operand

Operand

Data memory

DW

Visual KV

KV-300

KV-10/16

KV-24/40/80

nnnn:

nnnn

nnnn

nnnn

#00000 to #65535

#00000 to #65535

#00000 to #65535

#00000 to #65535

$0000 to $FFFF

$0000 to $FFFF

$0000 to $FFFF

$0000 to $FFFF

DM mmmm:

DMmmmm

DMmmmm

DMmmmm

DM0000 to DM1999 DM0000 to DM9999 DM0000 to DM0999 DM0000 to DM1999

KVNKA Chap 02_4cP.p65

08.3.11, 0:02 PM

136