KEYENCE Visual KV Series User Manual

Page 208

Advertising
background image

2.4 Instruction Details

3-184

2

Chapter 2 Instructions

Hex number

Bit configuration

Code

Bit configuration

0

0

0

0

0

$30

0

0

1

1

0

0

0

0

1

0

0

0

1

$31

0

0

1

1

0

0

0

1

2

0

0

1

0

$32

0

0

1

1

0

0

1

0

3

0

0

1

1

$33

0

0

1

1

0

0

1

1

4

0

1

0

0

$34

0

0

1

1

0

1

0

0

5

0

1

0

1

$35

0

0

1

1

0

1

0

1

6

0

1

1

0

$36

0

0

1

1

0

1

1

0

7

0

1

1

1

$37

0

0

1

1

0

1

1

1

8

1

0

0

0

$38

0

0

1

1

1

0

0

0

9

1

0

0

1

$39

0

0

1

1

1

0

0

1

A

1

0

1

0

$41

0

1

0

0

0

0

0

1

B

1

0

1

1

$42

0

1

0

0

0

0

1

0

C

1

1

0

0

$43

0

1

0

0

0

0

1

1

D

1

1

0

1

$44

0

1

0

0

0

1

0

0

E

1

1

1

0

$45

0

1

0

0

0

1

0

1

F

1

1

1

1

$46

0

1

0

0

0

1

1

0

Description

Operation using the ASC instruction

When input relay 0000 turns ON, the contents of DM0000 are transferred to the
internal register. The contents of the internal register (low-order 8-bit, 2-digit numeri-
cal value) are converted into 2-digit ASCII code. This 2-digit code is input back to the
internal register, and then transferred to DM0001.

Operation using the RASC instruction

When input relay 0001 turns ON, the contents of DM0010 are transferred to the
internal register. The contents of the internal register (2-digit ASCII code) is con-
verted into a low-order 8-bit, 2-digit numeric value. This 2-digit numeric value is input
back to the internal register, then transferred to DM0011..

The value is converted only when the high- and low-order 8-bit value of the internal
register is within the range of "$30" to "$39" and "$41" to "$46", respectively, before
the conversion. (When either of the high- or low-order 8-bit value is not within the
range, the conversion is disabled. In this case, special utility relay 2012 turns ON.)

Example of conversion between hex and ASCII numbers

1 0 1 0 0 1 0 1

0 1 0 0 0 0 0 1 0 0 1 1 0 1

4

1

3

5

A

5

0 1

0 0 0 0 0 0 0 0 0 1 1 0 1 1

4

3

3

6

6

C

0 0

0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 1

ASC / @ASC / RASC / @RASC

KVNKA Chap 02_4dP.p65

08.3.11, 0:04 PM

184

Advertising