Kv -300 – KEYENCE Visual KV Series User Manual

Page 292

Advertising
background image

7.5 KV Mode Programming

KV-300 Series Only

KV

-300

KV-10/80

Chapter 7 KV-L2 Serial Interface Module

1-268

7

Data memory address DM9602
The DM address into which the converted ASCII data is written is specified in
DM9602. For example, when the text data to be transferred is specified, the first DM
address +101 designated when data memory addresses are assigned (

➮ Refer to

page 1-264) is written here.

Data memory address DM9603
Write the first address of the data memory to which the binary data to be converted
is to be loaded. Binary data to be converted uses five DM addresses, including the
first DM address described above. Avoid using DM addresses already used by the
program.

2. Set the DM address into which ASCII code is to be written as follows.

Binary
A binary value be converted is input to 16 high-order bits and 16 low-order bits in
data memory addresses separately.

Decimal position
Specifies the decimal position written in the ASCII string. If 0, no decimal point is
specified.
After conversion, the ASCII code for decimal point (2EH) is stored in the specified
position counting from the top of the ASCII string. For example, when the binary
value is 1234 and decimal position is 2, the specified value becomes 1.234, which is
31H 2EH 32H 33H 34H in ASCII.

Number of bytes in ASCII string
Specify the total number of bytes, including binary digits, +/- sign, and decimal point.
For example, when a value is -12.34, "6" is written here.

Signs
Specify the +/- sign to be appended to the converted value (from binary to ASCII).
The +/- sign is stored in the first DM address of the ASCII string.

0: No sign

No +/- sign is appended to the ASCII-converted value. "0" can be specified when the
binary value is positive. If "0" is specified when a binary value is a complement of
two, the binary is treated as a positive value.

1: - sign

Converts a binary value by giving -(2DH) when the binary value is a complement of
two. Adds no sign to a positive binary.

2: ± sign

Converts a positive binary by giving +(2BH) and a negative binary (complement on
two) by giving -(2DH).

DM****+0

Binary code high-order 16 bits

DM****+1

Binary code low-order 16 bits

DM****+2

Decimal position (0: None, 1 to 99: DM position)

DM****+3

No. of bytes in ASCII string

DM****+4

Sign (0: Unsigned, 1: Add - 2: Add ±)

KVHKA Chap 07_5to10.p65

08.3.11, 11:18 AM

268

Advertising