Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Free Protocol

This is a simple protocol of communication between Controller and Displayer. In this protocol,
Controller is acted as Master, Displayer is acted as Slaver. So, those who develop controller can
only program simple communication read/write procedure instead of communication interrupt
service procedure.
First, Controller send a request to Displayer. After Displayer received the request, it will answer a
response to Controller.
Displayer has 128(MAX) words to exchange data with Controller. It is called MW0~MW127. And
every bit in words can be used as coil by calling MWx.i(i=0..15).

format of request
Node No. Command Address Length [Data] SUM

Node No. : Displayer No. ( 0 – 255, 0 means broadcast, and Displayer do not need to response )
Command : ‘R’/‘W’ means read from Displayer or write data to Displayer
Address : index No. of MW ( 0 – 127 )
Length : number of MW need to be read/written ( 1 – 128 )
Data : value of MW, there is no Data if Command is ‘R’
SUM : ( sum from Node No. to the byte before SUM ) mode 0x100
(note: if SUM is 0x5A, it need not to be considered)

format of response
Node No. Status [Address Length Data] SUM

Status : status of communication


: 0 – OK
: 1 – address error
: 2 – length error
: 3 – range error ( address + length > 128 )
: 4 – command error
when Command is ‘W’ or not OK, there will be no Address, Length and Data

format of Data
MWi MWi MWi+1 MWi+1 MWi+n-1 MWi+n-1

(hi) (lo) (hi) (lo) (hi) (lo)
when Address is i, and Length is n
Protocol

First, Controller send a request to Displayer. If Displayer received the requset and check SUM OK,
and the Node No. equal the No. of Displayer itself, the Display will answer a response. Otherwise,
Displayer will not answer anything

Controller should check time-out of response of Displayer. It’s over 50 ms. If time out, Controller
should resend the request.
Displayer should check time-out of data receive. It’s over 25ms. If time out, Display will initiate
communication, wait the request from Controler.

Read ( read data from Displayer )


Controller
Node No. ‘R’ Address Length SUM
Displayer
Node No. Status Address Length Data SUM
Data : value of MW which are need to be read

Write ( write data into Displayer )


Node No. ‘W’ Address Length Data SUM
Displayer
Node No. Status SUM
Status : 0 – OK

For Example:
a) Controller Read MW0,MW1 From DP210
Controller Send: 01H 52H 00H 02H 55H
DP210 Response: 01H 00H 00H 02H 00H 00H 00H 0CH 0FH
(MW0=0 MW1=12)

b) Controller Write 256 To MW0


Controller Send: 01H 57H 00H 01H 01H 00H 5AH
DP210 Response 01H 00H 01H

You might also like