DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

Program Example 3: COM2 RS-485

1.Connect PLC to VFD-B series AC motor drives (AC motor drive in ASCII Mode; PLC in 16-bit mode and M1161 = OFF).

2.Write the data to be sent into registers starting from D100 in advance in order to read 6 data starting from address H2101 on VFD-B

M1002

H86

D1120

Set up communication protocol as

 

 

 

 

 

MOV

 

 

 

 

 

9600,7,E,1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SET

M1120

Retain communication protocol

 

 

 

 

 

 

 

 

 

 

MOV

K100

D1129

Set up communication time-out as 100ms

 

 

 

 

 

Pulse for

 

 

 

 

sending request

 

 

 

 

 

 

 

 

 

Write transmitting data in advance

 

 

 

 

 

 

 

 

 

 

 

 

SET

M1122

Sending request

 

 

 

 

 

 

 

X0

D100

 

D120

K35

 

 

 

 

 

RS

K17

 

 

 

 

 

Receiving

 

 

 

 

completed

 

 

 

 

M1123

Processing received data

RST M1123 Reset M1123

PLC Ö VFD-B, PLC sends “: 01 03 2101 0006 D4 CR LF “

VFD-B Ö PLC, PLC receives “: 01 03 0C 0100 1766 0000 0000 0136 0000 3B CR LF “

Registers for sent data (PLC sends out messages)

Register

 

Data

 

 

Explanation

D100 low

‘: ’

 

3A H

STX

 

D100 high

‘0’

 

30 H

ADR 1

 

Address of AC motor drive: ADR (1,0)

D101 low

‘1’

 

31 H

ADR 0

 

 

 

 

D101 high

‘0’

 

30 H

CMD 1

 

Instruction code: CMD (1,0)

D102 low

‘3’

 

33 H

CMD 0

 

 

 

 

D102 high

‘2’

 

32 H

 

 

 

D103 low

‘1’

 

31 H

Start data address

 

D103 high

‘0’

 

30 H

 

 

 

 

 

D104 low

‘1’

 

31 H

 

 

 

D104 high

‘0’

 

30 H

 

 

 

D105 low

‘0’

 

30 H

Number of data (counted by words)

D105 high

‘0’

 

30 H

 

 

 

 

D106 low

‘6’

 

36 H

 

 

 

D106 high

‘D’

 

44 H

LRC CHK 1

 

Error checksum: LRC CHK (0,1)

D107 low

‘4’

 

34 H

LRC CHK 0

 

 

 

 

D107 high

CR

 

D H

END

 

D108 low

LF

 

A H

 

 

 

 

 

3 - 206

Page 322
Image 322
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Program Example 3 COM2 RS-485, Stx, Adr, Cmd, Lrc Chk