beautypg.com

2 communication protocol ascii mode, 1 adr (communication address), 2 cmd (command code) and data – Delta DVP-ES2 User Manual

Page 605: Communication protocol ascii mode -3, Adr (communication address) -3, Cmd (command code) and data -3

background image

4 . C o m m u n i c a t i o n s

− 7 data bits
− 1 stop bit
− Even

parity

− Baud rate: 9600

4.2 Communication Protocol ASCII mode

Communication Data Structure

9600 (Baud rate), 7 (data bits), Even (Parity), 1 (Start bit), 1 (Stop bit)

Field name

Content

Explanation

Start bit

STX

Start bit ‘:’ (3AH)

ADR 1

Communication
address

ADR 0

Address consists of 2 ASCII codes

CMD 1

Command code

CMD 0

Command code consists of 2 ASCII
codes

DATA (0)

DATA (1)

……….

Data

DATA (n-1)

Data content consist of 2n ASCII codes,

n

≤205

LRC CHK 1

LRC checksum

LRC CHK 0

LRC checksum consists of 2 ASCII codes

END1

Stop bit

END0

Stop bit consists of 2 ASCII codes
END1 = CR (0DH),
END0 = LF (0AH)


Corresponding table for Hexadecimal value and ASCII codes

ASCII “0“

“1“

“2“

“3“

“4“

“5“

“6“

“7“

Hex

30H 31H 32H 33H 34H 35H 36H 37H

ASCII “8“

“9“

“A“

“B“

“C“

“D“

“E“

“F“

Hex

38H 39H 41H 42H 43H 44H 45H 46H


4.2.1 ADR

(Communication

Address)

Valid communication addresses are in the range of 0~254. Communication address equals to 0 means

broadcast to all PLCs. PLC will not respond to a broadcast message. PLC will reply a normal message

to the master device when communication address is not 0.

Example, ASCII codes for communication address 16 in Decimal. (16 in Decimal = 10 in Hex)

(ADR 1, ADR 0)=’1’,’0’

Ö’1’=31H, ‘0’ = 30H


4.2.2 CMD (Command code) and DATA

The content of access data depends on the command code.

4 - 3

This manual is related to the following products: