Receiving text data, Kv -300 – KEYENCE Visual KV Series User Manual

Page 289

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-265

1

7

First relay no. +4

Transmits a break signal of approximately 160 msec duration at startup. Automati-
cally turns OFF after transmission is completed. Transmission is enabled while the
first relay no. +3 is OFF.
Use the SET/RES or KEEP instructions to turn the relay ON/OFF.

Note: Do not change the value of the text data (after the first DM +101) during
transmission, or an error will occur in the data being transmitted.

Receiving text data

The KV-300 CPU can write up to 100 bytes of text data contained between STX and
ETX into internal data memory addresses (DM9200 to DM9299), one byte per data
memory address in ASCII.

Receiving data format

Note that each piece of text data must include STX (02H) in the first byte followed by
the text (100 bytes max.) and ending with ETX (03H) in the last byte.

If transmitted text data includes ETX, the KV-L2 transfers the data up to immediately
before ETX to the data memory addresses. Text data after ETX is loaded as
separate data.

Data memory addresses
The KV-300 can write received text data into the assigned data memory addresses,
one byte per data memory address, in ASCII.

00 is loaded to 8 high-order bits and text data is loaded to 8 low-order bits in ASCII
as follows.

ON/OFF status of special utility relays

The assigned utility relays turn ON only for the first scan when text data is loaded or
an error occurs.

First relay no. +0
Turns ON after loading data and transferring it to the data memory addresses. It
remains ON, in which state data cannot be loaded. Write a program so that this relay
turns OFF after the process is completed. (Data is loaded while the relay is OFF.)
To fetch the ON signal only for one scan, add the following line to the end of the
program.

STX

ETX

data 1

data 2

data 3

data 99

- - - - - - - - - -

Received data

data 1

data 99

Data memory

addresses

Number

data 2

data 3 to data 98

Number of data bytes

1st DM no.+00 1st DM no.+01 1st DM no.+02

Number of data bytes

1st DM no.+03 to 1st DM no.+98

1st DM no.+99

C

R

Text data (100 bytes max.)

Last byte

or

C

R

L

F

D15

0

D14

0

D13

0

D12

0

D11

0

D10

0

D09

0

D08

0

D07

0

D06

0

D05

1

D04

1

D03

0

D02

0

D01

0

D00

1

Data memory

High-order 8 bits

Low-order 8 bits

[00]

[ASCII code ]

Relay No.

Description

First relay +0

Turns ON when text data has been loaded.

+1

Turns ON when text data has been loaded but not transferred to DM.

+2

Turns ON when an error occurs during text data reception.

(RES)

∗∗∗∗

∗∗∗∗

First relay no. +0)

(∗∗∗∗

KVHKA Chap 07_5to10.p65

08.3.11, 11:18 AM

265

Advertising