Kv -300 – KEYENCE Visual KV Series User Manual

Page 282

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

7

Communications start command
Initiates communications between the KV-L2 and a personal computer.
Command: CR_nn

[nn = Station no. (not required for 1:1 connection)]

Response: CC_nn

Communications end command
Terminates communications between the KV-L2 and a personal computer.
Command: CQ
Response: CF

Mode change command
Switches the KV-300 CPU mode between PROGRAM and RUN.
Command: Mn

[n=0: PROGRAM mode, n=1: RUN mode]

Response: OK

Clears error messages on the KV-300 CPU.
Command: ER
Response: OK

Checking CPU error
The KV-300 CPU responds with error codes indicating errors or faults in the KV-300
CPU.
Command: ?E
Response: dd

[dd: error code]
(Refer to P. 115 for error code list.)

Inquiring model
The KV-300 CPU responds with the model no. of the KV-300 module currently in
use.
Command: ?K
Response: K300

(When KV-300 CPU is in use.)

Checking current mode
The KV-300 CPU responds with 0 or 1, indicating the current mode.
Command: ?M
Response: 0, 1

[0: PROGRAM mode, 1: RUN mode]

Reading counter
Reads contact ON/OFF status and current and preset values of the specified
counter.
Command: RD_Cnnn

[nnn = counter no.] Reads the content of a counter or
an up/down counter.

RD_CTHn

[n = high-speed counter no.] Reads the content of a
high-speed counter CTH.

RD_CTCn

[n = high-speed counter comparator no.] Reads the
content of a high-speed counter comparator.

Response: f,ddddd,ddddd

[f = 0, 1: ON/OFF status of counter contact

(current value)

0: OFF, 1: ON]

(preset value)

[ddddd = 00000 to 65535 (in decimal)

Reading timer
Reads contact ON/OFF status and current and preset values of the specified timer.
Command: RD_Tnnn

[nnn = timer no.]

Response: f,ddddd,ddddd

[f=0, 1: ON/OFF status of a timer contact

(current value)

0: OFF, 1: ON]

(preset value)

[ddddd = 00000 to 65535 (in decimal)]

KVHKA Chap 07_5to10.p65

08.3.11, 11:18 AM

258

Advertising