17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4. Communications<br />

−<br />

−<br />

−<br />

7 data bits<br />

1 stop bit<br />

Even parity<br />

− Baud rate: 9600<br />

4.2 Communication Protocol ASCII mode<br />

Communication Data Structure<br />

9600 (Baud rate), 7 (data bits), Even (Parity), 1 (Start bit), 1 (Stop bit)<br />

Field name Content Explanation<br />

Start bit STX Start bit ‘:’ (3AH)<br />

Communication ADR 1<br />

address ADR 0<br />

Address consists of 2 ASCII codes<br />

Command code<br />

Data<br />

LRC checksum<br />

Stop bit<br />

CMD 1<br />

CMD 0<br />

DATA (0)<br />

DATA (1)<br />

……….<br />

DATA (n-1)<br />

LRC CHK 1<br />

LRC CHK 0<br />

END1<br />

END0<br />

Command code consists of 2 ASCII<br />

codes<br />

Data content consist of 2n ASCII codes,<br />

n≤205<br />

LRC checksum consists of 2 ASCII codes<br />

Stop bit consists of 2 ASCII codes<br />

END1 = CR (0DH),<br />

END0 = LF (0AH)<br />

Corresponding table for Hexadecimal value and ASCII codes<br />

ASCII “0“ “1“ “2“ “3“ “4“ “5“ “6“ “7“<br />

Hex 30H 31H 32H 33H 34H 35H 36H 37H<br />

ASCII “8“ “9“ “A“ “B“ “C“ “D“ “E“ “F“<br />

Hex 38H 39H 41H 42H 43H 44H 45H 46H<br />

4.2.1 ADR (Communication Address)<br />

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

broadcast to all PLCs. PLC will not respond to a broadcast message. PLC will reply a normal message<br />

to the master device when communication address is not 0.<br />

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

(ADR 1, ADR 0)=’1’,’0’’1’=31H, ‘0’ = 30H<br />

4.2.2 CMD (Command code) and DATA<br />

The content of access data depends on the command code.<br />

4-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!